From 09582ab6a895a7a763dc24812bc30ac7238cb957 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 13 Mar 2024 09:05:23 -0300 Subject: [PATCH 01/14] WIP --- src/i18n/en/index.js | 16 + src/i18n/es/index.js | 16 + src/pages/Item/ItemList.vue | 550 ++++++++++++++++++++++++++++++- src/router/modules/item.js | 4 +- src/stores/useNavigationStore.js | 1 + 5 files changed, 584 insertions(+), 3 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 94d552be3..6c4cc34f3 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1164,6 +1164,22 @@ export default { warehouseText: 'Calculated on the warehouse of { warehouseName }', itemDiary: 'Item diary', }, + list: { + id: 'Identifier', + grouping: 'Grouping', + description: 'Description', + stems: 'Stems', + category: 'Category', + type: 'Type', + intrastat: 'Intrastat', + size: 'Size', + origin: 'Origin', + userName: 'Buyer', + weightByPiece: 'Weight/Piece', + multiplier: 'Multiplier', + producer: 'Producer', + landed: 'Landed', + }, }, components: { topbar: {}, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index bcd780f5b..4ad9a1d5c 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1164,6 +1164,22 @@ export default { warehouseText: 'Calculado sobre el almacén de { warehouseName }', itemDiary: 'Registro de compra-venta', }, + list: { + id: 'Identificador', + grouping: 'Grouping', + description: 'Descripción', + stems: 'Tallos', + category: 'Reino', + type: 'Tipo', + intrastat: 'Intrastat', + size: 'Medida', + origin: 'Origen', + weightByPiece: 'Peso (gramos)/tallo', + userName: 'Comprador', + multiplier: 'Multiplicador', + producer: 'Productor', + landed: 'F. entrega', + }, }, components: { topbar: {}, diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index 49a5dbb64..14549296b 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -1 +1,549 @@ - + + + + + +es: + New item: Nuevo artículo + diff --git a/src/router/modules/item.js b/src/router/modules/item.js index d3462e15c..700278617 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -10,7 +10,7 @@ export default { component: RouterView, redirect: { name: 'ItemMain' }, menus: { - main: [], + main: ['ItemList'], card: [], }, children: [ @@ -18,7 +18,7 @@ export default { path: '', name: 'ItemMain', component: () => import('src/pages/Item/ItemMain.vue'), - redirect: { name: 'Itemlist' }, + redirect: { name: 'ItemList' }, children: [ { path: 'list', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index afd3af0c0..f075301f6 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -7,6 +7,7 @@ import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { const modules = [ + 'item', 'shelving', 'order', 'customer', From f12ec3c0c9a6cf7e245fda5113fb2b0c92904f36 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 8 Apr 2024 08:47:29 -0300 Subject: [PATCH 02/14] Add redirection to summary and open summary action --- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Item/ItemList.vue | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 6c4cc34f3..0a17ee45f 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1167,6 +1167,7 @@ export default { list: { id: 'Identifier', grouping: 'Grouping', + packing: 'Packing', description: 'Description', stems: 'Stems', category: 'Category', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 4ad9a1d5c..f484c6cc6 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1167,6 +1167,7 @@ export default { list: { id: 'Identificador', grouping: 'Grouping', + packing: 'Packing', description: 'Descripción', stems: 'Tallos', category: 'Reino', diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index 14549296b..9baf3061a 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -10,18 +10,21 @@ import VnInput from 'src/components/common/VnInput.vue'; import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; import ItemDescriptorProxy from '../Item/Card/ItemDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import ItemSummary from '../Item/Card/ItemSummary.vue'; import { useStateStore } from 'stores/useStateStore'; import { toDate, toCurrency } from 'src/filters'; import { useSession } from 'composables/useSession'; import { dashIfEmpty } from 'src/filters'; import { useArrayData } from 'composables/useArrayData'; +import { useSummaryDialog } from 'src/composables/useSummaryDialog'; const router = useRouter(); const session = useSession(); const token = session.getToken(); const stateStore = useStateStore(); const { t } = useI18n(); +const { viewSummary } = useSummaryDialog(); const itemTypesOptions = ref([]); const originsOptions = ref([]); @@ -373,8 +376,8 @@ const redirectToItemCreate = () => { // router.push({ name: 'EntryBuys', params: { id: entryFk } }); }; -const redirectToItemSummary = () => { - // router.push({ name: 'EntryBuys', params: { id: entryFk } }); +const redirectToItemSummary = (id) => { + router.push({ name: 'ItemSummary', params: { id } }); }; // const applyColumnFilter = async (col) => { @@ -386,6 +389,10 @@ const redirectToItemSummary = () => { // } // }; +const cloneRow = () => { + console.log('cloneRow'); +}; + onMounted(async () => { stateStore.rightDrawer = true; const filteredColumns = columns.value.filter((col) => col.name !== 'picture'); @@ -507,10 +514,10 @@ onUnmounted(() => (stateStore.rightDrawer = false)); -