From a91a0146fe294d01717a394380e94a9bc9362a35 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 27 Mar 2025 13:03:21 +0100 Subject: [PATCH 1/2] fix: hasChanges --- src/pages/Ticket/Card/TicketSale.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 2fb305cc3..666b5fefe 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -187,7 +187,9 @@ const getRowUpdateInputEvents = (sale) => { const resetChanges = async () => { arrayData.fetch({ append: false }); + tableRef.value.CrudModelRef.hasChanges = false; tableRef.value.reload(); + selectedRows.value = []; }; const changeQuantity = async (sale) => { @@ -390,7 +392,7 @@ const changeTicketState = async (val) => { const params = { ticketFk: route.params.id, code: val }; await axios.post('Tickets/state', params); notify('globals.dataSaved', 'positive'); - await resetChanges(); + resetChanges(); }; const removeSelectedSales = () => { -- 2.40.1 From 6e84341aeade6662684dcbb3292d5bcf3fab8b3e Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 27 Mar 2025 13:06:29 +0100 Subject: [PATCH 2/2] perf: add await --- src/pages/Ticket/Card/TicketSale.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 666b5fefe..96a2dc43f 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -188,7 +188,7 @@ const getRowUpdateInputEvents = (sale) => { const resetChanges = async () => { arrayData.fetch({ append: false }); tableRef.value.CrudModelRef.hasChanges = false; - tableRef.value.reload(); + await tableRef.value.reload(); selectedRows.value = []; }; -- 2.40.1