From 3ab4574155de6064f966af58614297e75c5c09d0 Mon Sep 17 00:00:00 2001 From: robert Date: Thu, 24 Oct 2024 13:35:57 +0200 Subject: [PATCH 01/36] feat: refs #8001 ticketExpeditionGrafana --- src/pages/Ticket/Card/TicketExpedition.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index bd63f259c..6a0989644 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -123,6 +123,12 @@ const columns = computed(() => [ isPrimary: true, action: (row) => showLog(row), }, + { + title: t('Grafana'), + icon: 'vn:grafana', + isPrimary: true, + action: (row) => openGrafana(row.id), + }, ], }, ]); @@ -200,6 +206,13 @@ const getExpeditionState = async (expedition) => { } }; +const openGrafana = (expeditionFk) => { + window.open( + `https://grafana.verdnatura.es/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`, + '_blank' + ); +}; + onMounted(async () => { stateStore.rightDrawer = true; const filteredColumns = columns.value.filter((col) => col.name !== 'history'); From 87b5af7060d6177c62df04f640f8249c1405acba Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 29 Nov 2024 08:38:38 +0100 Subject: [PATCH 02/36] feat: refs #8001 change request --- src/pages/Ticket/Card/TicketExpedition.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 3268bd7da..0e56948e7 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -17,6 +17,7 @@ import axios from 'axios'; import VnTable from 'src/components/VnTable/VnTable.vue'; import VnBtnSelect from 'src/components/common/VnBtnSelect.vue'; import FetchData from 'src/components/FetchData.vue'; +import useOpenURL from 'src/composables/useOpenURL'; const route = useRoute(); const stateStore = useStateStore(); @@ -127,7 +128,7 @@ const columns = computed(() => [ title: t('Grafana'), icon: 'vn:grafana', isPrimary: true, - action: (row) => openGrafana(row.id), + action: ({ id }) => openGrafana(id), }, ], }, @@ -199,9 +200,8 @@ const getExpeditionState = async (expedition) => { }; const openGrafana = (expeditionFk) => { - window.open( - `https://grafana.verdnatura.es/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}`, - '_blank' + useOpenURL( + `https://grafana.verdnatura.es/d/d552ab74-85b4-4e7f-a279-fab7cd9c6124/control-de-expediciones?orgId=1&var-expeditionFk=${expeditionFk}` ); }; From 68c691587d3417093613f73058b2f9ee0a4bd0ea Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 29 Nov 2024 09:55:22 +0100 Subject: [PATCH 03/36] feat: refs #8001 change request --- src/pages/Ticket/Card/TicketExpedition.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Ticket/Card/TicketExpedition.vue b/src/pages/Ticket/Card/TicketExpedition.vue index 0e56948e7..43d8c34f5 100644 --- a/src/pages/Ticket/Card/TicketExpedition.vue +++ b/src/pages/Ticket/Card/TicketExpedition.vue @@ -207,8 +207,8 @@ const openGrafana = (expeditionFk) => { onMounted(async () => { stateStore.rightDrawer = true; - const filteredColumns = columns.value.filter((col) => col.name !== 'history'); - allColumnNames.value = filteredColumns.map((col) => col.name); + const filteredColumns = columns.value.filter(({ name }) => name !== 'history'); + allColumnNames.value = filteredColumns.map(({ name }) => name); }); onUnmounted(() => (stateStore.rightDrawer = false)); From 809ad95e4683410bcee522d0a03ff4520f6bed8f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 4 Dec 2024 10:18:05 +0100 Subject: [PATCH 04/36] fix: hotfix date --- .../Supplier/Card/SupplierConsumption.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pages/Supplier/Card/SupplierConsumption.vue b/src/pages/Supplier/Card/SupplierConsumption.vue index fe1cec260..a4fcf8bcd 100644 --- a/src/pages/Supplier/Card/SupplierConsumption.vue +++ b/src/pages/Supplier/Card/SupplierConsumption.vue @@ -8,7 +8,7 @@ import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import SupplierConsumptionFilter from './SupplierConsumptionFilter.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; -import { toDate } from 'src/filters'; +import { dateRange, toDate } from 'src/filters'; import { dashIfEmpty } from 'src/filters'; import { usePrintService } from 'composables/usePrintService'; import useNotify from 'src/composables/useNotify.js'; @@ -35,14 +35,20 @@ const store = arrayData.store; onUnmounted(() => state.unset('SupplierConsumption')); const dateRanges = computed(() => { - const { from, to } = arrayData.store?.userParams || {}; + let { from, to } = arrayData.store?.userParams || {}; return { from, to }; }); -const reportParams = computed(() => ({ - recipientId: Number(route.params.id), - ...dateRanges.value, -})); +const reportParams = computed(() => { + const dates = { + to: dateRange(dateRanges.value.to)[1].toISOString(), + from: dateRange(dateRanges.value.from)[1].toISOString(), + }; + return { + recipientId: Number(route.params.id), + ...dates, + }; +}); async function getSupplierConsumptionData() { await arrayData.fetch({ append: false }); From eb91b9c1090dcd05d4675315a5ba9ffc10ec1154 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 10 Dec 2024 11:02:00 +0100 Subject: [PATCH 05/36] fix: fix front --- src/pages/Item/ItemRequest.vue | 42 +++++------ src/pages/Item/ItemRequestFilter.vue | 107 ++++----------------------- src/pages/Travel/TravelFilter.vue | 1 + src/pages/Worker/Card/WorkerPit.vue | 16 +++- 4 files changed, 45 insertions(+), 121 deletions(-) diff --git a/src/pages/Item/ItemRequest.vue b/src/pages/Item/ItemRequest.vue index 4f037529a..9bb573787 100644 --- a/src/pages/Item/ItemRequest.vue +++ b/src/pages/Item/ItemRequest.vue @@ -1,42 +1,33 @@ +