Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into 6818-hotfix-refactorParsePhone
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-11-28 09:38:56 +01:00
commit ad45d612ee
4 changed files with 25 additions and 25 deletions

View File

@ -133,7 +133,7 @@ const addFilter = async (filter, params) => {
async function fetch(params) {
useArrayData(props.dataKey, params);
arrayData.reset(['filter.skip', 'skip', 'page']);
await arrayData.fetch({ append: false });
await arrayData.fetch({ append: false, updateRouter: mounted.value });
return emitStoreData();
}

View File

@ -82,11 +82,11 @@ const entriesTableColumns = computed(() => [
</QCardSection>
<QCardActions align="right">
<QBtn
:label="t('printLabels')"
:label="t('myEntries.printLabels')"
color="primary"
icon="print"
:loading="isLoading"
@click="openReport(`Entries/${entityId}/print`)"
@click="openReport(`Entries/${entityId}/labelSupplier`)"
unelevated
autofocus
/>
@ -126,7 +126,9 @@ const entriesTableColumns = computed(() => [
"
unelevated
>
<QTooltip>{{ t('viewLabel') }}</QTooltip>
<QTooltip>{{
t('myEntries.viewLabel')
}}</QTooltip>
</QBtn>
</QTr>
</template>

View File

@ -101,7 +101,7 @@ const columns = computed(() => [
name: 'tableActions',
actions: [
{
title: t('printLabels'),
title: t('myEntries.printLabels'),
icon: 'print',
isPrimary: true,
action: (row) => printBuys(row.id),

View File

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