From 31c0a58cecf957deeb1753748e149b0c59ec0b32 Mon Sep 17 00:00:00 2001 From: alexandre Date: Tue, 14 Mar 2023 14:20:37 +0100 Subject: [PATCH] refs #5056 working on section wagonTypeCreate --- src/i18n/en/index.js | 14 ++ src/i18n/es/index.js | 14 ++ src/pages/Wagon/WagonMain.vue | 17 +++ src/pages/Wagon/WagonTray.vue | 103 +++++++++++++++ src/pages/Wagon/WagonTypeCreate.vue | 191 ++++++++++++++++++++++++++++ src/router/modules/index.js | 4 +- src/router/modules/wagon.js | 35 +++++ src/router/routes.js | 2 + src/stores/useNavigationStore.js | 2 +- 9 files changed, 380 insertions(+), 2 deletions(-) create mode 100644 src/pages/Wagon/WagonMain.vue create mode 100644 src/pages/Wagon/WagonTray.vue create mode 100644 src/pages/Wagon/WagonTypeCreate.vue create mode 100644 src/router/modules/wagon.js diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index e61bbaab0..add2a29e9 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -386,6 +386,20 @@ export default { }, imageNotFound: 'Image not found', }, + wagon: { + pageTitles: { + wagons: 'Wagons', + list: 'List' + }, + type: { + name: 'Name', + nameNotEmpty: 'Name can not be empty', + maxTrays: 'You have reached the max number of trays', + saveMessage: 'Wagon type successfully saved', + submit: 'Submit', + reset: 'Reset' + } + }, components: { topbar: {}, userPanel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 2ca9d5ee9..91e69b13b 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -386,6 +386,20 @@ export default { }, imageNotFound: 'No se ha encontrado la imagen', }, + wagon: { + pageTitles: { + wagons: 'Vagones', + list: 'Listado' + }, + type: { + name: 'Nombre', + nameNotEmpty: 'El nombre no puede estar vacío', + maxTrays: 'Has alcanzado el número máximo de bandejas', + saveMessage: 'Tipo de vagón guardado correctamente', + submit: 'Guardar', + reset: 'Deshacer cambios' + } + }, components: { topbar: {}, userPanel: { diff --git a/src/pages/Wagon/WagonMain.vue b/src/pages/Wagon/WagonMain.vue new file mode 100644 index 000000000..2fb079daa --- /dev/null +++ b/src/pages/Wagon/WagonMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/pages/Wagon/WagonTray.vue b/src/pages/Wagon/WagonTray.vue new file mode 100644 index 000000000..ebbc0d0d3 --- /dev/null +++ b/src/pages/Wagon/WagonTray.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/pages/Wagon/WagonTypeCreate.vue b/src/pages/Wagon/WagonTypeCreate.vue new file mode 100644 index 000000000..c431b808e --- /dev/null +++ b/src/pages/Wagon/WagonTypeCreate.vue @@ -0,0 +1,191 @@ + + + + + + diff --git a/src/router/modules/index.js b/src/router/modules/index.js index ca8b3c958..30c51939d 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -3,11 +3,13 @@ import Ticket from './ticket'; import Claim from './claim'; import InvoiceOut from './invoiceOut'; import Worker from './worker'; +import Wagon from './wagon'; export default [ Customer, Ticket, Claim, InvoiceOut, - Worker + Worker, + Wagon ] diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js new file mode 100644 index 000000000..7059b3143 --- /dev/null +++ b/src/router/modules/wagon.js @@ -0,0 +1,35 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/wagon', + name: 'Wagon', + meta: { + title: 'wagons', + icon: 'contact_support', + }, + component: RouterView, + redirect: { name: 'WagonMain' }, + menus: { + main: ['WagonTypeList'], + card: [], + }, + children: [ + { + path: '', + name: 'WagonMain', + component: () => import('src/pages/Wagon/WagonMain.vue'), + redirect: { name: 'WagonTypeList' }, + children: [ + { + path: 'list', + name: 'WagonTypeCreate', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Wagon/WagonTypeCreate.vue'), + }, + ], + } + ], +}; diff --git a/src/router/routes.js b/src/router/routes.js index c92075a82..17a56505d 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -3,6 +3,7 @@ import ticket from './modules/ticket'; import claim from './modules/claim'; import worker from './modules/worker'; import invoiceOut from './modules/invoiceOut'; +import wagon from './modules/wagon'; const routes = [ { @@ -34,6 +35,7 @@ const routes = [ name: 'NotFound', component: () => import('../pages/NotFound.vue'), }, + wagon ], }, ]; diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index 3b2c7e8a7..bcaeeb953 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -6,7 +6,7 @@ import { useRole } from 'src/composables/useRole'; import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { - const modules = ['customer', 'claim', 'ticket', 'invoiceOut', 'worker']; + const modules = ['customer', 'claim', 'ticket', 'invoiceOut', 'worker', 'wagon']; const pinnedModules = ref([]); const role = useRole();