From 126bb3f039160460b528042f30788096c81cd7c2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 23 Oct 2024 16:10:14 +0200 Subject: [PATCH] feat: refs #8083 insert --- src/pages/Ticket/Card/TicketExpedition.vue | 24 ++++++++-------------- src/pages/Ticket/locale/en.yml | 1 + src/pages/Ticket/locale/es.yml | 1 + 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 9f592bd89..436e9678e 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -26,6 +26,7 @@ const { openConfirmationModal } = useVnConfirm(); const newTicketDialogRef = ref(null); const logsTableDialogRef = ref(null); const vnTableRef = ref(); +const btnSelectRef = ref(); const expeditionsLogsData = ref([]); const selectedExpeditions = ref([]); const allColumnNames = ref([]); @@ -190,17 +191,11 @@ const getExpeditionState = async (expedition) => { const { data: expeditionStates } = await axios.get(`ExpeditionStates/filter`, { params: { filter: JSON.stringify(filter) }, }); - const { data: scannedStates } = await axios.get(`ExpeditionStates`, { - params: { filter: JSON.stringify(filter), fields: ['id', 'isScanned'] }, - }); - expeditionsLogsData.value = expeditionStates.map((state) => { - const scannedState = scannedStates.find((s) => s.id === state.id); - return { - ...state, - isScanned: scannedState ? scannedState.isScanned : false, - }; - }); + expeditionsLogsData.value = expeditionStates.map((state) => ({ + ...state, + isScanned: !!state.isScanned, + })); } catch (error) { console.error(error); } @@ -225,6 +220,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index 06699e00b..bae290b5d 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -118,6 +118,7 @@ expedition: removeExpeditionSubtitle: Are you sure you want to delete this expedition? worker: Worker move: Move + isScanned: Scanned basicData: next: Next back: Back diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index d4ba1f26a..4dca7253c 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -207,6 +207,7 @@ expedition: removeExpeditionSubtitle: ¿Está seguro de eliminar esta expedición? worker: Trabajador move: Mover + isScanned: Escaneado package: package: Embalaje quantity: Cantidad