From bf43893b054a4c8e76e0e29c68bc0867fe76bcd1 Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 15 May 2024 14:06:42 +0200 Subject: [PATCH] fix: refs #7274 use VnInputDate --- src/pages/Customer/Defaulter/CustomerDefaulter.vue | 14 ++------------ .../Customer/Defaulter/CustomerDefaulterFilter.vue | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue index 6fc36bcff..c1e537c0a 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -184,16 +184,6 @@ const onFetch = (data) => { balanceDueTotal.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0); }; -function getRange(value) { - let date; - if (locale.value === 'es') { - const [day, month, year] = value.split('/'); - date = new Date(year, month - 1, day); - } else date = new Date(value); - - return dateRange(date); -} - function exprBuilder(param, value) { switch (param) { case 'clientFk': @@ -206,9 +196,9 @@ function exprBuilder(param, value) { case 'salesPersonFk': return { [`d.${param}`]: value }; case 'date': - return { 'd.created': { between: getRange(value) } }; + return { 'd.created': { between: dateRange(value) } }; case 'defaulterSinced': - return { 'd.defaulterSinced': { between: getRange(value) } }; + return { 'd.defaulterSinced': { between: dateRange(value) } }; } } diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue index 0a594f92f..26a6743d5 100644 --- a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue +++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue @@ -162,7 +162,7 @@ const authors = ref(); -