From e7acdfd4f7844c5f4696d9caaaf767463aad27b7 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 23 Oct 2024 10:48:30 +0200 Subject: [PATCH 1/7] fix: refs #8010 footer class --- src/components/VnTable/VnTable.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index b9c6edf50..42d6b82a6 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -417,6 +417,7 @@ function handleScroll() { ref="tableRef" v-bind="table" class="vnTable" + :class="{ lastRowSticky: $props.footer }" :columns="splittedColumns.columns" :rows="rows" v-model:selected="selected" @@ -855,6 +856,9 @@ es: table tbody th { position: relative; } +} + +.lastRowSticky { tbody:nth-last-child(1) { @extend .bg-header; position: sticky; From 0528474250fdbbad7a6137467f532ac7ebcee710 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 23 Oct 2024 13:13:00 +0200 Subject: [PATCH 2/7] chore: refs #8010 kebab-case --- src/components/VnTable/VnTable.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 42d6b82a6..47323da95 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -417,7 +417,7 @@ function handleScroll() { ref="tableRef" v-bind="table" class="vnTable" - :class="{ lastRowSticky: $props.footer }" + :class="{ 'last-row-sticky': $props.footer }" :columns="splittedColumns.columns" :rows="rows" v-model:selected="selected" @@ -858,7 +858,7 @@ es: } } -.lastRowSticky { +.last-row-sticky { tbody:nth-last-child(1) { @extend .bg-header; position: sticky; From 9673f7be1edf10b9606327415118411a03380670 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 23 Oct 2024 15:17:06 +0200 Subject: [PATCH 3/7] fix: refs #8083 update rightly --- src/pages/Ticket/Card/TicketExpedition.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 93749ebec..9f592bd89 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -231,14 +231,14 @@ onUnmounted(() => (stateStore.rightDrawer = false)); :select-props="{ options: expeditionStateTypes, optionLabel: 'description', + optionValue: 'code', }" :promise=" - async (stateTypeFk) => { - await vnTableRef.CrudModelRef.saveChanges({ - updates: selectedRows.map(({ id }) => ({ - data: { stateTypeFk }, - where: { id }, - })), + async (stateCode) => { + await axios.post('ExpeditionStates/addExpeditionState', { + expeditions: selectedRows.map(({ id }) => { + return { expeditionFk: id, stateCode }; + }), }); vnTableRef.tableRef.clearSelection(); } @@ -309,7 +309,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); 'row-key': 'id', selection: 'multiple', }" - save-url="Expeditions/crud" + save-url="ExpeditionStates/crud" auto-load :expr-builder=" (param, value) => { From 126bb3f039160460b528042f30788096c81cd7c2 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 23 Oct 2024 16:10:14 +0200 Subject: [PATCH 4/7] 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 From 33ee1ea01bca4c715a70ad6f6c6bf4ff23bcea08 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 23 Oct 2024 16:11:58 +0200 Subject: [PATCH 5/7] fix: refs #8083 drop useless code --- src/pages/Ticket/Card/TicketExpedition.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 436e9678e..979854ad5 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -238,7 +238,6 @@ onUnmounted(() => (stateStore.rightDrawer = false)); }); vnTableRef.tableRef.clearSelection(); vnTableRef.reload(); - btnSelectRef.hidePopup(); } " /> From 4e31566dddcbd2f1f073be202d3cbdb4cbcc96ef Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 23 Oct 2024 16:13:04 +0200 Subject: [PATCH 6/7] fix: refs #8083 drop useless code --- src/pages/Ticket/Card/TicketExpedition.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 979854ad5..27f78e728 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -26,7 +26,6 @@ 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([]); @@ -220,7 +219,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));