Merge branch '4700-split-tour' of https://gitea.verdnatura.es/verdnatura/salix into 3963-ticket-advance
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
607f61092a
|
@ -137,5 +137,5 @@
|
|||
"Claim pickup order sent": "Claim pickup order sent [({{claimId}})]({{{claimUrl}}}) to client *{{clientName}}*",
|
||||
"You don't have grant privilege": "You don't have grant privilege",
|
||||
"You don't own the role and you can't assign it to another user": "You don't own the role and you can't assign it to another user",
|
||||
"MOVE_TICKET_CONFIRMATION": "Ticket {{id}} ({{originDated}}) merged with {{tfId}} ({{futureDated}}) [{{fullPath}}]"
|
||||
"MOVE_TICKET_CONFIRMATION": "Ticket [{{id}}]({{{fullPath}}}) ({{{originDated}}}) merged with [{{tfId}}]({{{fullPathFuture}}}) ({{{futureDated}}})"
|
||||
}
|
||||
|
|
|
@ -240,5 +240,5 @@
|
|||
"Claim pickup order sent": "Reclamación Orden de recogida enviada [({{claimId}})]({{{claimUrl}}}) al cliente *{{clientName}}*",
|
||||
"You don't have grant privilege": "No tienes privilegios para dar privilegios",
|
||||
"You don't own the role and you can't assign it to another user": "No eres el propietario del rol y no puedes asignarlo a otro usuario",
|
||||
"MOVE_TICKET_CONFIRMATION": "Ticket {{id}} ({{originDated}}) fusionado con {{tfId}} ({{futureDated}}) [{{fullPath}}]"
|
||||
"MOVE_TICKET_CONFIRMATION": "Ticket [{{id}}]({{{fullPath}}}) ({{{originDated}}}) fusionado con [{{tfId}}]({{{fullPathFuture}}}) ({{{futureDated}}})"
|
||||
}
|
||||
|
|
|
@ -203,8 +203,10 @@ module.exports = Self => {
|
|||
if (hasWhere) {
|
||||
filter = mergeFilters(filter, { where: problems });
|
||||
}
|
||||
stmt.merge(conn.makeWhere(filter.where));
|
||||
|
||||
stmt.merge(conn.makeWhere(filter.where));
|
||||
stmt.merge(conn.makeOrderBy(filter.order));
|
||||
stmt.merge(conn.makeLimit(filter));
|
||||
|
||||
const ticketsIndex = stmts.push(stmt) - 1;
|
||||
|
||||
|
|
|
@ -38,18 +38,20 @@ module.exports = Self => {
|
|||
|
||||
try {
|
||||
for (let ticket of tickets) {
|
||||
const fullPath = `${origin}/#!/ticket/${ticket.ticketFuture}/summary`;
|
||||
const fullPath = `${origin}/#!/ticket/${ticket.id}/summary`;
|
||||
const fullPathFuture = `${origin}/#!/ticket/${ticket.ticketFuture}/summary`;
|
||||
const message = $t('MOVE_TICKET_CONFIRMATION', {
|
||||
originDated: new Date(ticket.originETD).toLocaleDateString('es-ES'),
|
||||
futureDated: new Date(ticket.destETD).toLocaleDateString('es-ES'),
|
||||
id: ticket.id,
|
||||
tfId: ticket.ticketFuture,
|
||||
fullPath
|
||||
fullPath,
|
||||
fullPathFuture
|
||||
});
|
||||
if (!ticket.id || !ticket.ticketFuture) continue;
|
||||
await models.Sale.updateAll({ ticketFk: ticket.id }, { ticketFk: ticket.ticketFuture }, myOptions);
|
||||
await models.Ticket.setDeleted(ctx, ticket.id, myOptions);
|
||||
await models.Chat.sendCheckingPresence(ctx, ticket.workerFk, message);
|
||||
await models.Chat.sendCheckingPresence(ctx, 1, message);
|
||||
};
|
||||
if (tx) {
|
||||
await tx.commit();
|
||||
|
|
Loading…
Reference in New Issue