From c21afccf7533955dfad64ea6ef85178481560291 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Mon, 8 Jan 2024 14:25:21 -0500 Subject: [PATCH 1/2] Se crea el formulario para agregar nuevas observaciones en la tablade morosos --- .../Customer/Defaulter/CustomerDefaulter.vue | 44 +++++++---- .../CustomerDefaulterAddObservation.vue | 79 +++++++++++++++++++ 2 files changed, 108 insertions(+), 15 deletions(-) create mode 100644 src/pages/Customer/Defaulter/CustomerDefaulterAddObservation.vue diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index d54d5df35..aff57318f 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -2,7 +2,7 @@ import { ref, computed, onBeforeMount } from 'vue'; import { useI18n } from 'vue-i18n'; -import { QBtn, QCheckbox } from 'quasar'; +import { QBtn, QCheckbox, useQuasar } from 'quasar'; import { toCurrency, toDate } from 'filters/index'; import { useArrayData } from 'composables/useArrayData'; @@ -12,12 +12,19 @@ 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'; +import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue'; const { t } = useI18n(); const stateStore = useStateStore(); +const quasar = useQuasar(); const arrayData = ref(null); const balanceDueTotal = ref(0); +const customerId = ref(0); +const selected = ref([]); +const workerId = ref(0); + +const rows = computed(() => arrayData.value.store.data); onBeforeMount(async () => { arrayData.value = useArrayData('CustomerDefaulter', { @@ -31,16 +38,9 @@ onBeforeMount(async () => { }, 0 ); - console.log(balanceDueTotal.value); stateStore.rightDrawer = true; }); -const rows = computed(() => arrayData.value.store.data); - -const selected = ref([]); -const workerId = ref(0); -const customerId = ref(0); - const tableColumnComponents = { client: { component: QBtn, @@ -49,11 +49,10 @@ const tableColumnComponents = { }, isWorker: { component: QCheckbox, - props: ({ value }) => ({ + props: ({ row }) => ({ disable: true, - 'model-value': Boolean(value), + 'model-value': Boolean(row.selected), }), - event: () => {}, }, salesperson: { component: QBtn, @@ -180,6 +179,15 @@ const selectWorkerId = (id) => { customerId.value = 0; workerId.value = id; }; + +const viewAddObservation = (rowsSelected) => { + quasar.dialog({ + component: CustomerDefaulterAddObservation, + componentProps: { + clients: rowsSelected, + }, + }); +};