diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 674924a29..307f34dc2 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -340,24 +340,20 @@ async function makeInvoice(ticket) { }); } -async function sendDocuware(ticket) { - try { - let ticketIds = ticket.map((item) => item.id); +async function sendDocuware(tickets) { + let ticketIds = tickets.map((item) => item.id); - const { data } = await axios.post(`Docuwares/upload-delivery-note`, { - ticketIds, - }); + const { data } = await axios.post(`Docuwares/upload-delivery-note`, { + ticketIds, + }); - for (let ticket of ticketIds) { - ticket.stateFk = data.id; - ticket.state = data.name; - ticket.alertLevel = data.alertLevel; - ticket.alertLevelCode = data.code; - } - notify('globals.dataSaved', 'positive'); - } catch (err) { - console.err('err: ', err); + for (let ticket of tickets) { + ticket.stateFk = data.id; + ticket.state = data.name; + ticket.alertLevel = data.alertLevel; + ticket.alertLevelCode = data.code; } + notify('globals.dataSaved', 'positive'); } function openBalanceDialog(ticket) {