From 9ea9239250ba209a644057b4be5102b631f3935d Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 18 Nov 2024 10:41:25 +0100 Subject: [PATCH 1/3] fix: customerSummary balanceDue label value --- src/pages/Customer/Card/CustomerSummary.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index 8b5f0f2c2..62792a5c2 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -4,7 +4,7 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; -import { toCurrency, toPercentage, toDate } from 'src/filters'; +import { toCurrency, toPercentage, toDate, dashOrCurrency } from 'src/filters'; import CardSummary from 'components/ui/CardSummary.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; @@ -25,16 +25,16 @@ const $props = defineProps({ const entityId = computed(() => $props.id || route.params.id); const customer = computed(() => summary.value.entity); const summary = ref(); - +const defaulterAmount = computed(() => customer.value.defaulters[0]?.amount); const balanceDue = computed(() => { - return ( - customer.value && - customer.value.defaulters.length && - customer.value.defaulters[0].amount - ); + const amount = defaulterAmount.value; + if (!amount || amount < 0) { + return null; + } + return amount; }); -const balanceDueWarning = computed(() => (balanceDue.value ? 'negative' : '')); +const balanceDueWarning = computed(() => (defaulterAmount.value ? 'negative' : '')); const claimRate = computed(() => { return customer.value.claimsRatio?.claimingRate ?? 0; @@ -281,7 +281,7 @@ const sumRisk = ({ clientRisks }) => { From 09aad5914fb7b9a253d74cb48d43df36f881da27 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 18 Nov 2024 10:49:30 +0100 Subject: [PATCH 2/3] feat(TicketSummary): add ticketDescritporMenu --- src/components/ui/CardSummary.vue | 2 +- .../Ticket/Card/TicketDescriptorMenu.vue | 32 ++++++------ src/pages/Ticket/Card/TicketSummary.vue | 49 ++++++++++++------- 3 files changed, 50 insertions(+), 33 deletions(-) diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 11dcbee3b..9bc1cec7b 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -98,7 +98,7 @@ function existSummary(routes) { - + diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index bf4a1efb4..9ee22dad2 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -1,6 +1,6 @@