0
0
Fork 0

fix: refs #7283 item filters

This commit is contained in:
Carlos Satorres 2024-10-28 13:08:19 +01:00
parent 30f88070ff
commit f2803a6313
2 changed files with 46 additions and 13 deletions

View File

@ -40,6 +40,12 @@ const itemFilter = {
fields: ['id', 'name'], fields: ['id', 'name'],
}, },
}, },
{
relation: 'production',
scope: {
fields: ['id', 'name'],
},
},
], ],
}; };
const columns = computed(() => [ const columns = computed(() => [
@ -161,19 +167,13 @@ const columns = computed(() => [
name: 'intrastat', name: 'intrastat',
align: 'left', align: 'left',
component: 'select', component: 'select',
attrs: {
url: 'Intrastats',
optionValue: 'description',
optionLabel: 'description',
},
columnFilter: { columnFilter: {
name: 'description', name: 'intrastat',
attrs: { attrs: {
url: 'Intrastats', url: 'Intrastats',
optionValue: 'description', optionValue: 'description',
optionLabel: 'description', optionLabel: 'description',
}, },
alias: 'intr',
}, },
columnField: { columnField: {
component: null, component: null,
@ -211,14 +211,19 @@ const columns = computed(() => [
label: t('item.list.userName'), label: t('item.list.userName'),
name: 'userName', name: 'userName',
align: 'left', align: 'left',
component: 'select',
columnFilter: { columnFilter: {
name: 'workerFk', name: 'workerFk',
attrs: { attrs: {
url: 'Users', url: 'VnUsers',
optionValue: 'id', optionValue: 'id',
optionLabel: 'userName', optionLabel: 'nickname',
}, },
}, },
columnField: {
component: null,
},
}, },
{ {
label: t('item.list.weightByPiece'), label: t('item.list.weightByPiece'),
@ -255,9 +260,13 @@ const columns = computed(() => [
name: 'producer', name: 'producer',
align: 'left', align: 'left',
component: 'select', component: 'select',
attrs: { columnFilter: {
url: 'Producers', name: 'producerFk',
fields: ['id', 'name'], attrs: {
url: 'Producers',
optionValue: 'id',
optionLabel: 'name',
},
}, },
columnField: { columnField: {
component: null, component: null,
@ -331,7 +340,7 @@ const columns = computed(() => [
<template #column-userName="{ row }"> <template #column-userName="{ row }">
<span class="link" @click.stop> <span class="link" @click.stop>
{{ row.userName }} {{ row.userName }}
<WorkerDescriptorProxy :id="row.buyerFk" /> <WorkerDescriptorProxy :id="row.workerFk" />
</span> </span>
</template> </template>
<template #column-description="{ row }"> <template #column-description="{ row }">

View File

@ -70,6 +70,18 @@ const columns = computed(() => [
{ {
label: t('item.buyRequest.requester'), label: t('item.buyRequest.requester'),
name: 'requesterName', name: 'requesterName',
component: 'select',
columnFilter: {
name: 'requesterFk',
attrs: {
url: 'VnUsers',
optionValue: 'id',
optionLabel: 'nickname',
},
},
columnField: {
component: null,
},
columnClass: 'shrink', columnClass: 'shrink',
}, },
{ {
@ -88,6 +100,18 @@ const columns = computed(() => [
label: t('item.buyRequest.attender'), label: t('item.buyRequest.attender'),
name: 'attenderName', name: 'attenderName',
align: 'left', align: 'left',
component: 'select',
columnFilter: {
name: 'attenderFk',
attrs: {
url: 'VnUsers',
optionValue: 'id',
optionLabel: 'nickname',
},
},
columnField: {
component: null,
},
columnClass: 'shrink', columnClass: 'shrink',
}, },
{ {