From ccf1603d0283153fc99e8ac79e5dee658f070581 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 4 Jul 2024 17:05:52 +0200 Subject: [PATCH 01/14] 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', }, -- 2.40.1 From 8fbaf43b8280f2cb4b8df9be371d1b547aea4a98 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:04:43 +0200 Subject: [PATCH 02/14] 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')" /> - - - - - - - + + + + + + + + + + + + { /> - - + + + - + + - - - - + + + + + + -- 2.40.1 From d5e916ff58d716e7594537c2998a5b5c000b7e3b Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:25:21 +0200 Subject: [PATCH 03/14] 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 -- 2.40.1 From 04422a1052e7ea17e34dfa3f3c131813298dfaff Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 5 Jul 2024 12:27:02 +0200 Subject: [PATCH 04/14] 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 -- 2.40.1 From 08e170bc17c661dd7dad0e180d5dac850ebcf6c8 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 18 Jul 2024 08:31:23 +0200 Subject: [PATCH 12/14] 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'); - }); - }); }); -- 2.40.1 From 9b1636355df307af2f6d6a4ffef43ac80eb0b2ec Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 19 Jul 2024 07:58:34 +0200 Subject: [PATCH 13/14] 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({ />