fix: redirect to Ticketsale when confirming an order
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jon Elias 2025-01-20 08:01:46 +01:00
parent 1f76d572ce
commit 3b9ccab48c
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 } }) },
});
}
}