From aef83b7e9a1b2d7c3a12f83ad9e56aed516c6246 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 25 Jul 2024 12:35:47 +0200 Subject: [PATCH] feat: modify myentries filters --- src/pages/Entry/MyEntries.vue | 65 +++++++++++++++++++++++++++++------ src/pages/Entry/locale/en.yml | 2 ++ src/pages/Entry/locale/es.yml | 2 ++ 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index e100ed565..24d224fda 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -17,30 +17,68 @@ const columns = computed(() => [ columnFilter: false, }, { + visible: false, + align: 'right', + label: t('shipped'), + name: 'shipped', + cardVisible: false, + columnFilter: { + name: 'fromShipped', + label: t('fromShipped'), + component: 'date', + }, + format: ({ shipped }) => toDate(shipped), + }, + { + visible: false, align: 'left', label: t('shipped'), name: 'shipped', columnFilter: { + name: 'toShipped', + label: t('toShipped'), component: 'date', }, format: ({ shipped }) => toDate(shipped), cardVisible: true, }, { - align: 'left', - label: t('landed'), - name: 'from', + align: 'right', + label: t('shipped'), + name: 'shipped', cardVisible: false, - columnFilter: { - component: 'date', - }, - format: ({ landed }) => toDate(landed), + columnFilter: false, + format: ({ shipped }) => toDate(shipped), }, { - align: 'left', + align: 'right', + label: t('landed'), + name: 'landed', + cardVisible: false, + columnFilter: false, + format: ({ landed }) => toDate(landed), + }, + + { + align: 'right', label: t('globals.wareHouseIn'), - name: 'warehouseInName', + name: 'warehouseInFk', + format: (row) => row.warehouseInName, cardVisible: true, + columnField: { + component: null, + }, + columnFilter: { + component: 'select', + attrs: { + url: 'warehouses', + fields: ['id', 'name'], + optionLabel: 'name', + optionValue: 'id', + }, + alias: 't', + inWhere: true, + }, }, { align: 'left', @@ -77,7 +115,14 @@ const printBuys = (rowId) => { :label="t('Search entries')" :info="t('You can search by entry reference')" /> - + diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 677c3c055..df78b17c9 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -8,4 +8,6 @@ entryFilter: reference: Reference landed: Landed shipped: Shipped +fromShipped: Shipped(from) +toShipped: Shipped(to) printBuys: Print buys diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 10b77c2ee..4308722fb 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -12,4 +12,6 @@ entryFilter: landed: F. llegada shipped: F. salida +fromShipped: F. salida(desde) +toShipped: F. salida(hasta) Print buys: Imprimir etiquetas