fix: refs #7274 use VnInputDate
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-05-15 14:06:42 +02:00
parent 2eca98d31d
commit bf43893b05
2 changed files with 3 additions and 13 deletions

View File

@ -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) } };
}
}
</script>

View File

@ -162,7 +162,7 @@ const authors = ref();
<QItem class="q-mb-sm">
<QItemSection>
<VnInput
<VnInputDate
:label="t('L. O. Date')"
clearable
is-outlined