7837-testToMaster_2432 #592

Merged
alexm merged 165 commits from 7837-testToMaster_2432 into master 2024-08-06 05:54:11 +00:00
3 changed files with 1 additions and 38 deletions
Showing only changes of commit 11aadddd55 - Show all commits

View File

@ -29,9 +29,6 @@ const filter = {
:descriptor="InvoiceInDescriptor" :descriptor="InvoiceInDescriptor"
:filter-panel="InvoiceInFilter" :filter-panel="InvoiceInFilter"
search-data-key="InvoiceInList" search-data-key="InvoiceInList"
search-url="InvoiceIns/filter"
searchbar-label="Search invoice"
searchbar-info="Search invoices in by id or supplier fiscal name"
> >
<template #searchbar> <template #searchbar>
<InvoiceInSearchbar /> <InvoiceInSearchbar />

View File

@ -20,40 +20,6 @@ const { t } = useI18n();
onMounted(async () => (stateStore.rightDrawer = true)); onMounted(async () => (stateStore.rightDrawer = true));
onUnmounted(() => (stateStore.rightDrawer = false)); onUnmounted(() => (stateStore.rightDrawer = false));
const exprBuilder = (param, value) => {
let minHour, maxHour;
switch (param) {
case 'issued':
minHour = new Date(value);
minHour.setHours(0, 0, 0, 0);
maxHour = new Date(value);
maxHour.setHours(23, 59, 59, 59);
return {
'ii.issued': {
between: [minHour, maxHour],
},
};
case 'id':
case 'supplierFk':
case 'supplierRef':
case 'serialNumber':
case 'serial':
case 'created':
case 'isBooked':
return { [`ii.${param}`]: value };
case 'account':
case 'fi':
return { [`s.${param}`]: value };
case 'awbCode':
return { 'awb.code': value };
case 'search':
return /^\d+$/.test(value)
? { 'ii.id': value }
: { 's.name': { like: `%${value}%` } };
default:
return { [param]: value };
}
};
</script> </script>
<template> <template>
@ -70,7 +36,6 @@ const exprBuilder = (param, value) => {
url="InvoiceIns/filter" url="InvoiceIns/filter"
order="issued DESC, id DESC" order="issued DESC, id DESC"
auto-load auto-load
:expr-builder="exprBuilder"
> >
<template #body="{ rows }"> <template #body="{ rows }">
<CardList <CardList

View File

@ -8,6 +8,7 @@ const { t } = useI18n();
data-key="InvoiceInList" data-key="InvoiceInList"
:label="t('Search invoice')" :label="t('Search invoice')"
:info="t('Search invoices in by id or supplier fiscal name')" :info="t('Search invoices in by id or supplier fiscal name')"
custom-route-redirect-name="invoiceInList"
/> />
</template> </template>
<i18n> <i18n>