From 40e46f5a72917d6a5b3201eb862aaa714f04dab2 Mon Sep 17 00:00:00 2001 From: pablone Date: Tue, 13 Aug 2024 18:13:46 +0200 Subject: [PATCH 01/46] fix: refs #7830 customer credit --- src/components/FetchData.vue | 2 +- src/pages/Customer/Card/CustomerCreditContracts.vue | 3 +++ src/pages/Customer/Card/CustomerCreditOpinion.vue | 5 +++++ .../Customer/components/CustomerCreditContractsCreate.vue | 6 ++++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue index 2a0864d3e..3038aa88e 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -44,7 +44,7 @@ onMounted(async () => { async function fetch(fetchFilter = {}) { try { - const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys + const filter = { ...fetchFilter, ...$props.filter }; // eslint-disable-line vue/no-dupe-keys if ($props.where && !fetchFilter.where) filter.where = $props.where; if ($props.sortBy) filter.order = $props.sortBy; if ($props.limit) filter.limit = $props.limit; diff --git a/src/pages/Customer/Card/CustomerCreditContracts.vue b/src/pages/Customer/Card/CustomerCreditContracts.vue index 568adcf0b..1110b9f65 100644 --- a/src/pages/Customer/Card/CustomerCreditContracts.vue +++ b/src/pages/Customer/Card/CustomerCreditContracts.vue @@ -53,6 +53,8 @@ const openDialog = (item) => { promise: updateData, }, }); + updateData(); + showQPageSticky.value = true; }; const openViewCredit = (credit) => { @@ -65,6 +67,7 @@ const openViewCredit = (credit) => { }; const updateData = () => { + console.log('entrando'); vnPaginateRef.value?.fetch(); }; diff --git a/src/pages/Customer/Card/CustomerCreditOpinion.vue b/src/pages/Customer/Card/CustomerCreditOpinion.vue index 9c060b1a5..2b85cbd7d 100644 --- a/src/pages/Customer/Card/CustomerCreditOpinion.vue +++ b/src/pages/Customer/Card/CustomerCreditOpinion.vue @@ -71,6 +71,10 @@ watch( clientInformasRef.value?.fetch(); } ); + +const onDataSaved = () => { + clientInformasRef.value?.fetch(); +};