From 209814e477825b6580b3ab205e1912c01a3439d6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 18 Feb 2025 12:12:37 +0100 Subject: [PATCH] fix: trycatch --- src/pages/Ticket/Negative/TicketLackTable.vue | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/pages/Ticket/Negative/TicketLackTable.vue b/src/pages/Ticket/Negative/TicketLackTable.vue index 80c8b47cb..bf20a8c86 100644 --- a/src/pages/Ticket/Negative/TicketLackTable.vue +++ b/src/pages/Ticket/Negative/TicketLackTable.vue @@ -132,27 +132,22 @@ const getInputEvents = ({ col, ...rows }) => ({ 'keyup.enter': () => saveChange(col.name, rows), }); const saveChange = async (field, { row }) => { - try { - switch (field) { - case 'alertLevelCode': - await axios.post(`Tickets/state`, { - ticketFk: row.ticketFk, - code: row[field], - }); - break; + switch (field) { + case 'alertLevelCode': + await axios.post(`Tickets/state`, { + ticketFk: row.ticketFk, + code: row[field], + }); + break; - case 'quantity': - await axios.post(`Sales/${row.saleFk}/updateQuantity`, { - quantity: +row.quantity, - }); - break; - } - notify('globals.dataSaved', 'positive'); - fetchItemLack.value.fetch(); - } catch (err) { - console.error('Error saving changes', err); - f; + case 'quantity': + await axios.post(`Sales/${row.saleFk}/updateQuantity`, { + quantity: +row.quantity, + }); + break; } + notify('globals.dataSaved', 'positive'); + fetchItemLack.value.fetch(); }; function onBuysFetched(data) {