From 7db166974f675a46f0bedf7dd6589e1a7e73c20c Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Oct 2024 10:34:50 +0200 Subject: [PATCH] feat: refs #7884 use VnTable prop for chip label filters and modified translations --- src/components/ui/VnFilterPanel.vue | 4 +--- src/pages/Entry/MyEntries.vue | 29 +++++++++++++++++------------ src/pages/Entry/locale/en.yml | 18 ++++++++++++------ src/pages/Entry/locale/es.yml | 19 ++++++++++++------- 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 7e4785441..e39a841c3 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -250,7 +250,7 @@ function sanitizer(params) { >
- {{ t(`${chip.label}`) }}: + {{ chip.label }}: "{{ formatValue(chip.value) }}"
@@ -295,6 +295,4 @@ es: Search: Buscar Yes: Si No: No - daysOnward: Días Adelante - daysAgo: Días Atrás diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index 07cedd69b..2c37c2c42 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -18,18 +18,18 @@ const columns = computed(() => [ { align: 'left', name: 'id', - label: t('customer.extendedList.tableVisibleColumns.id'), + label: t('myEntries.id'), columnFilter: false, isTitle: true, }, { visible: false, align: 'right', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: { name: 'fromShipped', - label: t('fromShipped'), + label: t('myEntries.fromShipped'), component: 'date', }, format: ({ shipped }) => toDate(shipped), @@ -37,11 +37,11 @@ const columns = computed(() => [ { visible: false, align: 'left', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: { name: 'toShipped', - label: t('toShipped'), + label: t('myEntries.toShipped'), component: 'date', }, format: ({ shipped }) => toDate(shipped), @@ -49,14 +49,14 @@ const columns = computed(() => [ }, { align: 'right', - label: t('shipped'), + label: t('myEntries.shipped'), name: 'shipped', columnFilter: false, format: ({ shipped }) => toDate(shipped), }, { align: 'right', - label: t('landed'), + label: t('myEntries.landed'), name: 'landed', columnFilter: false, format: ({ landed }) => toDate(landed), @@ -64,31 +64,35 @@ const columns = computed(() => [ { align: 'right', - label: t('globals.wareHouseIn'), + label: t('myEntries.wareHouseIn'), name: 'warehouseInFk', - format: (row) => row.warehouseInName, + format: (row) => { + row.warehouseInName; + }, cardVisible: true, columnFilter: { + name: 'warehouseInFk', + label: t('myEntries.warehouseInFk'), component: 'select', attrs: { url: 'warehouses', fields: ['id', 'name'], optionLabel: 'name', optionValue: 'id', + alias: 't', }, - alias: 't', inWhere: true, }, }, { align: 'left', - label: t('globals.daysOnward'), + label: t('myEntries.daysOnward'), name: 'daysOnward', visible: false, }, { align: 'left', - label: t('globals.daysAgo'), + label: t('myEntries.daysAgo'), name: 'daysAgo', visible: false, }, @@ -130,6 +134,7 @@ const printBuys = (rowId) => { default-mode="card" order="shipped DESC" auto-load + chip-locale="myEntries" /> diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index a9faa814b..b4d7c33bc 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -6,9 +6,15 @@ entryFilter: filter: search: General search reference: Reference -landed: Landed -shipped: Shipped -fromShipped: Shipped(from) -toShipped: Shipped(to) -printLabels: Print stickers -viewLabel: View sticker +myEntries: + id: ID + landed: Landed + shipped: Shipped + fromShipped: Shipped(from) + toShipped: Shipped(to) + printLabels: Print stickers + viewLabel: View sticker + wareHouseIn: Warehouse in + warehouseInFk: Warehouse in + daysOnward: Days onward + daysAgo: Days ago diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index eb1e3f88a..2dfd601b1 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -9,10 +9,15 @@ entryFilter: filter: search: Búsqueda general reference: Referencia - -landed: F. llegada -shipped: F. salida -fromShipped: F. salida(desde) -toShipped: F. salida(hasta) -printLabels: Imprimir etiquetas -viewLabel: Ver etiqueta +myEntries: + id: ID + landed: F. llegada + shipped: F. salida + fromShipped: F. salida(desde) + toShipped: F. salida(hasta) + printLabels: Imprimir etiquetas + viewLabel: Ver etiqueta + wareHouseIn: Alm. entrada + warehouseInFk: Alm. entrada + daysOnward: Días adelante + daysAgo: Días atras