diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index bed30725b..b6668edea 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -84,7 +84,7 @@ const columns = computed(() => [ align: 'left', create: true, columnFilter: { - name: 'description', + name: 'search', }, }, { @@ -103,9 +103,10 @@ const columns = computed(() => [ align: 'left', component: 'select', columnFilter: { + name: 'typeFk', attrs: { url: 'ItemTypes', - fields: ['name'], + fields: ['id', 'name'], }, }, columnField: { @@ -118,9 +119,12 @@ const columns = computed(() => [ name: 'category', align: 'left', component: 'select', - attrs: { - url: 'ItemCategories', - fields: ['id', 'name'], + columnFilter: { + name: 'categoryFk', + attrs: { + url: 'ItemCategories', + fields: ['id', 'name'], + }, }, columnField: { component: null, @@ -131,9 +135,15 @@ const columns = computed(() => [ name: 'intrastat', align: 'left', component: 'select', - attrs: { - url: 'Intrastats', - fields: ['id', 'description'], + columnFilter: { + name: 'description', + attrs: { + url: 'Intrastats', + optionValue: 'description', + optionLabel: 'description', + }, + inWhere: true, + alias: 'intr', }, columnField: { component: null, @@ -145,9 +155,15 @@ const columns = computed(() => [ name: 'origin', align: 'left', component: 'select', - attrs: { - url: 'Origins', - fields: ['id', 'name'], + columnFilter: { + name: 'id', + attrs: { + url: 'Origins', + optionValue: 'id', + optionLabel: 'code', + }, + inWhere: true, + alias: 'ori', }, columnField: { component: null, @@ -158,6 +174,14 @@ const columns = computed(() => [ label: t('item.list.userName'), name: 'userName', align: 'left', + columnFilter: { + name: 'workerFk', + attrs: { + url: 'Users', + optionValue: 'id', + optionLabel: 'userName', + }, + }, }, { label: t('item.list.weightByPiece'), @@ -249,8 +273,6 @@ const cloneItem = async (itemFk) => { data-key="ItemList" url="Items/filter" url-create="Items" - save-url="Items/crud" - :filter="itemFilter" :create="{ urlCreate: 'Items', title: 'Create Item', @@ -264,7 +286,7 @@ const cloneItem = async (itemFk) => { auto-load redirect="Item" :is-editable="false" - :use-model="true" + :filer="itemFilter" >