From ead8bb4992ed059be55c6b91696f142cdded94d7 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Wed, 3 Jan 2024 14:53:01 -0500 Subject: [PATCH] Se definen los iconos de las tarjetas en summary y se organiza cabeceras de tablas --- src/i18n/en/index.js | 2 +- .../Defaulter/CustomerBalanceDueTotal.vue | 54 +++++++++++++++++++ .../Customer/Defaulter/CustomerDefaulter.vue | 20 ++++--- .../Notifications/CustomerNotifications.vue | 5 -- src/router/modules/customer.js | 26 ++++----- 5 files changed, 81 insertions(+), 26 deletions(-) create mode 100644 src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 49a475b9e..a1811df4e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -130,7 +130,7 @@ export default { log: 'Log', sms: 'Sms', creditManagement: 'Credit management', - others: 'Other', + others: 'Others', }, list: { phone: 'Phone', diff --git a/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue new file mode 100644 index 000000000..dfbaf8ad4 --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerBalanceDueTotal.vue @@ -0,0 +1,54 @@ + + + + + + + +es: + Total: Total + Balance due: Saldo vencido + diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index b35980416..15bfd84eb 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -4,11 +4,12 @@ import { useI18n } from 'vue-i18n'; import { QBtn, QCheckbox } from 'quasar'; +import { toCurrency, toDate } from 'filters/index'; import { useArrayData } from 'composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; -import { toCurrency, toDate } from 'filters/index'; import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue'; +import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; @@ -16,6 +17,7 @@ const { t } = useI18n(); const stateStore = useStateStore(); const arrayData = ref(null); +const balanceDueTotal = ref(0); onBeforeMount(async () => { arrayData.value = useArrayData('CustomerDefaulter', { @@ -23,6 +25,13 @@ onBeforeMount(async () => { limit: 0, }); await arrayData.value.fetch({ append: false }); + balanceDueTotal.value = arrayData.value.store.data.reduce( + (accumulator, currentValue) => { + return accumulator + (currentValue['amount'] || 0); + }, + 0 + ); + console.log(balanceDueTotal.value); stateStore.rightDrawer = true; }); @@ -188,7 +197,9 @@ const selectAuthorId = (id) => { -
+
+ +
@@ -204,11 +215,6 @@ const selectAuthorId = (id) => { selection="multiple" v-model:selected="selected" > -