From f2803a63136a9478e492d112d4f6f1b6d16b5c73 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 28 Oct 2024 13:08:19 +0100 Subject: [PATCH] fix: refs #7283 item filters --- src/pages/Item/ItemList.vue | 35 +++++++++++++++++++++------------- src/pages/Item/ItemRequest.vue | 24 +++++++++++++++++++++++ 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index cca5560fe..c9422a0fe 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -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(() => [