From 71900b15a6d6b6ec908ec7258b88de49e7b4f6f9 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 1 Jul 2024 12:18:58 +0200 Subject: [PATCH] feat: newsection and i18n --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Entry/EntryBuysTableDialog.vue | 52 ++------ src/pages/Entry/EntryList.vue | 23 ---- src/pages/Entry/MyEntries.vue | 149 +++++++++++++++++++++++ src/pages/Entry/locale/en.yml | 1 + src/pages/Entry/locale/es.yml | 1 + src/router/modules/entry.js | 11 +- 8 files changed, 171 insertions(+), 68 deletions(-) create mode 100644 src/pages/Entry/MyEntries.vue diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 645e12b7a..e6d323708 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -314,6 +314,7 @@ entry: pageTitles: entries: Entries list: List + eti: Labeler summary: Summary basicData: Basic data buys: Buys diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 29373efd0..a14318a60 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -312,6 +312,7 @@ entry: pageTitles: entries: Entradas list: Listado + eti: Etiquetar summary: Resumen basicData: Datos básicos buys: Compras diff --git a/src/pages/Entry/EntryBuysTableDialog.vue b/src/pages/Entry/EntryBuysTableDialog.vue index 4cec9a04b..80fcfc516 100644 --- a/src/pages/Entry/EntryBuysTableDialog.vue +++ b/src/pages/Entry/EntryBuysTableDialog.vue @@ -38,15 +38,15 @@ const entityId = computed(() => $props.id || route.params.id); const entriesTableColumns = computed(() => [ { align: 'left', - name: 'item', - label: t('entry.summary.item'), - field: (row) => row.item.name, + name: 'itemFk', + field: 'itemFk', + label: t('globals.id'), }, { align: 'left', - name: 'quantity', - label: t('entry.summary.quantity'), - field: 'quantity', + name: 'item', + label: t('entry.summary.item'), + field: (row) => row.item.name, }, { align: 'left', @@ -60,18 +60,6 @@ const entriesTableColumns = computed(() => [ label: t('entry.summary.stickers'), field: 'stickers', }, - { - align: 'left', - name: 'printedStickers', - label: t('entry.buys.printedStickers'), - field: 'printedStickers', - }, - { - align: 'left', - name: 'weight', - label: t('entry.summary.weight'), - field: 'weight', - }, { align: 'left', name: 'packing', @@ -84,36 +72,12 @@ const entriesTableColumns = computed(() => [ label: t('entry.summary.grouping'), field: 'grouping', }, - { - align: 'left', - name: 'buyingValue', - label: t('entry.summary.buyingValue'), - field: ({ buyingValue }) => toCurrency(buyingValue), - }, - { - align: 'left', - name: 'price2', - label: t('entry.buys.groupingPrice'), - field: 'price2', - }, - { - align: 'left', - name: 'price3', - label: t('entry.buys.packingPrice'), - field: 'price3', - }, - { - align: 'left', - name: 'import', - label: t('entry.summary.import'), - field: (row) => toCurrency(row.buyingValue * row.quantity), - }, ]); diff --git a/src/pages/Entry/MyEntries.vue b/src/pages/Entry/MyEntries.vue new file mode 100644 index 000000000..32cc871ee --- /dev/null +++ b/src/pages/Entry/MyEntries.vue @@ -0,0 +1,149 @@ + + + + +es: + Print buys: Imprimir compras + Inventory entry: Es inventario + Virtual entry: Es una redada + Search entries: Buscar entradas + You can search by entry reference: Puedes buscar por referencia de la entrada + diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 9a476c80c..e4ad5ea62 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -1,4 +1,5 @@ entryList: + eti: eti list: inventoryEntry: Inventory entry virtualEntry: Virtual entry diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index fba6c5460..d3fe60c7a 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -1,6 +1,7 @@ Search entries: Buscar entradas You can search by entry reference: Puedes buscar por referencia de la entrada entryList: + eti: Etiquetas list: inventoryEntry: Es inventario virtualEntry: Es una redada diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index 67fc41824..9bdda0bb5 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -11,7 +11,7 @@ export default { component: RouterView, redirect: { name: 'EntryMain' }, menus: { - main: ['EntryList', 'EntryLatestBuys'], + main: ['EntryList', 'MyEntries', 'EntryLatestBuys'], card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'], }, children: [ @@ -30,6 +30,15 @@ export default { }, component: () => import('src/pages/Entry/EntryList.vue'), }, + { + path: 'list', + name: 'MyEntries', + meta: { + title: 'eti', + icon: 'sell', + }, + component: () => import('src/pages/Entry/MyEntries.vue'), + }, { path: 'create', name: 'EntryCreate',