forked from verdnatura/salix-front
feat: refs #7663 add setWeight menu opt (wip)
This commit is contained in:
parent
e0473b589c
commit
c8ab5b3bfd
|
@ -44,6 +44,7 @@ const actions = {
|
||||||
push({ name: 'TicketSummary', params: { id: clonedTicketId } });
|
push({ name: 'TicketSummary', params: { id: clonedTicketId } });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setWeight: async () => {},
|
||||||
remove: async () => {
|
remove: async () => {
|
||||||
try {
|
try {
|
||||||
await axios.post(`Tickets/${ticketId}/setDeleted`);
|
await axios.post(`Tickets/${ticketId}/setDeleted`);
|
||||||
|
@ -146,10 +147,15 @@ async function sendSms(body) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function openConfirmDialog(callback) {
|
function openConfirmDialog(callback) {
|
||||||
|
const message =
|
||||||
|
callback == 'setWeight'
|
||||||
|
? t('Es posible que se facture este ticket, desea continuar?')
|
||||||
|
: undefined;
|
||||||
dialog({
|
dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
promise: actions[callback],
|
promise: actions[callback],
|
||||||
|
message,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -253,6 +259,12 @@ function openConfirmDialog(callback) {
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
<QItemSection>{{ t('To clone ticket') }}</QItemSection>
|
<QItemSection>{{ t('To clone ticket') }}</QItemSection>
|
||||||
</QItem>
|
</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">
|
<template v-if="!ticket.isDeleted">
|
||||||
<QSeparator />
|
<QSeparator />
|
||||||
<QItem @click="openConfirmDialog('remove')" v-ripple clickable>
|
<QItem @click="openConfirmDialog('remove')" v-ripple clickable>
|
||||||
|
@ -282,4 +294,6 @@ es:
|
||||||
To clone ticket: Clonar ticket
|
To clone ticket: Clonar ticket
|
||||||
Ticket cloned: Ticked clonado
|
Ticket cloned: Ticked clonado
|
||||||
It was not able to clone the ticket: No se pudo clonar el ticket
|
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>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue