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
Showing only changes of commit 3b9ccab48c - Show all commits

View File

@ -208,15 +208,28 @@ async function remove(item) {
async function handleConfirm() { async function handleConfirm() {
const result = await confirm(route.params.id); const result = await confirm(route.params.id);
if (result) { 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({ quasar.notify({
message: t('globals.dataSaved'), message: t('globals.dataSaved'),
type: 'positive', type: 'positive',
}); });
router.push({ router.push({
name: 'TicketSale', name: 'TicketSale',
query: { params: { id: ticket.data[0].ticketFk },
table: JSON.stringify({ id: route.params.id }), query: { table: JSON.stringify({ filter: { limit: 20, skip: 0 } }) },
},
}); });
} }
} }