From 9207b374197efc7c2a559c8efdde7689bdcec0e3 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 24 Jun 2024 13:46:06 +0200 Subject: [PATCH 01/32] refactor: refs #7014 refactor Main.vue --- src/components/common/VnSectionMain.vue | 17 +++++++++++++++++ src/pages/Account/AccountMain.vue | 14 ++------------ src/pages/Claim/ClaimMain.vue | 14 ++------------ src/pages/Customer/CustomerMain.vue | 14 ++------------ src/pages/Entry/EntryMain.vue | 15 ++------------- src/pages/InvoiceIn/InvoiceInMain.vue | 14 ++------------ src/pages/InvoiceOut/InvoiceOutMain.vue | 14 ++------------ src/pages/Item/ItemMain.vue | 15 ++------------- src/pages/Monitor/MonitorMain.vue | 15 ++------------- src/pages/Order/OrderMain.vue | 14 ++------------ src/pages/Route/RouteMain.vue | 11 ++--------- src/pages/Shelving/ShelvingMain.vue | 14 ++------------ src/pages/Supplier/SupplierMain.vue | 14 ++------------ src/pages/Ticket/TicketMain.vue | 14 ++------------ src/pages/Travel/TravelMain.vue | 14 ++------------ src/pages/Wagon/WagonMain.vue | 14 ++------------ src/pages/Worker/WorkerMain.vue | 14 ++------------ src/pages/Zone/ZoneMain.vue | 13 ++----------- 18 files changed, 51 insertions(+), 203 deletions(-) create mode 100644 src/components/common/VnSectionMain.vue diff --git a/src/components/common/VnSectionMain.vue b/src/components/common/VnSectionMain.vue new file mode 100644 index 000000000..f0dc2e500 --- /dev/null +++ b/src/components/common/VnSectionMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/pages/Account/AccountMain.vue b/src/pages/Account/AccountMain.vue index f0dc2e500..c6a38a77a 100644 --- a/src/pages/Account/AccountMain.vue +++ b/src/pages/Account/AccountMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Claim/ClaimMain.vue b/src/pages/Claim/ClaimMain.vue index f0dc2e500..c6a38a77a 100644 --- a/src/pages/Claim/ClaimMain.vue +++ b/src/pages/Claim/ClaimMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Customer/CustomerMain.vue b/src/pages/Customer/CustomerMain.vue index f0dc2e500..c6a38a77a 100644 --- a/src/pages/Customer/CustomerMain.vue +++ b/src/pages/Customer/CustomerMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Entry/EntryMain.vue b/src/pages/Entry/EntryMain.vue index c1f2a31db..c6a38a77a 100644 --- a/src/pages/Entry/EntryMain.vue +++ b/src/pages/Entry/EntryMain.vue @@ -1,18 +1,7 @@ diff --git a/src/pages/InvoiceIn/InvoiceInMain.vue b/src/pages/InvoiceIn/InvoiceInMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/InvoiceIn/InvoiceInMain.vue +++ b/src/pages/InvoiceIn/InvoiceInMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/InvoiceOut/InvoiceOutMain.vue b/src/pages/InvoiceOut/InvoiceOutMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/InvoiceOut/InvoiceOutMain.vue +++ b/src/pages/InvoiceOut/InvoiceOutMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Item/ItemMain.vue b/src/pages/Item/ItemMain.vue index c1f2a31db..c6a38a77a 100644 --- a/src/pages/Item/ItemMain.vue +++ b/src/pages/Item/ItemMain.vue @@ -1,18 +1,7 @@ diff --git a/src/pages/Monitor/MonitorMain.vue b/src/pages/Monitor/MonitorMain.vue index c1f2a31db..c6a38a77a 100644 --- a/src/pages/Monitor/MonitorMain.vue +++ b/src/pages/Monitor/MonitorMain.vue @@ -1,18 +1,7 @@ diff --git a/src/pages/Order/OrderMain.vue b/src/pages/Order/OrderMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Order/OrderMain.vue +++ b/src/pages/Order/OrderMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Route/RouteMain.vue b/src/pages/Route/RouteMain.vue index bbf19068e..e3d1ecf38 100644 --- a/src/pages/Route/RouteMain.vue +++ b/src/pages/Route/RouteMain.vue @@ -1,6 +1,6 @@ diff --git a/src/pages/Shelving/ShelvingMain.vue b/src/pages/Shelving/ShelvingMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Shelving/ShelvingMain.vue +++ b/src/pages/Shelving/ShelvingMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Supplier/SupplierMain.vue b/src/pages/Supplier/SupplierMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Supplier/SupplierMain.vue +++ b/src/pages/Supplier/SupplierMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Ticket/TicketMain.vue b/src/pages/Ticket/TicketMain.vue index f0dc2e500..c6a38a77a 100644 --- a/src/pages/Ticket/TicketMain.vue +++ b/src/pages/Ticket/TicketMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Travel/TravelMain.vue b/src/pages/Travel/TravelMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Travel/TravelMain.vue +++ b/src/pages/Travel/TravelMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Wagon/WagonMain.vue b/src/pages/Wagon/WagonMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Wagon/WagonMain.vue +++ b/src/pages/Wagon/WagonMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Worker/WorkerMain.vue b/src/pages/Worker/WorkerMain.vue index 66ce78f23..c6a38a77a 100644 --- a/src/pages/Worker/WorkerMain.vue +++ b/src/pages/Worker/WorkerMain.vue @@ -1,17 +1,7 @@ diff --git a/src/pages/Zone/ZoneMain.vue b/src/pages/Zone/ZoneMain.vue index 68ff9a5d1..b6f3fb74e 100644 --- a/src/pages/Zone/ZoneMain.vue +++ b/src/pages/Zone/ZoneMain.vue @@ -1,11 +1,9 @@ - - diff --git a/src/pages/Claim/ClaimMain.vue b/src/pages/Claim/ClaimMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Claim/ClaimMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Customer/CustomerMain.vue b/src/pages/Customer/CustomerMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Customer/CustomerMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Entry/EntryMain.vue b/src/pages/Entry/EntryMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Entry/EntryMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/InvoiceIn/InvoiceInMain.vue b/src/pages/InvoiceIn/InvoiceInMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/InvoiceIn/InvoiceInMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/InvoiceOut/InvoiceOutMain.vue b/src/pages/InvoiceOut/InvoiceOutMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/InvoiceOut/InvoiceOutMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Item/ItemMain.vue b/src/pages/Item/ItemMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Item/ItemMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Monitor/MonitorMain.vue b/src/pages/Monitor/MonitorMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Monitor/MonitorMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Order/OrderMain.vue b/src/pages/Order/OrderMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Order/OrderMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Shelving/ShelvingMain.vue b/src/pages/Shelving/ShelvingMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Shelving/ShelvingMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Supplier/SupplierMain.vue b/src/pages/Supplier/SupplierMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Supplier/SupplierMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Ticket/TicketMain.vue b/src/pages/Ticket/TicketMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Ticket/TicketMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Travel/TravelMain.vue b/src/pages/Travel/TravelMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Travel/TravelMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Wagon/WagonMain.vue b/src/pages/Wagon/WagonMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Wagon/WagonMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/pages/Worker/WorkerMain.vue b/src/pages/Worker/WorkerMain.vue deleted file mode 100644 index c6a38a77a..000000000 --- a/src/pages/Worker/WorkerMain.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js index da45aad2f..b711066b2 100644 --- a/src/router/modules/Supplier.js +++ b/src/router/modules/Supplier.js @@ -29,7 +29,7 @@ export default { { path: '', name: 'SupplierMain', - component: () => import('src/pages/Supplier/SupplierMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'SupplierList' }, children: [ { diff --git a/src/router/modules/account.js b/src/router/modules/account.js index 6f3f8c25b..3faa00fbc 100644 --- a/src/router/modules/account.js +++ b/src/router/modules/account.js @@ -34,7 +34,7 @@ export default { { path: '', name: 'AccountMain', - component: () => import('src/pages/Account/AccountMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'AccountList' }, children: [ { diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js index 65c714418..cced9e24d 100644 --- a/src/router/modules/claim.js +++ b/src/router/modules/claim.js @@ -26,7 +26,7 @@ export default { { name: 'ClaimMain', path: '', - component: () => import('src/pages/Claim/ClaimMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'ClaimList' }, children: [ { diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js index 3aece0dfe..2e4f24d94 100644 --- a/src/router/modules/customer.js +++ b/src/router/modules/customer.js @@ -38,7 +38,7 @@ export default { { path: '', name: 'CustomerMain', - component: () => import('src/pages/Customer/CustomerMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'CustomerList' }, children: [ { diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index 67fc41824..a5d4fc229 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'EntryMain', - component: () => import('src/pages/Entry/EntryMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'EntryList' }, children: [ { diff --git a/src/router/modules/invoiceIn.js b/src/router/modules/invoiceIn.js index 75d0612aa..cd8f7de9c 100644 --- a/src/router/modules/invoiceIn.js +++ b/src/router/modules/invoiceIn.js @@ -25,7 +25,7 @@ export default { { path: '', name: 'InvoiceInMain', - component: () => import('src/pages/InvoiceIn/InvoiceInMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'InvoiceInList' }, children: [ { diff --git a/src/router/modules/invoiceOut.js b/src/router/modules/invoiceOut.js index 7c05b82e6..f3c916281 100644 --- a/src/router/modules/invoiceOut.js +++ b/src/router/modules/invoiceOut.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'InvoiceOutMain', - component: () => import('src/pages/InvoiceOut/InvoiceOutMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'InvoiceOutList' }, children: [ { diff --git a/src/router/modules/item.js b/src/router/modules/item.js index 6e8659747..732997318 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -35,7 +35,7 @@ export default { { path: '', name: 'ItemMain', - component: () => import('src/pages/Item/ItemMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'ItemList' }, children: [ { diff --git a/src/router/modules/monitor.js b/src/router/modules/monitor.js index 6c388a474..f0db8d3f3 100644 --- a/src/router/modules/monitor.js +++ b/src/router/modules/monitor.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'MonitorMain', - component: () => import('src/pages/Monitor/MonitorMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'MonitorList' }, children: [ { diff --git a/src/router/modules/order.js b/src/router/modules/order.js index eb5424e75..15bc98757 100644 --- a/src/router/modules/order.js +++ b/src/router/modules/order.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'OrderMain', - component: () => import('src/pages/Order/OrderMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'OrderList' }, children: [ { diff --git a/src/router/modules/route.js b/src/router/modules/route.js index 8e08d7222..862ec538b 100644 --- a/src/router/modules/route.js +++ b/src/router/modules/route.js @@ -18,7 +18,7 @@ export default { { path: '/route', name: 'RouteMain', - component: () => import('src/pages/Route/RouteMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'RouteList' }, children: [ { diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js index d20ce40f4..70145dfb4 100644 --- a/src/router/modules/shelving.js +++ b/src/router/modules/shelving.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'ShelvingMain', - component: () => import('src/pages/Shelving/ShelvingMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'ShelvingList' }, children: [ { diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 71b926308..a08f16206 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -18,7 +18,7 @@ export default { { name: 'TicketMain', path: '', - component: () => import('src/pages/Ticket/TicketMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'TicketList' }, children: [ { diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js index e1a08e9de..627692be8 100644 --- a/src/router/modules/travel.js +++ b/src/router/modules/travel.js @@ -18,7 +18,7 @@ export default { { path: '', name: 'TravelMain', - component: () => import('src/pages/Travel/TravelMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'TravelList' }, children: [ { diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js index 6f9a4c819..681e9b6a6 100644 --- a/src/router/modules/wagon.js +++ b/src/router/modules/wagon.js @@ -18,7 +18,7 @@ export default { { path: '/wagon', name: 'WagonMain', - component: () => import('src/pages/Wagon/WagonMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'WagonList' }, children: [ { diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 927d11802..36ee55d8e 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -29,7 +29,7 @@ export default { { path: '', name: 'WorkerMain', - component: () => import('src/pages/Worker/WorkerMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'WorkerList' }, children: [ { diff --git a/src/router/modules/zone.js b/src/router/modules/zone.js index fd6fa959b..889b47464 100644 --- a/src/router/modules/zone.js +++ b/src/router/modules/zone.js @@ -29,7 +29,7 @@ export default { { path: '/zone', name: 'ZoneMain', - component: () => import('src/pages/Zone/ZoneMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'ZoneList' }, children: [ { From f596a9b5f74c830b02146a6272e74a89f9cc3434 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 26 Jun 2024 07:26:35 +0200 Subject: [PATCH 03/32] fix: refs #7014 fix wagon module --- src/router/modules/wagon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js index 681e9b6a6..d3d14a888 100644 --- a/src/router/modules/wagon.js +++ b/src/router/modules/wagon.js @@ -62,7 +62,7 @@ export default { { path: '/wagon/type', name: 'WagonTypeMain', - component: () => import('src/pages/Wagon/WagonMain.vue'), + component: () => import('src/components/common/VnSectionMain.vue'), redirect: { name: 'WagonTypeList' }, children: [ { From ccf1603d0283153fc99e8ac79e5dee658f070581 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 4 Jul 2024 17:05:52 +0200 Subject: [PATCH 04/32] fix: refs #6943 prevent undefined --- src/pages/Customer/Card/CustomerCredits.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index 755ba3b9a..3a5045bd7 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -59,7 +59,7 @@ const columns = computed(() => [ }, { align: 'left', - field: (value) => value.worker.user.name, + field: (value) => value?.worker?.user?.name, label: t('Employee'), name: 'employee', }, From 8fbaf43b8280f2cb4b8df9be371d1b547aea4a98 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:04:43 +0200 Subject: [PATCH 05/32] fix: refs #6943 drop padding-left checkbox & create wrap mode vnRow --- src/components/ui/VnRow.vue | 22 +++-- src/pages/Customer/Card/CustomerSummary.vue | 91 +++++++++------------ src/pages/Worker/Card/WorkerSummary.vue | 43 +++++----- 3 files changed, 74 insertions(+), 82 deletions(-) diff --git a/src/components/ui/VnRow.vue b/src/components/ui/VnRow.vue index a2f89ff3f..642adedf1 100644 --- a/src/components/ui/VnRow.vue +++ b/src/components/ui/VnRow.vue @@ -1,18 +1,28 @@ + - diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 86de5217e..15bf19b48 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -9,7 +9,7 @@ import VnLv from 'src/components/ui/VnLv.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import CustomerSummaryTable from 'src/pages/Customer/components/CustomerSummaryTable.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; - +import VnRow from 'src/components/ui/VnRow.vue'; const route = useRoute(); const { t } = useI18n(); @@ -131,41 +131,33 @@ const creditWarning = computed(() => { :url="`#/customer/${entityId}/fiscal-data`" :text="t('customer.summary.fiscalData')" /> - - - - - - - + + + + + + + + + + + + { /> - - + + + - + + - - - - + + + + + + From d5e916ff58d716e7594537c2998a5b5c000b7e3b Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:25:21 +0200 Subject: [PATCH 06/32] refactor: wip use vnTable CustomerCredits --- src/pages/Customer/Card/CustomerCredits.vue | 111 +++++--------------- 1 file changed, 26 insertions(+), 85 deletions(-) diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index 3a5045bd7..9b415a371 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -1,20 +1,14 @@ - - es: Since: Desde From 04422a1052e7ea17e34dfa3f3c131813298dfaff Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:27:02 +0200 Subject: [PATCH 07/32] refactor: #6943 wip use vnTable CustomerCredits --- src/pages/Customer/Card/CustomerCredits.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index 9b415a371..a485a7134 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -37,7 +37,7 @@ const columns = computed(() => [ field: (value) => value?.worker?.user?.name, label: t('Employee'), name: 'employee', - component: QBtn, + component: QBtn, // workerDescriptorProxy is missing attrs: { flat: true, color: 'blue', noCaps: true }, }, { @@ -49,6 +49,7 @@ const columns = computed(() => [ ]); - es: Add observation: Añadir observación @@ -383,4 +277,5 @@ es: Credit I.: Crédito A. Credit insurance: Crédito asegurado From: Desde + Has recovery: Tiene recobro diff --git a/src/pages/Customer/Notifications/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue index f84964600..d380fe8f1 100644 --- a/src/pages/Customer/Notifications/CustomerNotifications.vue +++ b/src/pages/Customer/Notifications/CustomerNotifications.vue @@ -33,24 +33,28 @@ const columns = computed(() => [ }, }, columnClass: 'expand', + isTitle: true, }, { align: 'left', field: 'city', label: t('City'), name: 'city', + cardVisible: true, }, { align: 'left', field: 'phone', label: t('Phone'), name: 'phone', + cardVisible: true, }, { align: 'left', field: 'email', label: t('Email'), name: 'email', + cardVisible: true, }, ]); @@ -78,6 +82,7 @@ const columns = computed(() => [ selection: 'multiple', }" v-model:selected="selected" + :right-search="false" :columns="columns" :use-model="true" auto-load From 08e170bc17c661dd7dad0e180d5dac850ebcf6c8 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 18 Jul 2024 08:31:23 +0200 Subject: [PATCH 15/32] unnecessary test --- .../pages/Customer/CustomerPayments.spec.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js index 13293f596..466a544b4 100644 --- a/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js +++ b/test/vitest/__tests__/pages/Customer/CustomerPayments.spec.js @@ -35,18 +35,4 @@ describe('CustomerPayments', () => { ); }); }); - - describe('stateColor()', () => { - it('should return "positive" when isConfirmed property is truthy', async () => { - const result = await vm.stateColor({ isConfirmed: true }); - - expect(result).toEqual('positive'); - }); - - it('should return "primary" when isConfirmed property is falsy', async () => { - const result = await vm.stateColor({ isConfirmed: false }); - - expect(result).toEqual('primary'); - }); - }); }); From 9b1636355df307af2f6d6a4ffef43ac80eb0b2ec Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Jul 2024 07:58:34 +0200 Subject: [PATCH 16/32] fix: customerNotifications filter --- src/components/VnTable/VnTable.vue | 2 +- src/components/common/VnSelect.vue | 4 +- .../Notifications/CustomerNotifications.vue | 52 +++++-- .../CustomerNotificationsFilter.vue | 145 ------------------ 4 files changed, 39 insertions(+), 164 deletions(-) delete mode 100644 src/pages/Customer/Notifications/CustomerNotificationsFilter.vue diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 430d1cd59..b0601176e 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -355,7 +355,7 @@ defineExpose({ /> diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue index 83bc3b7c5..8e7900652 100644 --- a/src/pages/Route/RouteAutonomous.vue +++ b/src/pages/Route/RouteAutonomous.vue @@ -36,23 +36,20 @@ const tableRef = ref(); const columns = computed(() => [ { align: 'left', - name: 'id', + name: 'routeFk', label: 'Id', chip: { condition: () => true, }, isId: true, + columnFilter: false, }, { align: 'left', name: 'created', label: t('Date'), - component: 'date', - columnFilter: { - alias: 'c', - inWhere: true, - }, - format: ({ date }) => toDate(date), + columnFilter: false, + format: ({ created }) => toDate(created), }, { align: 'left', @@ -66,40 +63,63 @@ const columns = computed(() => [ label: t('Agency agreement'), cardVisible: true, }, + { + align: 'left', + name: 'to', + label: t('To'), + visible: false, + cardVisible: true, + create: true, + component: 'date', + format: ({ date }) => toDate(date), + }, + { + align: 'left', + name: 'from', + label: t('From'), + visible: false, + cardVisible: true, + create: true, + component: 'date', + format: ({ date }) => toDate(date), + }, { align: 'left', name: 'packages', label: t('Packages'), + columnFilter: false, }, { align: 'left', name: 'm3', label: 'm³', cardVisible: true, - columnFilter: { - inWhere: true, - }, + columnFilter: false, }, { align: 'left', name: 'kmTotal', label: t('Km'), cardVisible: true, + columnFilter: false, }, { align: 'left', name: 'price', label: t('Price'), + columnFilter: false, }, { align: 'left', name: 'invoiceInFk', label: t('Received'), + columnFilter: false, }, { align: 'left', name: 'supplierName', label: t('Autonomous'), + columnFilter: false, }, { align: 'right', diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 0f7c06de9..9d8394c4e 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -24,7 +24,6 @@ const selectedRows = ref([]); const tableRef = ref([]); const confirmationDialog = ref(false); const startingDate = ref(null); -const refreshKey = ref(0); const router = useRouter(); const routeFilter = { include: [ @@ -45,9 +44,7 @@ const columns = computed(() => [ condition: () => true, }, isId: true, - columnFilter: { - name: 'search', - }, + columnFilter: false, }, { align: 'left', @@ -107,13 +104,30 @@ const columns = computed(() => [ align: 'left', name: 'created', label: t('Date'), + columnFilter: false, + cardVisible: true, + create: true, + component: 'date', + format: ({ date }) => toDate(date), + }, + { + align: 'left', + name: 'to', + label: t('To'), + visible: false, + cardVisible: true, + create: true, + component: 'date', + format: ({ date }) => toDate(date), + }, + { + align: 'left', + name: 'from', + label: t('From'), + visible: false, cardVisible: true, create: true, component: 'date', - columnFilter: { - alias: 'c', - inWhere: true, - }, format: ({ date }) => toDate(date), }, { @@ -136,18 +150,21 @@ const columns = computed(() => [ name: 'started', label: t('hourStarted'), component: 'time', + columnFilter: false, }, { align: 'left', name: 'finished', label: t('hourFinished'), component: 'time', + columnFilter: false, }, { align: 'left', name: 'isOk', label: t('Served'), component: 'checkbox', + columnFilter: false, }, { align: 'right', @@ -183,8 +200,8 @@ const cloneRoutes = () => { created: startingDate.value, ids: selectedRows.value.map((row) => row?.id), }); - tableRef.value.reload(); startingDate.value = null; + tableRef.value.reload(); }; const showRouteReport = () => { @@ -220,7 +237,7 @@ const openTicketsDialog = (id) => { id, }, }) - .onOk(() => refreshKey.value++); + .onOk(() => tableRef.value.reload()); }; @@ -266,7 +283,6 @@ const openTicketsDialog = (id) => { }" save-url="Routes/crud" :disable-option="{ card: true }" - :use-model="true" table-height="85vh" v-model:selected="selectedRows" :table="{ @@ -332,6 +348,8 @@ en: hourStarted: Started hour hourFinished: Finished hour es: + From: Desde + To: Hasta Worker: Trabajador Agency: Agencia Vehicle: Vehículo diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index 050691af4..306387cbe 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -2,7 +2,7 @@ import { useI18n } from 'vue-i18n'; import { computed, ref } from 'vue'; import { dashIfEmpty } from 'src/filters'; -import { toDate } from 'filters/index'; +import { toDate, toDateHourMin } from 'filters/index'; import { useQuasar } from 'quasar'; import { useSummaryDialog } from 'composables/useSummaryDialog'; import toCurrency from 'filters/toCurrency'; @@ -43,10 +43,9 @@ const columns = computed(() => [ label: t('ETD'), component: 'date', columnFilter: { - alias: 'c', inWhere: true, }, - format: ({ date }) => toDate(date), + format: ({ created }) => toDate(created), cardVisible: true, }, { @@ -200,6 +199,12 @@ function confirmRemove() { }" :disable-option="{ card: true }" > + + - - - From c7d54668e6ea0bdfcd7d7fd0a303e1dbd26d8ddf Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 23 Jul 2024 08:45:54 +0200 Subject: [PATCH 21/32] hotfix(entry_latest-buys): refs #6897 redirect to entry --- src/pages/Entry/EntryLatestBuys.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index 3f199314d..3ce5c4adf 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -1,5 +1,5 @@