From 320f6afd17c86f8d719687637a6e7d2dc908facf Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 26 Apr 2024 11:27:55 +0200 Subject: [PATCH] fix: CustomerDefaulter --- .../Customer/Defaulter/CustomerDefaulter.vue | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index 5816eb1ec..3daf7ee54 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -3,6 +3,7 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { QBtn, QCheckbox, useQuasar } from 'quasar'; +import { useStateStore } from 'stores/useStateStore'; import { toCurrency, toDate } from 'filters/index'; @@ -14,9 +15,11 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnInput from 'src/components/common/VnInput.vue'; import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue'; +const stateStore = useStateStore(); const { t } = useI18n(); const quasar = useQuasar(); +const dataRef = ref(null); const balanceDueTotal = ref(0); const selected = ref([]); @@ -184,22 +187,45 @@ const viewAddObservation = (rowsSelected) => { }); }; -const refreshData = () => { - setRows(); +const refreshData = async () => { + await dataRef.value.fetch(); }; const onFetch = (data) => { for (const element of data) { element.isWorker = element.businessTypeFk === 'worker'; } - rows.value = data; + setRows(data); }; @@ -289,6 +317,7 @@ const onFetch = (data) => { es: + Add observation: AƱadir observaciĆ³n Client: Cliente Is worker: Es trabajador Salesperson: Comercial