From 4a39e73625ac39623841e93a6adb8e6d0ffdcdc9 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 17 Nov 2022 14:03:50 +0100 Subject: [PATCH] refs #4834 @7h --- src/i18n/en/index.js | 38 +++ src/i18n/es/index.js | 37 +++ src/pages/Worker/Card/WorkerCard.vue | 43 +++ src/pages/Worker/Card/WorkerSummary.vue | 280 ++++++++++++++++++ src/pages/Worker/Card/WorkerSummaryDialog.vue | 21 ++ src/pages/Worker/WorkerList.vue | 92 ++++++ src/pages/Worker/WorkerMain.vue | 17 ++ src/router/modules/worker.js | 47 +++ src/router/routes.js | 2 + 9 files changed, 577 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerCard.vue create mode 100644 src/pages/Worker/Card/WorkerSummary.vue create mode 100644 src/pages/Worker/Card/WorkerSummaryDialog.vue create mode 100644 src/pages/Worker/WorkerList.vue create mode 100644 src/pages/Worker/WorkerMain.vue create mode 100644 src/router/modules/worker.js diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 229a5b995..687fbdce7 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -249,6 +249,44 @@ export default { returnOfMaterial: 'Return of material authorization (RMA)' }, }, + worker: { + pageTitles: { + workers: 'Workers', + list: 'List', + }, + list: { + name: 'Name', + email: 'Email', + phone: 'Phone', + mobile: 'Mobile', + active: 'Active', + department: 'Department', + schedule: 'Schedule', + }, + card: { + workerId: 'Worker ID', + name: 'Name', + email: 'Email', + phone: 'Phone', + mobile: 'Mobile', + active: 'Active', + warehouse: 'Warehouse', + agency: 'Agency', + salesPerson: 'Sales person', + }, + summary: { + basicData: 'Basic data', + boss: 'Boss', + phoneExtension: 'Phone extension', + entPhone: 'Enterprise phone', + personalPhone: 'Personal phone', + noBoss: 'No boss', + userData: 'User data', + userId: 'User ID', + role: 'Role', + sipExtension: 'Extension', + }, + }, components: { topbar: {}, userPanel: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index c8dff9d30..84586ab47 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -247,6 +247,43 @@ export default { picked: 'Recogida', returnOfMaterial: 'Autorización de retorno de materiales (RMA)' } + }, worker: { + pageTitles: { + workers: 'Trabajadores', + list: 'Listado', + }, + list: { + name: 'Nombre', + email: 'Email', + phone: 'Teléfono', + mobile: 'Móvil', + active: 'Activo', + department: 'Departamento', + schedule: 'Horario', + }, + card: { + workerId: 'ID Trabajador', + name: 'Nombre', + email: 'Email', + phone: 'Teléfono', + mobile: 'Móvil', + active: 'Activo', + warehouse: 'Almacén', + agency: 'Empresa', + salesPerson: 'Comercial', + }, + summary: { + basicData: 'Datos básicos', + boss: 'Jefe', + phoneExtension: 'Extensión de teléfono', + entPhone: 'Teléfono de empresa', + personalPhone: 'Teléfono personal', + noBoss: 'Sin jefe', + userData: 'Datos de usuario', + userId: 'ID del usuario', + role: 'Rol', + sipExtension: 'Extensión', + }, }, components: { topbar: {}, diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue new file mode 100644 index 000000000..856710e17 --- /dev/null +++ b/src/pages/Worker/Card/WorkerCard.vue @@ -0,0 +1,43 @@ + + diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue new file mode 100644 index 000000000..043622340 --- /dev/null +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -0,0 +1,280 @@ + + + + diff --git a/src/pages/Worker/Card/WorkerSummaryDialog.vue b/src/pages/Worker/Card/WorkerSummaryDialog.vue new file mode 100644 index 000000000..4eedb6f6a --- /dev/null +++ b/src/pages/Worker/Card/WorkerSummaryDialog.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/pages/Worker/WorkerList.vue b/src/pages/Worker/WorkerList.vue new file mode 100644 index 000000000..90a14d96d --- /dev/null +++ b/src/pages/Worker/WorkerList.vue @@ -0,0 +1,92 @@ + + + diff --git a/src/pages/Worker/WorkerMain.vue b/src/pages/Worker/WorkerMain.vue new file mode 100644 index 000000000..099e82879 --- /dev/null +++ b/src/pages/Worker/WorkerMain.vue @@ -0,0 +1,17 @@ + + + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js new file mode 100644 index 000000000..d5703d04b --- /dev/null +++ b/src/router/modules/worker.js @@ -0,0 +1,47 @@ +import { RouterView } from 'vue-router'; + +export default { + name: 'Worker', + path: '/worker', + meta: { + title: 'workers', + icon: 'vn:worker' + }, + component: RouterView, + redirect: { name: 'WorkerMain' }, + children: [ + { + name: 'WorkerMain', + path: '', + component: () => import('src/pages/Worker/WorkerMain.vue'), + redirect: { name: 'WorkerList' }, + children: [ + { + name: 'WorkerList', + path: 'list', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Worker/WorkerList.vue'), + }, + ] + }, + { + name: 'WorkerCard', + path: ':id', + component: () => import('src/pages/Worker/Card/WorkerCard.vue'), + redirect: { name: 'WorkerSummary' }, + children: [ + { + name: 'WorkerSummary', + path: 'summary', + meta: { + title: 'summary' + }, + component: () => import('src/pages/Worker/Card/WorkerSummary.vue'), + }, + ] + }, + ] +}; diff --git a/src/router/routes.js b/src/router/routes.js index a7261379f..4b9ca728c 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,6 +1,7 @@ import customer from './modules/customer'; import ticket from './modules/ticket'; import claim from './modules/claim'; +import worker from './modules/worker'; const routes = [ { @@ -25,6 +26,7 @@ const routes = [ customer, ticket, claim, + worker, { path: '/:pathMatch(.*)*', name: 'NotFound',