From 764eef13c39b9429f7cb38dfb938853db826783c Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 15 Jan 2025 12:32:46 +0100 Subject: [PATCH 1/2] feat: refs #8398 moveTicketsFuture --- src/pages/Ticket/TicketAdvance.vue | 3 ++- src/pages/Ticket/TicketFuture.vue | 17 ++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 1d88ae3f8..12e94d197 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -254,12 +254,13 @@ const moveTicketsAdvance = async () => { } continue; } + console.log('ticket: ', ticket); ticketsToMove.push({ originId: ticket.futureId, destinationId: ticket.id, originShipped: ticket.futureShipped, destinationShipped: ticket.shipped, - workerFk: ticket.workerFk, + salesPersonFk: ticket.client.salesPersonFk, }); } diff --git a/src/pages/Ticket/TicketFuture.vue b/src/pages/Ticket/TicketFuture.vue index 74c0d3202..41a53aae8 100644 --- a/src/pages/Ticket/TicketFuture.vue +++ b/src/pages/Ticket/TicketFuture.vue @@ -244,13 +244,16 @@ const totalPriceColor = (totalWithVat) => isLessThan50(totalWithVat) ? 'warning' : 'transparent'; const moveTicketsFuture = async () => { - const ticketsToMove = selectedTickets.value.map((ticket) => ({ - originId: ticket.id, - destinationId: ticket.futureId, - originShipped: ticket.shipped, - destinationShipped: ticket.futureShipped, - workerFk: ticket.workerFk, - })); + const ticketsToMove = selectedTickets.value.map((ticket) => { + console.log('salesPersonFk: ', ticket.client); + return { + originId: ticket.id, + destinationId: ticket.futureId, + originShipped: ticket.shipped, + destinationShipped: ticket.futureShipped, + salesPersonFk: ticket.client.salesPersonFk, + }; + }); let params = { tickets: ticketsToMove }; await axios.post('Tickets/merge', params); From 8182bf7b91a12de1740a2bec79ce57de3b637d0a Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 16 Jan 2025 07:29:37 +0100 Subject: [PATCH 2/2] feat: refs #8398 modify previous changes --- src/pages/Ticket/TicketAdvance.vue | 4 +--- src/pages/Ticket/TicketFuture.vue | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 12e94d197..05bd14075 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -254,16 +254,14 @@ const moveTicketsAdvance = async () => { } continue; } - console.log('ticket: ', ticket); ticketsToMove.push({ originId: ticket.futureId, destinationId: ticket.id, originShipped: ticket.futureShipped, destinationShipped: ticket.shipped, - salesPersonFk: ticket.client.salesPersonFk, + salesPersonFk: ticket.workerFk, }); } - const params = { tickets: ticketsToMove }; await axios.post('Tickets/merge', params); vnTableRef.value.reload(); diff --git a/src/pages/Ticket/TicketFuture.vue b/src/pages/Ticket/TicketFuture.vue index 41a53aae8..0d216bed4 100644 --- a/src/pages/Ticket/TicketFuture.vue +++ b/src/pages/Ticket/TicketFuture.vue @@ -245,13 +245,12 @@ const totalPriceColor = (totalWithVat) => const moveTicketsFuture = async () => { const ticketsToMove = selectedTickets.value.map((ticket) => { - console.log('salesPersonFk: ', ticket.client); return { originId: ticket.id, destinationId: ticket.futureId, originShipped: ticket.shipped, destinationShipped: ticket.futureShipped, - salesPersonFk: ticket.client.salesPersonFk, + salesPersonFk: ticket.salesPersonFk, }; });