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

This commit is contained in:
Alexandre Riera 2022-11-15 13:06:10 +01:00
commit 607f61092a
4 changed files with 10 additions and 6 deletions

View File

@ -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}}})"
}

View File

@ -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}}})"
}

View File

@ -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;

View File

@ -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();