From 479f2a8e53ffe91a5c7842758e37912acb9505fc Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 17 Sep 2024 08:31:02 +0200 Subject: [PATCH 1/5] feat: refs #7884 added new filter field --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Entry/MyEntries.vue | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index f99244d42..27c904aaf 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -50,6 +50,7 @@ globals: summary: basicData: Basic data daysOnward: Days onward + daysAgo: Days ago today: Today yesterday: Yesterday dateFormat: en-GB diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 360627fda..e0614caaf 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -49,6 +49,7 @@ globals: summary: basicData: Datos básicos daysOnward: Días adelante + daysAgo: Días atras today: Hoy yesterday: Ayer dateFormat: es-ES diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index 1c56427f4..17b1f91c5 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -78,7 +78,13 @@ const columns = computed(() => [ { align: 'left', label: t('globals.daysOnward'), - name: 'days', + name: 'daysOnward', + visible: false, + }, + { + align: 'left', + label: t('globals.daysAgo'), + name: 'daysAgo', visible: false, }, { From 566d657f70d45934a4aa8b3368379d2c985ac6de Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Sep 2024 08:23:15 +0200 Subject: [PATCH 2/5] feat: refs #7884 added default params and chip translations --- src/components/ui/VnFilterPanel.vue | 7 ++++++- src/pages/Entry/MyEntries.vue | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 637180c22..4f71fdea9 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -252,7 +252,7 @@ function sanitizer(params) { >
- {{ chip.label }}: + {{ t(`${chip.label}`) }}: "{{ formatValue(chip.value) }}"
@@ -286,6 +286,9 @@ function sanitizer(params) { +en: + daysOnward: Days onward + daysAgo: Days ago es: No filters applied: No se han aplicado filtros Applied filters: Filtros aplicados @@ -294,4 +297,6 @@ 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 17b1f91c5..b95c73847 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -9,6 +9,11 @@ import VnTable from 'components/VnTable/VnTable.vue'; const { t } = useI18n(); const quasar = useQuasar(); +const params = { + daysOnward: 7, + daysAgo: 3, +}; + const columns = computed(() => [ { align: 'left', @@ -120,6 +125,7 @@ const printBuys = (rowId) => { data-key="myEntriesList" url="Entries/filter" :columns="columns" + :user-params="params" default-mode="card" order="shipped DESC" auto-load From de01dda2ed5b61ad30fcbf7ce972dfdee22a3007 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 1 Oct 2024 11:32:15 +0200 Subject: [PATCH 3/5] refactor: refs #7884 modified icon color --- src/pages/Entry/MyEntries.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue index b95c73847..07cedd69b 100644 --- a/src/pages/Entry/MyEntries.vue +++ b/src/pages/Entry/MyEntries.vue @@ -99,6 +99,7 @@ const columns = computed(() => [ { title: t('printLabels'), icon: 'print', + isPrimary: true, action: (row) => printBuys(row.id), }, ], From 7db166974f675a46f0bedf7dd6589e1a7e73c20c Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Oct 2024 10:34:50 +0200 Subject: [PATCH 4/5] 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 From 98df741f1b1bd2761960e0ce60c1578b8a714d67 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Oct 2024 10:43:54 +0200 Subject: [PATCH 5/5] fix: refs #7884 deleted useless translations --- src/components/ui/VnFilterPanel.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index e39a841c3..43d634ad9 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -284,9 +284,6 @@ function sanitizer(params) { -en: - daysOnward: Days onward - daysAgo: Days ago es: No filters applied: No se han aplicado filtros Applied filters: Filtros aplicados