Hotfix: fixed ref filter in InvoiceOutList #1014

Merged
jon merged 2 commits from Hotfix-InvoiceOutRefFilter into master 2024-11-27 13:16:31 +00:00
1 changed files with 18 additions and 20 deletions
Showing only changes of commit 7d28037c29 - Show all commits

View File

@ -43,16 +43,17 @@ const columns = computed(() => [
{ {
align: 'left', align: 'left',
name: 'ref', name: 'ref',
label: t('invoiceOutList.tableVisibleColumns.ref'), label: t('globals.reference'),
isTitle: true, isTitle: true,
component: 'select', component: 'select',
attrs: { attrs: {
url: MODEL, url: MODEL,
optionLabel: 'ref', optionLabel: 'ref',
optionValue: 'id', optionValue: 'ref',
}, },
columnField: { columnField: { component: null },
component: null, columnFilter: {
inWhere: true,
}, },
}, },
{ {
@ -147,25 +148,22 @@ function openPdf(id) {
} }
function downloadPdf() { function downloadPdf() {
if (selectedRows.value.size === 0) return; if (selectedRows.value.size === 0) return;
const selectedCardsArray = Array.from(selectedRows.value.values()); const selectedCardsArray = Array.from(selectedRows.value.values());
if (selectedRows.value.size === 1) { if (selectedRows.value.size === 1) {
const [invoiceOut] = selectedCardsArray; const [invoiceOut] = selectedCardsArray;
openPdf(invoiceOut.id); openPdf(invoiceOut.id);
} else { } else {
const invoiceOutIdsArray = selectedCardsArray.map( const invoiceOutIdsArray = selectedCardsArray.map((invoiceOut) => invoiceOut.id);
(invoiceOut) => invoiceOut.id const invoiceOutIds = invoiceOutIdsArray.join(',');
);
const invoiceOutIds = invoiceOutIdsArray.join(',');
const params = { const params = {
ids: invoiceOutIds, ids: invoiceOutIds,
}; };
openReport(`${MODEL}/downloadZip`, params);
}
openReport(`${MODEL}/downloadZip`, params);
}
} }
watchEffect(selectedRows); watchEffect(selectedRows);