@@ -416,6 +413,7 @@ defineExpose({
v-shortcut
@click="showFormDialog()"
class="fill-icon"
+ data-cy="addButton"
>
{{ t('Upload file') }}
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 168b69f42bf..9e1f58500c1 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -6,6 +6,7 @@ import { useArrayData } from 'composables/useArrayData';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { useState } from 'src/composables/useState';
import { useRoute, useRouter } from 'vue-router';
+import { useRoute, useRouter } from 'vue-router';
import { useClipboard } from 'src/composables/useClipboard';
import VnMoreOptions from './VnMoreOptions.vue';
@@ -47,6 +48,7 @@ const $props = defineProps({
const state = useState();
const route = useRoute();
const router = useRouter();
+const router = useRouter();
const { t } = useI18n();
const { copyText } = useClipboard();
const { viewSummary } = useSummaryDialog();
@@ -58,6 +60,9 @@ const isSameDataKey = computed(() => $props.dataKey === route.meta.moduleName);
const DESCRIPTOR_PROXY = 'DescriptorProxy';
const moduleName = ref();
const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value;
+const DESCRIPTOR_PROXY = 'DescriptorProxy';
+const moduleName = ref();
+const isSameModuleName = route.matched[1].meta.moduleName !== moduleName.value;
defineExpose({ getData });
onBeforeMount(async () => {
@@ -84,6 +89,7 @@ onBeforeMount(async () => {
);
});
+function getName() {
function getName() {
let name = $props.dataKey;
if ($props.dataKey.includes(DESCRIPTOR_PROXY)) {
@@ -91,11 +97,17 @@ function getName() {
}
return name;
}
+const routeName = computed(() => {
+ let routeName = getName();
+ return `${routeName}Summary`;
+ return name;
+}
const routeName = computed(() => {
let routeName = getName();
return `${routeName}Summary`;
});
+
async function getData() {
store.url = $props.url;
store.filter = $props.filter ?? {};
@@ -164,6 +176,8 @@ const toModule = computed(() => {
diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue
index 210b0c982fd..5d06d562717 100644
--- a/src/pages/Claim/Card/ClaimSummary.vue
+++ b/src/pages/Claim/Card/ClaimSummary.vue
@@ -19,6 +19,7 @@ import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
+import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
import ClaimDescriptorMenu from './ClaimDescriptorMenu.vue';
const route = useRoute();
@@ -252,13 +253,15 @@ function claimUrl(section) {
-
+
+ {{ claim?.client?.department?.name || '-' }}
+
+
@@ -271,7 +274,7 @@ function claimUrl(section) {
-
+
{{ claim.client?.name }}
diff --git a/src/pages/Claim/Card/ClaimSummaryAction.vue b/src/pages/Claim/Card/ClaimSummaryAction.vue
index e5273902c25..577ac2a65a2 100644
--- a/src/pages/Claim/Card/ClaimSummaryAction.vue
+++ b/src/pages/Claim/Card/ClaimSummaryAction.vue
@@ -80,7 +80,7 @@ const columns = [
:right-search="false"
:column-search="false"
:disable-option="{ card: true, table: true }"
- search-url="actions"
+ :search-url="false"
:filter="{ where: { claimFk: $props.id } }"
:columns="columns"
:limit="0"
diff --git a/src/pages/Claim/ClaimFilter.vue b/src/pages/Claim/ClaimFilter.vue
index 0fe7fc58843..37146865c6b 100644
--- a/src/pages/Claim/ClaimFilter.vue
+++ b/src/pages/Claim/ClaimFilter.vue
@@ -44,15 +44,14 @@ const props = defineProps({
is-outlined
/>
diff --git a/src/pages/Claim/ClaimList.vue b/src/pages/Claim/ClaimList.vue
index 41d0c559819..06996c2c11e 100644
--- a/src/pages/Claim/ClaimList.vue
+++ b/src/pages/Claim/ClaimList.vue
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
import { toDate } from 'filters/index';
import ClaimFilter from './ClaimFilter.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
+import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
import ClaimSummary from './Card/ClaimSummary.vue';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
@@ -48,6 +49,20 @@ const columns = computed(() => [
},
columnClass: 'expand',
},
+ {
+ align: 'left',
+ name: 'departmentFk',
+ label: t('customer.summary.team'),
+ component: 'select',
+ attrs: {
+ url: 'Departments',
+ },
+ create: true,
+ columnField: {
+ component: null,
+ },
+ format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
+ },
{
align: 'left',
label: t('claim.attendedBy'),
@@ -152,6 +167,12 @@ const STATE_COLOR = {
+
+
+ {{ row.departmentName || '-' }}
+
+
+
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index 36ec4763e87..9c9d1b50b00 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -8,7 +8,6 @@ import FormModel from 'components/FormModel.vue';
import VnRow from 'components/ui/VnRow.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
-import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
import { getDifferences, getUpdatedValues } from 'src/filters';
const route = useRoute();
@@ -37,7 +36,7 @@ const exprBuilder = (param, value) => {
function onBeforeSave(formData, originalData) {
return getUpdatedValues(
Object.keys(getDifferences(formData, originalData)),
- formData
+ formData,
);
}
@@ -119,16 +118,11 @@ function onBeforeSave(formData, originalData) {
/>
-
{{
t(
- 'In case of a company succession, specify the grantor company'
+ 'In case of a company succession, specify the grantor company',
)
}}
diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue
index 75fcb98fa19..8c70646c163 100644
--- a/src/pages/Customer/Card/CustomerCard.vue
+++ b/src/pages/Customer/Card/CustomerCard.vue
@@ -1,10 +1,10 @@
- {
:value="toCurrency(entity.debt)"
:info="t('customer.summary.riskInfo')"
/>
-
+
-
- {{ dashIfEmpty(entity.salesPersonUser) }}
+
+
({ flat: true, color: 'blue' }),
+ props: () => ({ flat: true }),
event: ({ row }) => downloadFile(row.dmsFk),
},
employee: {
component: QBtn,
- props: () => ({ flat: true, color: 'blue' }),
+ props: () => ({ flat: true }),
event: () => {},
},
created: {
@@ -214,8 +214,17 @@ const toCustomerFileManagementCreate = () => {
v-bind="tableColumnComponents[props.col.name].props(props)"
>
- {{ props.value }}
+
+ {{ props.value }}
+
+
{
{{ t('globals.params.email') }}
-
+
-
+
+
+
+
-import { reactive, ref } from 'vue';
-import { useI18n } from 'vue-i18n';
-
-import FetchData from 'components/FetchData.vue';
-import FormModel from 'components/FormModel.vue';
-import VnRow from 'components/ui/VnRow.vue';
-import VnSelect from 'src/components/common/VnSelect.vue';
-import VnLocation from 'src/components/common/VnLocation.vue';
-import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
-
-const { t } = useI18n();
-
-const initialData = reactive({
- active: true,
- isEqualizated: false,
-});
-
-const workersOptions = ref([]);
-const businessTypesOptions = ref([]);
-
-function handleLocation(data, location) {
- const { town, code, provinceFk, countryFk } = location ?? {};
- data.postcode = code;
- data.city = town;
- data.provinceFk = provinceFk;
- data.countryFk = countryFk;
-}
-
-
-
- (workersOptions = data)"
- auto-load
- url="Workers/search?departmentCodes"
- />
- (businessTypesOptions = data)"
- auto-load
- url="BusinessTypes"
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- handleLocation(data, location)"
- >
-
-
-
-
-
-
-
-
- {{
- t('customer.basicData.youCanSaveMultipleEmails')
- }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-es:
- Comercial name: Nombre comercial
- Salesperson: Comercial
- Business type: Tipo de negocio
- Tax number: NIF / CIF
- Business name: Razón social
- Street: Dirección fiscal
- Postcode: Código postal
- City: Población
- Province: Provincia
- Country: País
- Web user: Usuario web
- Email: Email
- Is equalizated: Recargo de equivalencia
-
diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue
index 1c5a08304ef..2ace6dd02a1 100644
--- a/src/pages/Customer/CustomerFilter.vue
+++ b/src/pages/Customer/CustomerFilter.vue
@@ -3,7 +3,6 @@ import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
import VnSelect from 'components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
-import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
const { t } = useI18n();
defineProps({
@@ -65,22 +64,15 @@ const exprBuilder = (param, value) => {
-
@@ -164,7 +156,6 @@ en:
params:
search: Contains
fi: FI
- salesPersonFk: Salesperson
provinceFk: Province
isActive: Is active
city: City
@@ -191,7 +182,6 @@ es:
sageTaxTypeFk: Tipo de impuesto Sage
sageTransactionTypeFk: Tipo de impuesto Sage
payMethodFk: Forma de pago
- salesPersonFk: Comercial
provinceFk: Provincia
city: Ciudad
phone: Teléfono
@@ -201,7 +191,6 @@ es:
name: Nombre
postcode: CP
FI: NIF
- Salesperson: Comercial
Province: Provincia
City: Ciudad
Phone: Teléfono
diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue
index 0bfca7910a3..b721a6ad914 100644
--- a/src/pages/Customer/CustomerList.vue
+++ b/src/pages/Customer/CustomerList.vue
@@ -10,7 +10,6 @@ import CustomerFilter from './CustomerFilter.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import VnLocation from 'src/components/common/VnLocation.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
-import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
import VnSection from 'src/components/common/VnSection.vue';
const { t } = useI18n();
@@ -73,30 +72,17 @@ const columns = computed(() => [
},
{
align: 'left',
- name: 'salesPersonFk',
- label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
+ name: 'departmentFk',
+ label: t('customer.summary.team'),
component: 'select',
attrs: {
- url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name', 'firstName'],
- where: { role: 'salesPerson' },
- optionFilter: 'firstName',
+ url: 'Departments',
},
- columnFilter: {
- component: 'select',
- attrs: {
- url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name', 'firstName'],
- where: { role: 'salesPerson' },
- optionLabel: 'firstName',
- optionValue: 'id',
- },
- },
- create: false,
+ create: true,
columnField: {
component: null,
},
- format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
+ format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
},
{
align: 'left',
@@ -155,6 +141,9 @@ const columns = computed(() => [
inWhere: true,
},
columnClass: 'expand',
+ attrs: {
+ uppercase: true,
+ },
},
{
align: 'left',
@@ -446,36 +435,6 @@ function handleLocation(data, location) {
redirect="customer"
>
-
-
-
-
-
-
-
- {{ scope.opt?.name }}
- {{ scope.opt?.nickname }},
- {{ scope.opt?.code }}
-
-
-
-
[
},
},
},
- {
- align: 'left',
- name: 'isWorker',
- label: t('Is worker'),
- },
- {
- align: 'left',
- name: 'salesPersonFk',
- label: t('Salesperson'),
- columnFilter: {
- component: 'select',
- attrs: {
- url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name'],
- where: { role: 'salesPerson' },
- useLike: false,
- optionValue: 'id',
- optionLabel: 'name',
- optionFilter: 'firstName',
- },
- },
- },
{
align: 'left',
name: 'departmentFk',
@@ -153,6 +131,11 @@ const columns = computed(() => [
label: t('Has recovery'),
name: 'hasRecovery',
},
+ {
+ align: 'left',
+ name: 'isWorker',
+ label: t('customer.params.isWorker'),
+ },
]);
const viewAddObservation = (rowsSelected) => {
@@ -167,7 +150,6 @@ const viewAddObservation = (rowsSelected) => {
function exprBuilder(param, value) {
switch (param) {
- case 'salesPersonFk':
case 'creditInsurance':
case 'countryFk':
return { [`c.${param}`]: value };
@@ -176,7 +158,7 @@ function exprBuilder(param, value) {
case 'workerFk':
return { [`co.${param}`]: value };
case 'departmentFk':
- return { [`wd.${param}`]: value };
+ return { [`c.${param}`]: value };
case 'amount':
case 'clientFk':
return { [`d.${param}`]: value };
@@ -241,12 +223,6 @@ function exprBuilder(param, value) {
-
-
- {{ row.salesPersonName }}
-
-
-
{{ row.departmentName }}
@@ -265,8 +241,6 @@ function exprBuilder(param, value) {
es:
Add observation: Añadir observación
Client: Cliente
- Is worker: Es trabajador
- Salesperson: Comercial
Department: Departamento
Country: País
P. Method: F. Pago
@@ -281,5 +255,5 @@ es:
Credit I.: Crédito A.
Credit insurance: Crédito asegurado
From: Desde
- Has recovery: Tiene recobro
+ Has recovery: Recobro
diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue
index ce86c6435cd..0eab7b7c557 100644
--- a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue
+++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue
@@ -15,19 +15,12 @@ const props = defineProps({
},
});
-const salespersons = ref();
const countries = ref();
const authors = ref();
const departments = ref();
- (salespersons = data)"
- auto-load
- url="Workers/activeWithInheritedRole"
- />
(countries = data)" auto-load url="Countries" />
(authors = data)"
@@ -62,29 +55,6 @@ const departments = ref();
@update:model-value="searchFn()"
/>
-
-
-
-
-
-
-
-
[
},
{
align: 'left',
- label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
- name: 'salesPersonFk',
+ name: 'departmentFk',
+ label: t('customer.summary.team'),
component: 'select',
attrs: {
- url: 'Workers/activeWithInheritedRole',
- fields: ['id', 'name'],
- where: { role: 'salesPerson' },
- optionFilter: 'firstName',
- useLike: false,
+ url: 'Departments',
},
- visible: false,
+ columnField: {
+ component: null,
+ },
+ format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
},
]);
@@ -96,7 +95,7 @@ const columns = computed(() => [
-
+
{
:required="true"
/>
-
+
{
:positive="false"
/>
-
+
{
:options="companiesOptions"
option-value="id"
option-label="code"
+ sort-by="code"
map-options
hide-selected
:required="true"
/>
-
+
{
:options="currenciesOptions"
option-value="id"
option-label="code"
+ sort-by="code"
/>
-
+
{
:decimal-places="2"
:positive="false"
/>
+
-
+
{
fill-input
/>
-
-
-
-
+
-
+
+ parseFloat(row['price2']).toFixed(2),
@@ -320,7 +291,9 @@ const columns = [
label: t('Box'),
name: 'price3',
component: 'number',
- createDisable: true,
+ createAttrs: {
+ disable: true,
+ },
cellEvent: {
'update:modelValue': async (value, oldValue, row) => {
row['price2'] = row['price2'] * (value / oldValue);
@@ -340,13 +313,6 @@ const columns = [
toggleIndeterminate: false,
},
component: 'checkbox',
- cellEvent: {
- 'update:modelValue': async (value, oldValue, row) => {
- await axios.patch(`Items/${row['itemFk']}`, {
- hasMinPrice: value,
- });
- },
- },
width: '25px',
},
{
@@ -356,13 +322,6 @@ const columns = [
toolTip: t('Minimum price'),
name: 'minPrice',
component: 'number',
- cellEvent: {
- 'update:modelValue': async (value, oldValue, row) => {
- await axios.patch(`Items/${row['itemFk']}`, {
- minPrice: value,
- });
- },
- },
width: '35px',
style: (row) => {
if (!row?.hasMinPrice) return { color: 'var(--vn-label-color)' };
@@ -425,6 +384,23 @@ const columns = [
},
},
];
+const buyerFk = ref(null);
+const itemTypeFk = ref(null);
+const inkFk = ref(null);
+const tag1 = ref(null);
+const tag2 = ref(null);
+const tag1Filter = ref(null);
+const tag2Filter = ref(null);
+const filter = computed(() => {
+ const where = {};
+ where.workerFk = buyerFk.value;
+ where.itemTypeFk = itemTypeFk.value;
+ where.inkFk = inkFk.value;
+ where.tag1 = tag1.value;
+ where.tag2 = tag2.value;
+
+ return { where };
+});
function getQuantityStyle(row) {
if (row?.quantity !== row?.stickers * row?.packing)
@@ -610,6 +586,7 @@ onMounted(() => {
:url="`Entries/${entityId}/getBuyList`"
search-url="EntryBuys"
save-url="Buys/crud"
+ :filter="filter"
:disable-option="{ card: true }"
v-model:selected="selectedRows"
@on-fetch="() => footerFetchDataRef.fetch()"
@@ -655,7 +632,7 @@ onMounted(() => {
:is-editable="editableMode"
:without-header="!editableMode"
:with-filters="editableMode"
- :right-search="editableMode"
+ :right-search="false"
:row-click="false"
:columns="columns"
:beforeSaveFn="beforeSave"
@@ -666,6 +643,46 @@ onMounted(() => {
data-cy="entry-buys"
overlay
>
+
+
+
+
+
+
+
+
+
@@ -696,7 +713,7 @@ onMounted(() => {
- {{ footer?.weight }}
+ {{ footer?.weight }}
@@ -704,9 +721,8 @@ onMounted(() => {
-
- {{ footer?.amount }}
-
+ {{ footer?.amount }} /
+ {{ footer?.checkedAmount }}
{
es:
+ Buyer: Comprador
+ Family: Familia
Article: Artículo
Siz.: Med.
Size: Medida
diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue
index be82289f4a5..50f8b8e554a 100644
--- a/src/pages/Entry/Card/EntryCard.vue
+++ b/src/pages/Entry/Card/EntryCard.vue
@@ -1,10 +1,10 @@
- {
- entryObservationsOptions.value = [...data].sort((a, b) =>
- a.description.localeCompare(b.description),
- );
-};
-
+const entityId = ref(params.id);
const columns = computed(() => [
{
- name: 'observationType',
- label: t('entry.notes.observationType'),
- field: (row) => row.observationTypeFk,
- sortable: true,
- options: entryObservationsOptions.value,
- required: true,
- model: 'observationTypeFk',
- optionValue: 'id',
- optionLabel: 'description',
- tabIndex: 1,
- align: 'left',
+ name: 'id',
+ isId: true,
+ visible: false,
+ isEditable: false,
+ columnFilter: false,
},
{
+ name: 'observationTypeFk',
+ label: t('entry.notes.observationType'),
+ component: 'select',
+ columnFilter: { inWhere: true },
+ attrs: {
+ inWhere: true,
+ url: 'ObservationTypes',
+ fields: ['id', 'description'],
+ optionValue: 'id',
+ optionLabel: 'description',
+ sortBy: 'description',
+ },
+ width: '30px',
+ create: true,
+ },
+ {
+ align: 'left',
name: 'description',
label: t('globals.description'),
- field: (row) => row.description,
- tabIndex: 2,
- align: 'left',
+ component: 'input',
+ columnFilter: false,
+ attrs: { autogrow: true },
+ create: true,
},
]);
+
+const filter = computed(() => ({
+ fields: ['id', 'entryFk', 'observationTypeFk', 'description'],
+ include: ['observationType'],
+ where: { entryFk: entityId },
+}));
- sortEntryObservationOptions(data)"
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
es:
- Add note: Añadir nota
- Remove note: Quitar nota
+ Create note: Crear nota
diff --git a/src/pages/Entry/Card/EntrySummary.vue b/src/pages/Entry/Card/EntrySummary.vue
index c40e2ba46f6..53967e66f07 100644
--- a/src/pages/Entry/Card/EntrySummary.vue
+++ b/src/pages/Entry/Card/EntrySummary.vue
@@ -92,13 +92,13 @@ onMounted(async () => {