0
0
Fork 0

Fix routes add ticket dialog

This commit is contained in:
Kevin Martinez 2024-02-27 12:41:42 -03:00
parent 3c68f4779f
commit 4be9c02711
1 changed files with 7 additions and 10 deletions

View File

@ -102,16 +102,13 @@ const setTicketsRoute = async () => {
return; return;
} }
const updates = selectedRows.value?.map((ticket) => ({ await Promise.all(
where: { (selectedRows.value || [])
id: ticket.id, .filter((ticket) => ticket?.id)
data: { .map((ticket) =>
routeFk: $props.id, axios.patch(`Routes/${$props.id}/insertTicket`, { ticketId: ticket.id })
}, )
}, );
}));
await axios.post(`Tickets/crud`, { updates });
await axios.post(`Routes/${$props.id}/updateVolume`); await axios.post(`Routes/${$props.id}/updateVolume`);
emit('ok'); emit('ok');
emit('hide'); emit('hide');