From 809ad95e4683410bcee522d0a03ff4520f6bed8f Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 4 Dec 2024 10:18:05 +0100 Subject: [PATCH 01/20] 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 02/20] 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 @@ +