refactor(ticketTracking.create): refs #6366 unify Ticket.state ticketTracking.create i vn.ticket_setState #1838
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1838
Loading…
Reference in New Issue
No description provided.
Delete Branch "6366-unifyTicketChangeState"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: refactor(ticketTracking.create): refs #6366 unify Ticket.state ticketTracking.create i vn.ticket_setStateto refactor(ticketTracking.create): refs #6366 unify Ticket.state ticketTracking.create i vn.ticket_setState@ -134,0 +136,4 @@
code: 'DELIVERED'
}
}, options);
if (!deliveryState)
Este if no el acabe de vore.
@ -66,3 +61,1 @@
let oldStateAllowed;
if (ticketState)
oldStateAllowed = await models.State.isEditable(ctx, ticketState.stateFk, myOptions);
const oldStateAllowed = ticketState ?
const oldStateAllowed = ticketState && await models.State.isEditable(ctx, ticketState.stateFk, myOptions);
@ -71,3 +67,1 @@
const isAllowed = (!ticketState || oldStateAllowed == true) && newStateAllowed == true;
if (!isAllowed)
if (!((!ticketState || oldStateAllowed == true) && newStateAllowed == true))
Crec que queda mes simple com:
if ((ticketState && !oldStateAllowed) || !newStateAllowed)
@ -297,6 +297,7 @@
"Invalid NIF for VIES": "Invalid NIF for VIES",
"Ticket does not exist": "Este ticket no existe",
"Ticket is already signed": "Este ticket ya ha sido firmado",
"The DELIVERED state does not exist": "El estado DELIVERED no existe",
Borrar
borrado
Falta quitar la traduccion, lo demas bien