From 7a1eb9bec64815ff8187c0cc63dc148ebcfef8e1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 11 Feb 2025 09:28:56 +0100 Subject: [PATCH 01/41] feat: refs #8277 add Entry Control page and update localization files --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 3 +- src/pages/Entry/EntryControl.vue | 146 +++++++++++++++++++++++++++++++ src/router/modules/entry.js | 26 +++--- 4 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 src/pages/Entry/EntryControl.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d615eef4c..fe4a0c45d 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -334,6 +334,7 @@ globals: parking: Parking vehicleList: Vehicles vehicle: Vehicle + entryControl: Entry control unsavedPopup: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index a082ca88d..956f11e15 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -334,6 +334,7 @@ globals: parking: Parking vehicleList: Vehículos vehicle: Vehículo + entryControl: Control de entradas unsavedPopup: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? @@ -653,7 +654,7 @@ supplier: tableVisibleColumns: nif: NIF/CIF account: Cuenta - + summary: responsible: Responsable verified: Verificado diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue new file mode 100644 index 000000000..6fff84539 --- /dev/null +++ b/src/pages/Entry/EntryControl.vue @@ -0,0 +1,146 @@ + + diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index f362c7653..5de296803 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -6,13 +6,7 @@ const entryCard = { component: () => import('src/pages/Entry/Card/EntryCard.vue'), redirect: { name: 'EntrySummary' }, meta: { - menu: [ - 'EntryBasicData', - 'EntryBuys', - 'EntryNotes', - 'EntryDms', - 'EntryLog', - ], + menu: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'], }, children: [ { @@ -91,7 +85,8 @@ export default { 'EntryLatestBuys', 'EntryStockBought', 'EntryWasteRecalc', - ] + 'EntryControl', + ], }, component: RouterView, redirect: { name: 'EntryMain' }, @@ -103,7 +98,7 @@ export default { redirect: { name: 'EntryIndexMain' }, children: [ { - path:'', + path: '', name: 'EntryIndexMain', redirect: { name: 'EntryList' }, component: () => import('src/pages/Entry/EntryList.vue'), @@ -127,7 +122,7 @@ export default { icon: 'add', }, component: () => import('src/pages/Entry/EntryCreate.vue'), - }, + }, { path: 'my', name: 'MyEntries', @@ -164,7 +159,16 @@ export default { }, component: () => import('src/pages/Entry/EntryWasteRecalc.vue'), }, + { + path: 'control', + name: 'EntryControl', + meta: { + title: 'entryControl', + icon: 'help', + }, + component: () => import('src/pages/Entry/EntryControl.vue'), + }, ], }, ], -}; \ No newline at end of file +}; -- 2.40.1 From fa7705d2fc8fb8b1420e5d3d0718b2e7e9ab3db0 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 12 Feb 2025 09:53:43 +0100 Subject: [PATCH 02/41] feat: refs #8277 add control labels and update column definitions in EntryControl component --- src/pages/Entry/EntryControl.vue | 112 ++++++++++++++++--------------- src/pages/Entry/locale/en.yml | 16 +++++ src/pages/Entry/locale/es.yml | 16 +++++ 3 files changed, 91 insertions(+), 53 deletions(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 6fff84539..49ded3186 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -9,6 +9,53 @@ const { t } = useI18n(); const companies = ref([]); const countries = ref([]); const columns = computed(() => [ + { + name: 'companyFk', + label: t('globals.company'), + columnFilter: { + component: 'select', + name: 'companyFk', + optionLabel: 'code', + options: companies.value, + }, + }, + { + name: 'gestDocFk', + label: t('entry.control.gestDocFk'), + }, + { + name: 'dmsType', + label: t('entry.control.dmsType'), + format: (row) => row.dmsType, + }, + { + name: 'invoiceNumber', + label: t('entry.control.invoiceNumber'), + }, + { + name: 'reference', + label: t('entry.control.reference'), + }, + { + name: 'shipped', + label: t('entry.control.shipped'), + }, + { + name: 'dated', + label: t('entry.control.dated'), + }, + { + name: 'id', + label: t('entry.control.id'), + isId: true, + chip: { + condition: () => true, + }, + }, + { + name: 'invoiceInFk', + label: t('entry.control.invoiceInFk'), + }, { name: 'supplierFk', label: t('globals.supplier'), @@ -20,52 +67,6 @@ const columns = computed(() => [ url: 'Suppliers', }, }, - { - name: 'companyFk', - label: t('globals.company'), - columnFilter: { - component: 'select', - name: 'companyFk', - options: companies.value, - }, - }, - { - name: 'gestDocFk', - label: t('entry.gestDocFk'), - }, - { - name: 'dmsType', - label: t('entry.dmsType'), - format: (row) => row.dmsType, - }, - { - name: 'invoiceNumber', - label: t('entry.invoiceNumber'), - }, - { - name: 'reference', - label: t('entry.reference'), - }, - { - name: 'shipped', - label: t('entry.shipped'), - }, - { - name: 'dated', - label: t('entry.dated'), - }, - { - name: 'id', - label: t('entry.id'), - isId: true, - chip: { - condition: () => true, - }, - }, - { - name: 'invoiceInFk', - label: t('entry.invoiceInFk'), - }, { name: 'country', label: t('globals.country'), @@ -82,7 +83,7 @@ const columns = computed(() => [ }, { name: 'payDem', - label: t('entry.payDem'), + label: t('entry.control.payDem'), }, { name: 'amount', @@ -90,11 +91,12 @@ const columns = computed(() => [ }, { name: 'isBooked', - label: t('entry.isBooked'), + label: t('entry.control.isBooked'), }, { name: 'received', - label: t('entry.received'), + label: t('entry.control.received'), + component: 'checkbox' }, // { // name: 'travelFk', @@ -127,13 +129,13 @@ const columns = computed(() => [ [ :columns auto-load :right-search="false" - /> + > + + diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 80f3491a8..6ed918126 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -78,6 +78,22 @@ entry: searchInfo: You can search by entry reference descriptorMenu: showEntryReport: Show entry report + control: + gestDocFk: Gestdoc + dmsType: Gestdoc type + invoiceNumber: Entry ref. + reference: Gestdoc ref. + shipped: Shipped + dated: Landed + id: Entry + invoiceInFk: Invoice in + supplierFk: Supplier + country: Country + description: Entry type + payDem: Payment term + amount: Amount + isBooked: B + received: R entryFilter: params: invoiceNumber: Invoice number diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index a5b968016..3f9a4b8c2 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -79,6 +79,22 @@ entry: showEntryReport: Ver informe del pedido search: Buscar entradas searchInfo: Puedes buscar por referencia de entrada + control: + gestDocFk: Gestdoc + dmsType: Tipo gestdoc + invoiceNumber: Ref. Entrada + reference: Ref. gestdoc + shipped: F. envío + dated: F. llegada + id: Entrada + invoiceInFk: Recibida + supplierFk: Proveedor + country: País + description: Tipo de Entrada + payDem: Plazo de pago + amount: Importe + isBooked: C + received: R entryFilter: params: invoiceNumber: Núm. factura -- 2.40.1 From 1facb04d7a6c84032ebf6b348450bce14d758900 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 12 Feb 2025 18:24:41 +0100 Subject: [PATCH 03/41] feat: refs #8277 update EntryControl component with new column definitions and filters --- src/pages/Entry/EntryControl.vue | 42 +++++++++++++++++++++++--------- src/pages/Entry/locale/en.yml | 5 ++-- src/pages/Entry/locale/es.yml | 5 ++-- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 49ded3186..9354f8b20 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -2,6 +2,7 @@ import { ref, computed, markRaw } from 'vue'; import VnTable from 'src/components/VnTable/VnTable.vue'; import { useI18n } from 'vue-i18n'; +import { toDate, toCurrency } from 'src/filters'; import FetchData from 'src/components/FetchData.vue'; import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue'; @@ -10,7 +11,7 @@ const companies = ref([]); const countries = ref([]); const columns = computed(() => [ { - name: 'companyFk', + name: 'company', label: t('globals.company'), columnFilter: { component: 'select', @@ -26,7 +27,13 @@ const columns = computed(() => [ { name: 'dmsType', label: t('entry.control.dmsType'), - format: (row) => row.dmsType, + columnFilter: { + component: 'select', + label: null, + name: 'dmsType', + url: 'DmsTypes', + fields: ['id', 'name'], + }, }, { name: 'invoiceNumber', @@ -39,10 +46,20 @@ const columns = computed(() => [ { name: 'shipped', label: t('entry.control.shipped'), + format: ({ shipped }, dashIfEmpty) => dashIfEmpty(toDate(shipped)), + columnFilter: { + component: 'date', + name: 'shipped', + }, }, { - name: 'dated', - label: t('entry.control.dated'), + name: 'landed', + label: t('entry.control.landed'), + format: ({ landed }, dashIfEmpty) => dashIfEmpty(toDate(landed)), + columnFilter: { + component: 'date', + name: 'landed', + }, }, { name: 'id', @@ -57,9 +74,9 @@ const columns = computed(() => [ label: t('entry.control.invoiceInFk'), }, { - name: 'supplierFk', + name: 'supplier', label: t('globals.supplier'), - format: (row) => row.supplierFk, + format: (row) => row.supplier, columnFilter: { component: markRaw(VnSelectSupplier), label: null, @@ -70,7 +87,6 @@ const columns = computed(() => [ { name: 'country', label: t('globals.country'), - format: (row) => row.country, columnFilter: { component: 'select', name: 'country', @@ -87,16 +103,18 @@ const columns = computed(() => [ }, { name: 'amount', - label: t('amount'), + label: t('globals.amount'), + format: ({ amount }) => toCurrency(amount), }, { name: 'isBooked', label: t('entry.control.isBooked'), + component: 'checkbox', }, { name: 'received', label: t('entry.control.received'), - component: 'checkbox' + component: 'checkbox', }, // { // name: 'travelFk', @@ -144,9 +162,9 @@ const columns = computed(() => [ :columns auto-load :right-search="false" + :disable-option="{ card: true }" + redirect="Entry" + :order="['landed DESC']" > - diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 119b06c37..bd7c4d002 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -136,15 +136,14 @@ entry: dmsType: Gestdoc type invoiceNumber: Entry ref. reference: Gestdoc ref. - shipped: Shipped - dated: Landed + shipped: Shipped + landed: Landed id: Entry invoiceInFk: Invoice in supplierFk: Supplier country: Country description: Entry type payDem: Payment term - amount: Amount isBooked: B received: R entryFilter: diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 2519ad726..1c19df4c9 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -92,16 +92,15 @@ entry: gestDocFk: Gestdoc dmsType: Tipo gestdoc invoiceNumber: Ref. Entrada - reference: Ref. gestdoc + reference: Ref. GestDoc shipped: F. envío - dated: F. llegada + landed: F. llegada id: Entrada invoiceInFk: Recibida supplierFk: Proveedor country: País description: Tipo de Entrada payDem: Plazo de pago - amount: Importe isBooked: C received: R params: -- 2.40.1 From 234269bdef1eaa71b930866c4eb09f2601ac47e9 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 20 Mar 2025 08:57:13 +0100 Subject: [PATCH 04/41] feat: refs #8277 add entry type selection and localization to EntryControl --- src/pages/Entry/EntryControl.vue | 37 +++++++++++++++++++++++--------- src/pages/Entry/locale/en.yml | 1 + src/pages/Entry/locale/es.yml | 1 + 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 9354f8b20..d833e5c27 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -9,6 +9,7 @@ import VnSelectSupplier from 'src/components/common/VnSelectSupplier.vue'; const { t } = useI18n(); const companies = ref([]); const countries = ref([]); +const entryTypes = ref([]); const columns = computed(() => [ { name: 'company', @@ -81,7 +82,6 @@ const columns = computed(() => [ component: markRaw(VnSelectSupplier), label: null, name: 'supplierFk', - url: 'Suppliers', }, }, { @@ -89,13 +89,21 @@ const columns = computed(() => [ label: t('globals.country'), columnFilter: { component: 'select', - name: 'country', + name: 'countryFk', options: countries.value, }, }, { name: 'description', - label: t('globals.description'), + label: t('entry.control.entryType'), + columnFilter: { + component: 'select', + label: null, + name: 'typeFk', + options: entryTypes.value, + optionLabel: 'description', + optionValue: 'code', + }, }, { name: 'payDem', @@ -105,6 +113,10 @@ const columns = computed(() => [ name: 'amount', label: t('globals.amount'), format: ({ amount }) => toCurrency(amount), + columnFilter: { + component: 'number', + name: 'amount', + }, }, { name: 'isBooked', @@ -129,10 +141,10 @@ const columns = computed(() => [ // label: t('entry.agencyMode'), // format: (row) => row.agencyMode, // }, - // { - // name: 'isAgricultural', - // label: t('entry.isAgricultural'), - // }, + { + name: 'isAgricultural', + label: t('entry.isAgricultural'), + }, // { // name: 'account', // label: t('globals.account'), @@ -156,15 +168,20 @@ const columns = computed(() => [ @on-fetch="(data) => (companies = data)" auto-load /> + - + :right-search="false" + /> diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 7309384e9..90368e4f0 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -133,6 +133,7 @@ entry: payDem: Payment term isBooked: B received: R + entryType: Entry type entryFilter: params: isExcludedFromAvailable: Excluded from available diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 2d58dc49b..6d0afa7e9 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -83,6 +83,7 @@ entry: payDem: Plazo de pago isBooked: C received: R + entryType: Tipo de entrada params: entryFk: Entrada observationTypeFk: Tipo de observación -- 2.40.1 From 9b3fc523770dd529eca609a431008f5d96d93828 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 20 Mar 2025 18:05:17 +0100 Subject: [PATCH 05/41] feat: refs #8277 add agricultural and account type fields, enhance filtering options, and update localization --- src/components/common/VnSelect.vue | 6 +- src/pages/Entry/EntryControl.vue | 147 ++++++++++++++++++++++++----- src/pages/Entry/locale/en.yml | 5 + src/pages/Entry/locale/es.yml | 5 + 4 files changed, 134 insertions(+), 29 deletions(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 339f90e0e..1e4f1589e 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -367,7 +367,7 @@ function getCaption(opt) { > -- 2.40.1 From a92cbeb95db6ac1d0eb1dadcfa28cea2374dac2c Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 1 Apr 2025 17:44:49 +0200 Subject: [PATCH 19/41] refactor(EntryControl): refs #8277 update dmsFk assignment to undefined for clarity --- src/pages/Entry/EntryControl.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 21223dd90..9d19a0382 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -315,7 +315,7 @@ async function createInvoice(isAgricultural) { } finally { table.value.reload(); supplierRef = null; - dmsFk = null; + dmsFk = undefined; selectedRows.value.length = 0; } } -- 2.40.1 From 758ab77f6c6e29e7ec2adbecbd3d3a120015d514 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 1 Apr 2025 18:04:15 +0200 Subject: [PATCH 20/41] refactor(EntryControl): refs #8277 add hasFile property to upload file data structure --- src/pages/Entry/EntryControl.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 9d19a0382..5a73914d1 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -292,6 +292,7 @@ async function uploadFile() { warehouseFk: user.value.warehouseFk, companyFk: companyFk, description: supplier + defaultDmsDescription.value + invoiceNumber, + hasFile: false, }; uploadDialog.value.show(); } -- 2.40.1 From ec19ecdc9837545cf47a0f65be41caed390768e2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 3 Apr 2025 18:09:26 +0200 Subject: [PATCH 21/41] refactor: refs #8277 update account type labels and filter fields in EntryControl.vue --- src/pages/Entry/EntryControl.vue | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryControl.vue index 5a73914d1..ba16db71c 100644 --- a/src/pages/Entry/EntryControl.vue +++ b/src/pages/Entry/EntryControl.vue @@ -171,7 +171,8 @@ const columns = computed(() => [ component: 'select', name: 'accountType', options: entryAccounts.value, - optionLabel: 'account', + optionLabel: 'type', + optionValue: 'code', }, }, { @@ -200,23 +201,6 @@ const columns = computed(() => [ component: 'checkbox', isEditable: false, }, - // { - // name: 'travelFk', - // label: t('entry.travelFk'), - // }, - // { - // name: 'agencyMode', - // label: t('entry.agencyMode'), - // format: (row) => row.agencyMode, - // }, - // { - // name: 'account', - // label: t('globals.account'), - // }, - // { - // name: 'nickname', - // label: t('globals.nickname'), - // }, ]); onBeforeMount(() => { @@ -348,7 +332,7 @@ async function createInvoice(isAgricultural) { /> -- 2.40.1 From a1f93a87b25bad4fe04978ea75c66c73b29c0751 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 4 Apr 2025 12:00:32 +0200 Subject: [PATCH 22/41] refactor: refs #8277 rename entry control to pre-account in localization and routing --- src/i18n/locale/en.yml | 2 +- src/i18n/locale/es.yml | 2 +- .../Entry/{EntryControl.vue => EntryPreAccount.vue} | 0 src/router/modules/entry.js | 12 ++++++------ 4 files changed, 8 insertions(+), 8 deletions(-) rename src/pages/Entry/{EntryControl.vue => EntryPreAccount.vue} (100%) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index d48205ee4..ef9565633 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -341,7 +341,7 @@ globals: parking: Parking vehicleList: Vehicles vehicle: Vehicle - entryControl: Entry control + entryPreAccount: Pre-account unsavedPopup: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index b7ce83875..79688291c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -344,7 +344,7 @@ globals: parking: Parking vehicleList: Vehículos vehicle: Vehículo - entryControl: Control de entradas + entryPreAccount: Precontabilizar unsavedPopup: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? diff --git a/src/pages/Entry/EntryControl.vue b/src/pages/Entry/EntryPreAccount.vue similarity index 100% rename from src/pages/Entry/EntryControl.vue rename to src/pages/Entry/EntryPreAccount.vue diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index a43d16e5d..4567955fe 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -85,7 +85,7 @@ export default { 'EntryLatestBuys', 'EntryStockBought', 'EntryWasteRecalc', - 'EntryControl', + 'EntryPreAccount', ], }, component: RouterView, @@ -95,7 +95,7 @@ export default { name: 'EntryMain', path: '', component: () => import('src/components/common/VnModule.vue'), - props: (route) => ({ leftDrawer: route.name !== 'EntryControl' }), + props: (route) => ({ leftDrawer: route.name !== 'EntryPreAccount' }), redirect: { name: 'EntryIndexMain' }, children: [ { @@ -154,12 +154,12 @@ export default { }, { path: 'control', - name: 'EntryControl', + name: 'EntryPreAccount', meta: { - title: 'entryControl', - icon: 'help', + title: 'entryPreAccount', + icon: 'account_balance', }, - component: () => import('src/pages/Entry/EntryControl.vue'), + component: () => import('src/pages/Entry/EntryPreAccount.vue'), }, ], }, -- 2.40.1 From cd7f9e15fc06d6195ef1f2471a1a071a3e3f3b25 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 4 Apr 2025 12:55:02 +0200 Subject: [PATCH 23/41] refactor: refs #8277 rename dmsType to dmsTypeFk in EntryPreAccount.vue --- src/pages/Entry/EntryPreAccount.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Entry/EntryPreAccount.vue b/src/pages/Entry/EntryPreAccount.vue index ba16db71c..723b0d728 100644 --- a/src/pages/Entry/EntryPreAccount.vue +++ b/src/pages/Entry/EntryPreAccount.vue @@ -93,7 +93,7 @@ const columns = computed(() => [ columnFilter: { component: 'select', label: null, - name: 'dmsType', + name: 'dmsTypeFk', url: 'DmsTypes', fields: ['id', 'name'], }, -- 2.40.1 From f79d7e0d9f9b3f93c14239fb72171378088d9171 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 4 Apr 2025 17:14:42 +0200 Subject: [PATCH 24/41] refactor: refs #8277 rename entry control to pre-account in components and localization --- src/pages/Entry/EntryPreAccount.vue | 45 ++++++++++--------- src/pages/Entry/locale/en.yml | 5 ++- src/pages/Entry/locale/es.yml | 5 ++- src/router/modules/entry.js | 2 +- .../integration/entry/entryPreAccount.spec.js | 30 +++++++++++++ 5 files changed, 61 insertions(+), 26 deletions(-) create mode 100644 test/cypress/integration/entry/entryPreAccount.spec.js diff --git a/src/pages/Entry/EntryPreAccount.vue b/src/pages/Entry/EntryPreAccount.vue index 723b0d728..379abf161 100644 --- a/src/pages/Entry/EntryPreAccount.vue +++ b/src/pages/Entry/EntryPreAccount.vue @@ -54,7 +54,7 @@ let dmsFk; const columns = computed(() => [ { name: 'id', - label: t('entry.control.id'), + label: t('entry.preAccount.id'), isId: true, chip: { condition: () => true, @@ -62,7 +62,7 @@ const columns = computed(() => [ }, { name: 'invoiceNumber', - label: t('entry.control.invoiceNumber'), + label: t('entry.preAccount.invoiceNumber'), }, { name: 'company', @@ -85,11 +85,11 @@ const columns = computed(() => [ }, { name: 'gestDocFk', - label: t('entry.control.gestDocFk'), + label: t('entry.preAccount.gestDocFk'), }, { name: 'dmsType', - label: t('entry.control.dmsType'), + label: t('entry.preAccount.dmsType'), columnFilter: { component: 'select', label: null, @@ -100,11 +100,11 @@ const columns = computed(() => [ }, { name: 'reference', - label: t('entry.control.reference'), + label: t('entry.preAccount.reference'), }, { name: 'shipped', - label: t('entry.control.shipped'), + label: t('entry.preAccount.shipped'), format: ({ shipped }, dashIfEmpty) => dashIfEmpty(toDate(shipped)), columnFilter: { component: 'date', @@ -113,7 +113,7 @@ const columns = computed(() => [ }, { name: 'landed', - label: t('entry.control.landed'), + label: t('entry.preAccount.landed'), format: ({ landed }, dashIfEmpty) => dashIfEmpty(toDate(landed)), columnFilter: { component: 'date', @@ -122,7 +122,7 @@ const columns = computed(() => [ }, { name: 'invoiceInFk', - label: t('entry.control.invoiceInFk'), + label: t('entry.preAccount.invoiceInFk'), }, { name: 'supplier', @@ -146,7 +146,7 @@ const columns = computed(() => [ }, { name: 'description', - label: t('entry.control.entryType'), + label: t('entry.preAccount.entryType'), columnFilter: { component: 'select', label: null, @@ -158,7 +158,7 @@ const columns = computed(() => [ }, { name: 'payDem', - label: t('entry.control.payDem'), + label: t('entry.preAccount.payDem'), columnFilter: { component: 'number', name: 'payDem', @@ -166,7 +166,7 @@ const columns = computed(() => [ }, { name: 'accountType', - label: t('entry.control.accountType'), + label: t('entry.preAccount.accountType'), columnFilter: { component: 'select', name: 'accountType', @@ -186,18 +186,18 @@ const columns = computed(() => [ }, { name: 'isAgricultural', - label: t('entry.control.isAgricultural'), + label: t('entry.preAccount.isAgricultural'), component: 'checkbox', isEditable: false, }, { name: 'isBooked', - label: t('entry.control.isBooked'), + label: t('entry.preAccount.isBooked'), component: 'checkbox', }, { name: 'received', - label: t('entry.control.received'), + label: t('entry.preAccount.received'), component: 'checkbox', isEditable: false, }, @@ -215,7 +215,7 @@ watch(selectedRows, (nVal, oVal) => { if (nVal.length > oVal.length && nVal.at(-1).invoiceInFk) quasar.dialog({ component: VnConfirm, - componentProps: { title: t('entry.control.hasInvoice') }, + componentProps: { title: t('entry.preAccount.hasInvoice') }, }); }); @@ -295,6 +295,7 @@ async function createInvoice(isAgricultural) { dmsFk, isAgricultural, }); + notify(t('entry.preAccount.success'), 'positive'); } catch (e) { throw e; } finally { @@ -352,8 +353,8 @@ async function createInvoice(isAgricultural) {