From 4ef5e8f97b228d935a0e3ac1db5314ae41ba65e9 Mon Sep 17 00:00:00 2001 From: Guido Date: Tue, 1 Apr 2025 11:39:31 -0300 Subject: [PATCH] =?UTF-8?q?fix(invoices):=20Refactorizaci=C3=B3n=20del=20m?= =?UTF-8?q?anejo=20de=20fechas=20en=20la=20funci=C3=B3n=20fetchInvoices?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Se actualizó la función fetchInvoices para desestructurar los parámetros de fecha de un objeto y mejorar la legibilidad. --- src/pages/Ecomerce/InvoicesView.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/Ecomerce/InvoicesView.vue b/src/pages/Ecomerce/InvoicesView.vue index 70f84a09..b89e28fa 100644 --- a/src/pages/Ecomerce/InvoicesView.vue +++ b/src/pages/Ecomerce/InvoicesView.vue @@ -52,7 +52,7 @@ const columns = computed(() => [ ]); const fetchInvoices = async clientFk => { - const params = { + const { from, to } = { from: new Date(currentYear.value, 0), to: new Date(currentYear.value, 11, 31, 23, 59, 59) }; @@ -60,7 +60,7 @@ const fetchInvoices = async clientFk => { where: { clientFk, issued: { - between: [params.from, params.to] + between: [from, to] } }, order: ['issued DESC'], @@ -73,7 +73,6 @@ const fetchInvoices = async clientFk => { filter: JSON.stringify(filter) } }); - invoices.value = data; };