Hotfix: Redirect to Ticketsale when confirming an order #1245

Merged
jon merged 2 commits from Hotfix-RedirectOrderToTicketSale into master 2025-01-20 07:07:31 +00:00
1 changed files with 16 additions and 3 deletions

View File

@ -208,15 +208,28 @@ async function remove(item) {
async function handleConfirm() {
const result = await confirm(route.params.id);
if (result) {
const sale = await axios.get(`OrderRows`, {
params: {
filter: JSON.stringify({
where: { orderFk: route.params.id },
}),
},
});
const ticket = await axios.get(`Sales`, {
params: {
filter: JSON.stringify({
where: { id: sale.data[0].saleFk },
}),
},
});
quasar.notify({
message: t('globals.dataSaved'),
type: 'positive',
});
router.push({
name: 'TicketSale',
query: {
table: JSON.stringify({ id: route.params.id }),
},
params: { id: ticket.data[0].ticketFk },
query: { table: JSON.stringify({ filter: { limit: 20, skip: 0 } }) },
});
}
}