From a1254b25b4309d32de3ecfb54e0dbc0810d2d736 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 20 Jan 2025 11:26:57 +0100 Subject: [PATCH 1/2] fix: fix ticketSale quantity --- src/pages/Ticket/Card/TicketSale.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 8aa785c74..7a8b4a83d 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -54,7 +54,6 @@ const transfer = ref({ }); const tableRef = ref([]); const canProceed = ref(); -const isLoading = ref(false); watch( () => route.params.id, @@ -197,6 +196,7 @@ const changeQuantity = async (sale) => { try { if (!rowToUpdate.value) return; rowToUpdate.value = null; + sale.isNew = false; await updateQuantity(sale); } catch (e) { const { quantity } = tableRef.value.CrudModelRef.originalData.find( @@ -214,9 +214,6 @@ const updateQuantity = async ({ quantity, id }) => { }; const addSale = async (sale) => { - if (isLoading.value) return; - - isLoading.value = true; const params = { barcode: sale.itemFk, quantity: sale.quantity, @@ -237,6 +234,7 @@ const addSale = async (sale) => { sale.item = newSale.item; notify('globals.dataSaved', 'positive'); + sale.isNew = false; arrayData.fetch({}); }; From a3cdb18535da81554c280e4aa3d424dfd6a03280 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 20 Jan 2025 12:04:59 +0100 Subject: [PATCH 2/2] fix: fix use-like --- src/pages/Ticket/Card/TicketSale.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 7a8b4a83d..b849b3b35 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -752,6 +752,7 @@ watch( option-label="name" option-value="id" v-model="row.itemFk" + :use-like="false" @update:model-value="updateItem(row)" >