From 913049ac3d6b459307b99d53246e91d1f8bcd7ac Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 10 Mar 2025 12:55:02 +0100 Subject: [PATCH] feat: refs #8602 refactor EntryBuys component and enhance observation tests --- src/pages/Entry/Card/EntryBuys.vue | 49 ++++++------------- .../entry/entryCard/entryNotes.spec.js | 40 +++++++++++++-- .../integration/entry/entryList.spec.js | 10 +--- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue index f5ee3e7cb..dd17082db 100644 --- a/src/pages/Entry/Card/EntryBuys.vue +++ b/src/pages/Entry/Card/EntryBuys.vue @@ -59,31 +59,6 @@ const columns = [ createOrder: 12, width: '25px', }, - { - label: t('Buyer'), - name: 'workerFk', - component: 'select', - attrs: { - url: 'TicketRequests/getItemTypeWorker', - fields: ['id', 'nickname'], - optionLabel: 'nickname', - sortBy: 'nickname ASC', - optionValue: 'id', - }, - visible: false, - }, - { - label: t('Family'), - name: 'itemTypeFk', - component: 'select', - attrs: { - url: 'itemTypes', - fields: ['id', 'name'], - optionLabel: 'name', - optionValue: 'id', - }, - visible: false, - }, { name: 'id', isId: true, @@ -115,15 +90,8 @@ const columns = [ { align: 'center', label: t('Article'), + component: 'input', name: 'name', - component: 'select', - attrs: { - url: 'Items', - fields: ['id', 'name'], - optionLabel: 'name', - optionValue: 'id', - sortBy: 'name ASC', - }, width: '85px', isEditable: false, }, @@ -423,6 +391,8 @@ const itemTypeFk = ref(null); const inkFk = ref(null); const tag1 = ref(null); const tag2 = ref(null); +const tag1Filter = ref(null); +const tag2Filter = ref(null); const filter = computed(() => { const where = {}; if (buyerFk.value) { @@ -434,6 +404,7 @@ const filter = computed(() => { if (inkFk.value) { where.inkFk = inkFk.value; } + if (tag1.value) { where.tag1 = tag1.value; } @@ -710,8 +681,16 @@ onMounted(() => { option-label="name" sort-by="name ASC" /> - - + +