From 8e0ee459010fd364f8580a67054ca5a43ce9520c Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 23 Nov 2023 01:17:23 -0300 Subject: [PATCH] Create Shelving list module Adds shelving list, preview and update --- src/components/ui/CardSummary.vue | 2 +- src/i18n/en/index.js | 26 ++++ src/i18n/es/index.js | 26 ++++ src/pages/Shelving/ShelvingFilter.vue | 112 ++++++++++++++++ src/pages/Shelving/ShelvingList.vue | 120 ++++++++++++++++++ src/pages/Shelving/ShelvingMain.vue | 17 +++ .../Shelving/Summary/ShelvingBasicData.vue | 105 +++++++++++++++ .../Shelving/Summary/ShelvingSummary.vue | 68 ++++++++++ .../Summary/ShelvingSummaryDialog.vue | 29 +++++ .../Shelving/Summary/ShelvingSummaryPage.vue | 32 +++++ .../components/ShelvingDescriptor.vue | 70 ++++++++++ .../components/ShelvingDescriptorMenu.vue | 61 +++++++++ .../components/ShelvingDescriptorProxy.vue | 15 +++ .../Shelving/components/ShelvingSearchbar.vue | 20 +++ src/router/modules/index.js | 3 +- src/router/modules/shelving.js | 63 +++++++++ src/router/routes.js | 2 + src/stores/useNavigationStore.js | 1 + 18 files changed, 770 insertions(+), 2 deletions(-) create mode 100644 src/pages/Shelving/ShelvingFilter.vue create mode 100644 src/pages/Shelving/ShelvingList.vue create mode 100644 src/pages/Shelving/ShelvingMain.vue create mode 100644 src/pages/Shelving/Summary/ShelvingBasicData.vue create mode 100644 src/pages/Shelving/Summary/ShelvingSummary.vue create mode 100644 src/pages/Shelving/Summary/ShelvingSummaryDialog.vue create mode 100644 src/pages/Shelving/Summary/ShelvingSummaryPage.vue create mode 100644 src/pages/Shelving/components/ShelvingDescriptor.vue create mode 100644 src/pages/Shelving/components/ShelvingDescriptorMenu.vue create mode 100644 src/pages/Shelving/components/ShelvingDescriptorProxy.vue create mode 100644 src/pages/Shelving/components/ShelvingSearchbar.vue create mode 100644 src/router/modules/shelving.js diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 72ac0a8f0..0e0bd47ee 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -27,7 +27,7 @@ defineExpose({ async function fetch() { const params = {}; - if (props.filter) params.filter = props.filter; + if (props.filter) params.filter = JSON.stringify(props.filter); const { data } = await axios.get(props.url, { params }); entity.value = data; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index b4761a77f..01a54cfbb 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -424,6 +424,32 @@ export default { comercial: 'Comercial', }, }, + shelving:{ + pageTitles: { + shelving: 'Shelving', + shelvingList: 'Shelving List', + createShelving: 'Create shelving', + summary: 'Summary', + basicData: 'Basic Data', + }, + list: { + parking: 'Parking', + priority: 'Priority', + }, + summary: { + code: 'Code', + parking: 'Parking', + priority: 'Priority', + worker: 'Worker', + recyclable: 'Recyclable' + }, + basicData: { + code: 'Code', + parking: 'Parking', + priority: 'Priority', + recyclable: 'Recyclable' + } + }, worker: { pageTitles: { workers: 'Workers', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 85fb6b6e6..829fe6221 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -426,6 +426,32 @@ export default { comercial: 'Comercial', }, }, + shelving:{ + pageTitles: { + shelving: 'Carros', + shelvingList: 'Listado de carros', + createShelving: 'Crear carro', + summary: 'Resumen', + basicData: 'Datos básicos', + }, + list: { + parking: 'Parking', + priority: 'Prioridad', + }, + summary: { + code: 'Código', + parking: 'Parking', + priority: 'Prioridad', + worker: 'Trabajador', + recyclable: 'Reciclable' + }, + basicData: { + code: 'Código', + parking: 'Parking', + priority: 'Prioridad', + recyclable: 'Reciclable' + } + }, worker: { pageTitles: { workers: 'Trabajadores', diff --git a/src/pages/Shelving/ShelvingFilter.vue b/src/pages/Shelving/ShelvingFilter.vue new file mode 100644 index 000000000..48e147adb --- /dev/null +++ b/src/pages/Shelving/ShelvingFilter.vue @@ -0,0 +1,112 @@ + + + + + +en: + params: + parkingFk: Parking + userFk: Worker + isRecyclable: Recyclable +es: + params: + parkingFk: Parking + userFk: Trabajador + isRecyclable: Reciclable + diff --git a/src/pages/Shelving/ShelvingList.vue b/src/pages/Shelving/ShelvingList.vue new file mode 100644 index 000000000..e18bb8b92 --- /dev/null +++ b/src/pages/Shelving/ShelvingList.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/src/pages/Shelving/ShelvingMain.vue b/src/pages/Shelving/ShelvingMain.vue new file mode 100644 index 000000000..66ce78f23 --- /dev/null +++ b/src/pages/Shelving/ShelvingMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/pages/Shelving/Summary/ShelvingBasicData.vue b/src/pages/Shelving/Summary/ShelvingBasicData.vue new file mode 100644 index 000000000..de2867e73 --- /dev/null +++ b/src/pages/Shelving/Summary/ShelvingBasicData.vue @@ -0,0 +1,105 @@ + + diff --git a/src/pages/Shelving/Summary/ShelvingSummary.vue b/src/pages/Shelving/Summary/ShelvingSummary.vue new file mode 100644 index 000000000..c35512e37 --- /dev/null +++ b/src/pages/Shelving/Summary/ShelvingSummary.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/pages/Shelving/Summary/ShelvingSummaryDialog.vue b/src/pages/Shelving/Summary/ShelvingSummaryDialog.vue new file mode 100644 index 000000000..137820c25 --- /dev/null +++ b/src/pages/Shelving/Summary/ShelvingSummaryDialog.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/Shelving/Summary/ShelvingSummaryPage.vue b/src/pages/Shelving/Summary/ShelvingSummaryPage.vue new file mode 100644 index 000000000..7b8f0388d --- /dev/null +++ b/src/pages/Shelving/Summary/ShelvingSummaryPage.vue @@ -0,0 +1,32 @@ + + diff --git a/src/pages/Shelving/components/ShelvingDescriptor.vue b/src/pages/Shelving/components/ShelvingDescriptor.vue new file mode 100644 index 000000000..a4a72a6f8 --- /dev/null +++ b/src/pages/Shelving/components/ShelvingDescriptor.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/pages/Shelving/components/ShelvingDescriptorMenu.vue b/src/pages/Shelving/components/ShelvingDescriptorMenu.vue new file mode 100644 index 000000000..6290cda75 --- /dev/null +++ b/src/pages/Shelving/components/ShelvingDescriptorMenu.vue @@ -0,0 +1,61 @@ + + + + +{ + "en": { + "deleteShelving": "Delete Shelving" + }, + "es": { + "deleteShelving": "Eliminar carro" + } +} + diff --git a/src/pages/Shelving/components/ShelvingDescriptorProxy.vue b/src/pages/Shelving/components/ShelvingDescriptorProxy.vue new file mode 100644 index 000000000..69cd63f6b --- /dev/null +++ b/src/pages/Shelving/components/ShelvingDescriptorProxy.vue @@ -0,0 +1,15 @@ + + diff --git a/src/pages/Shelving/components/ShelvingSearchbar.vue b/src/pages/Shelving/components/ShelvingSearchbar.vue new file mode 100644 index 000000000..89a4de01e --- /dev/null +++ b/src/pages/Shelving/components/ShelvingSearchbar.vue @@ -0,0 +1,20 @@ + + + + + + +es: + Search shelving: Buscar carros + You can search by shelving reference: Puedes buscar por referencia del carro + diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 2456e57aa..f93a38da2 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -3,8 +3,9 @@ import Ticket from './ticket'; import Claim from './claim'; import InvoiceOut from './invoiceOut'; import Worker from './worker'; +import Shelving from "./shelving"; import Wagon from './wagon'; import Route from './route'; import Supplier from './Supplier'; -export default [Customer, Ticket, Claim, InvoiceOut, Worker, Wagon, Route, Supplier]; +export default [Customer, Ticket, Claim, InvoiceOut, Worker, Shelving, Wagon, Route, Supplier]; diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js new file mode 100644 index 000000000..ee60d7461 --- /dev/null +++ b/src/router/modules/shelving.js @@ -0,0 +1,63 @@ +import {RouterView} from "vue-router"; + +export default { + path: '/shelving', + name: 'Shelving', + meta: { + title: 'shelving', + icon: 'vn:trolley' + }, + component: RouterView, + redirect: { name: 'ShelvingMain' }, + menus: { + main: ['ShelvingList'], + card: ['ShelvingBasicData'] + }, + children: [ + { + path: '', + name: 'ShelvingMain', + component: () => import('src/pages/Shelving/ShelvingMain.vue'), + redirect: { name: 'ShelvingList' }, + children: [ + { + path: 'list', + name: 'ShelvingList', + meta: { + title: 'shelvingList', + icon: 'vn:trolley', + }, + component: () => import('src/pages/Shelving/ShelvingList.vue'), + }, + ], + }, + { + name: 'ShelvingLayout', + path: ':id', + component: () => import('pages/Shelving/Summary/ShelvingSummaryPage.vue'), + redirect: { name: 'ShelvingSummary' }, + children: [ + { + name: 'ShelvingSummary', + path: 'summary', + meta: { + title: 'summary', + }, + component: () => + import('pages/Shelving/Summary/ShelvingSummary.vue'), + }, + { + name: 'ShelvingBasicData', + path: 'basic-data', + meta: { + title: 'basicData', + icon: 'vn:settings', + roles: ['salesPerson'], + }, + component: () => import('src/pages/Shelving/Summary/ShelvingBasicData.vue'), + }, + ], + }, + ] +}; + diff --git a/src/router/routes.js b/src/router/routes.js index faf340e0c..cf96631f7 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -6,6 +6,7 @@ import invoiceOut from './modules/invoiceOut'; import wagon from './modules/wagon'; import supplier from './modules/Supplier'; import route from './modules/route'; +import shelving from "src/router/modules/shelving"; const routes = [ { @@ -49,6 +50,7 @@ const routes = [ ticket, claim, worker, + shelving, invoiceOut, wagon, route, diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index ea4e175ab..b5b85c4b1 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -12,6 +12,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'ticket', 'invoiceOut', 'worker', + 'shelving', 'wagon', 'route', 'supplier',