From 78baa306b07dd531a3c01a1d534ddd3fbaf2aa8f Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 12 Apr 2022 14:53:43 +0200 Subject: [PATCH 1/8] Make use of slot --- src/layouts/MainLayout.vue | 36 ++++++++------------ src/pages/Customer/Card/CustomerCard.vue | 18 +++++----- src/pages/Customer/CustomerLayout.vue | 15 +++++++++ src/pages/Dashboard/DashboardLayout.vue | 17 ++++++++++ src/router/routes.js | 42 ++++++++++++++++++++++-- 5 files changed, 93 insertions(+), 35 deletions(-) create mode 100644 src/pages/Dashboard/DashboardLayout.vue diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 480617886..c26912fa4 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -1,36 +1,26 @@ - + diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue index 152c8cfdc..02db481f6 100644 --- a/src/pages/Customer/Card/CustomerCard.vue +++ b/src/pages/Customer/Card/CustomerCard.vue @@ -1,15 +1,15 @@ + + diff --git a/src/pages/Customer/CustomerLayout.vue b/src/pages/Customer/CustomerLayout.vue index 2785996d8..755652635 100644 --- a/src/pages/Customer/CustomerLayout.vue +++ b/src/pages/Customer/CustomerLayout.vue @@ -1,3 +1,18 @@ + diff --git a/src/pages/Dashboard/DashboardLayout.vue b/src/pages/Dashboard/DashboardLayout.vue new file mode 100644 index 000000000..917b15059 --- /dev/null +++ b/src/pages/Dashboard/DashboardLayout.vue @@ -0,0 +1,17 @@ + + diff --git a/src/router/routes.js b/src/router/routes.js index d4b63df1d..168a907e2 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -1,4 +1,4 @@ -import customer from './modules/customer'; +//import customer from './modules/customer'; import ticket from './modules/ticket'; const routes = [ @@ -18,7 +18,43 @@ const routes = [ path: '/dashboard', name: 'Dashboard', meta: { title: 'dashboard', icon: 'dashboard' }, - component: () => import('../pages/Dashboard/Dashboard.vue'), + component: () => import('../pages/Dashboard/DashboardLayout.vue'), + }, + { + path: '/customer', + name: 'Customer', + meta: { + title: 'customers', + icon: 'vn:client', + roles: ['salesPerson'], + }, + component: () => import('src/pages/Customer/CustomerLayout.vue'), + redirect: { name: 'CustomerList' }, + children: [ + { + path: 'list', + name: 'CustomerList', + meta: { + title: 'list' + }, + component: () => import('src/pages/Customer/CustomerList.vue'), + }, + { + path: ':id', + component: () => import('src/pages/Customer/Card/CustomerCard.vue'), + redirect: { name: 'CustomerBasicData' }, + children: [ + { + path: 'basic-data', + name: 'CustomerBasicData', + meta: { + title: 'basicData' + }, + component: () => import('src/pages/Customer/Card/CustomerBasicData.vue'), + } + ] + }, + ] }, /* { path: '/:pathMatch(.*)*', @@ -26,7 +62,7 @@ const routes = [ component: () => import('../pages/NotFound.vue'), }, */ // Module routes - customer, + //customer, ticket, ], }, From 9123ce9f5f45974a1904c78fd6c584e4a1ce6007 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 19 Apr 2022 11:03:37 +0200 Subject: [PATCH 2/8] Changes --- src/layouts/MainLayout.vue | 7 +------ src/pages/Customer/CustomerLayout.vue | 15 --------------- src/pages/Customer/CustomerList.vue | 22 ++++++++-------------- src/pages/Customer/CustomerMain.vue | 21 +++++++++++++++++++++ src/router/routes.js | 22 +++++++++++++++------- 5 files changed, 45 insertions(+), 42 deletions(-) create mode 100644 src/pages/Customer/CustomerMain.vue diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index c26912fa4..4d43d79b8 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -13,12 +13,7 @@ import Navbar from 'src/components/Navbar.vue'; diff --git a/src/pages/Customer/CustomerLayout.vue b/src/pages/Customer/CustomerLayout.vue index 755652635..2785996d8 100644 --- a/src/pages/Customer/CustomerLayout.vue +++ b/src/pages/Customer/CustomerLayout.vue @@ -1,18 +1,3 @@ - diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 47960b007..22dc02b7b 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -25,9 +25,14 @@ const customers = [ function navigate(id) { router.push({ path: `/customer/${id}` }); } + +// function onToggleDrawer() { +// drawer.value = !drawer.value; +// }