feat: refs #8398 moveTicketsFuture
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Robert Ferrús 2025-01-15 12:32:46 +01:00
parent 6de8687be1
commit 764eef13c3
2 changed files with 12 additions and 8 deletions

View File

@ -254,12 +254,13 @@ const moveTicketsAdvance = async () => {
} }
continue; continue;
} }
console.log('ticket: ', ticket);
ticketsToMove.push({ ticketsToMove.push({
originId: ticket.futureId, originId: ticket.futureId,
destinationId: ticket.id, destinationId: ticket.id,
originShipped: ticket.futureShipped, originShipped: ticket.futureShipped,
destinationShipped: ticket.shipped, destinationShipped: ticket.shipped,
workerFk: ticket.workerFk, salesPersonFk: ticket.client.salesPersonFk,
}); });
} }

View File

@ -244,13 +244,16 @@ const totalPriceColor = (totalWithVat) =>
isLessThan50(totalWithVat) ? 'warning' : 'transparent'; isLessThan50(totalWithVat) ? 'warning' : 'transparent';
const moveTicketsFuture = async () => { const moveTicketsFuture = async () => {
const ticketsToMove = selectedTickets.value.map((ticket) => ({ const ticketsToMove = selectedTickets.value.map((ticket) => {
console.log('salesPersonFk: ', ticket.client);
return {
originId: ticket.id, originId: ticket.id,
destinationId: ticket.futureId, destinationId: ticket.futureId,
originShipped: ticket.shipped, originShipped: ticket.shipped,
destinationShipped: ticket.futureShipped, destinationShipped: ticket.futureShipped,
workerFk: ticket.workerFk, salesPersonFk: ticket.client.salesPersonFk,
})); };
});
let params = { tickets: ticketsToMove }; let params = { tickets: ticketsToMove };
await axios.post('Tickets/merge', params); await axios.post('Tickets/merge', params);