fix: refs #7283 item filters
gitea/salix-front/pipeline/pr-dev This commit looks good Details

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

View File

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