7806_devToTest_2332 #578

Merged
alexm merged 138 commits from 7806_devToTest_2330 into test 2024-07-30 06:14:02 +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"
:filter-panel="InvoiceInFilter"
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>
<InvoiceInSearchbar />

View File

@ -20,40 +20,6 @@ const { t } = useI18n();
onMounted(async () => (stateStore.rightDrawer = true));
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>
<template>
@ -70,7 +36,6 @@ const exprBuilder = (param, value) => {
url="InvoiceIns/filter"
order="issued DESC, id DESC"
auto-load
:expr-builder="exprBuilder"
>
<template #body="{ rows }">
<CardList

View File

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