0
0
Fork 0

feat: refs #7663 add setWeight menu opt (wip)

This commit is contained in:
Jorge Penadés 2024-08-13 14:57:09 +02:00
parent e0473b589c
commit c8ab5b3bfd
1 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,7 @@ const actions = {
push({ name: 'TicketSummary', params: { id: clonedTicketId } });
}
},
setWeight: async () => {},
remove: async () => {
try {
await axios.post(`Tickets/${ticketId}/setDeleted`);
@ -146,10 +147,15 @@ async function sendSms(body) {
}
function openConfirmDialog(callback) {
const message =
callback == 'setWeight'
? t('Es posible que se facture este ticket, desea continuar?')
: undefined;
dialog({
component: VnConfirm,
componentProps: {
promise: actions[callback],
message,
},
});
}
@ -253,6 +259,12 @@ function openConfirmDialog(callback) {
</QItemSection>
<QItemSection>{{ t('To clone ticket') }}</QItemSection>
</QItem>
<QItem @click="openConfirmDialog('setWeight')" v-ripple clickable>
<QItemSection avatar>
<QIcon name="weight" />
</QItemSection>
<QItemSection>{{ t('Set weight') }}</QItemSection>
</QItem>
<template v-if="!ticket.isDeleted">
<QSeparator />
<QItem @click="openConfirmDialog('remove')" v-ripple clickable>
@ -282,4 +294,6 @@ es:
To clone ticket: Clonar ticket
Ticket cloned: Ticked clonado
It was not able to clone the ticket: No se pudo clonar el ticket
Set weight: Establecer peso
This ticket may be invoiced, do you want to continue?: Es posible que se facture este ticket, desea continuar?
</i18n>