From 3d0ef52ff6cd2ecbc04c40221da100317f0783c0 Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 9 Mar 2022 10:48:42 +0100 Subject: [PATCH] Added customer module routing structure --- src/router/index.ts | 13 +++++++ src/views/Customer/Card/Card.vue | 1 + src/views/Customer/Customer.vue | 6 +-- src/views/Customer/List.vue | 63 ++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 src/views/Customer/Card/Card.vue create mode 100644 src/views/Customer/List.vue diff --git a/src/router/index.ts b/src/router/index.ts index 8183413d5..13a687c36 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -22,6 +22,19 @@ const routes: Array = [ path: '/customer', name: 'Customer', component: () => import('../views/Customer/Customer.vue'), + redirect: { name: 'List' }, + children: [ + { + path: 'list', + name: 'List', + component: () => import('../views/Customer/List.vue'), + }, + { + path: ':id', + name: 'Card', + component: () => import('../views/Customer/Card/Card.vue'), + }, + ], }, { path: '/:pathMatch(.*)*', diff --git a/src/views/Customer/Card/Card.vue b/src/views/Customer/Card/Card.vue new file mode 100644 index 000000000..a6a00bf67 --- /dev/null +++ b/src/views/Customer/Card/Card.vue @@ -0,0 +1 @@ + diff --git a/src/views/Customer/Customer.vue b/src/views/Customer/Customer.vue index 966b44bf5..2785996d8 100644 --- a/src/views/Customer/Customer.vue +++ b/src/views/Customer/Customer.vue @@ -1,7 +1,3 @@ - - diff --git a/src/views/Customer/List.vue b/src/views/Customer/List.vue new file mode 100644 index 000000000..a0add370f --- /dev/null +++ b/src/views/Customer/List.vue @@ -0,0 +1,63 @@ + + + + +