add customer view and edit
This commit is contained in:
18
src/pages/CustomerEdit.vue
Normal file
18
src/pages/CustomerEdit.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="notification">
|
||||
Edit customer by id: {{ $route.params.id }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'customer-edit-page',
|
||||
beforeCreate() {
|
||||
console.log('before create edit')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
18
src/pages/CustomerView.vue
Normal file
18
src/pages/CustomerView.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="notification">
|
||||
View customer by id: {{ $route.params.id }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'customer-view-page',
|
||||
beforeCreate() {
|
||||
console.log('before create view')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -5,6 +5,9 @@ import App from '../App.vue';
|
||||
|
||||
import Login from '../pages/Login.vue';
|
||||
import Customers from '../pages/Customers.vue';
|
||||
import CustomerView from '../pages/CustomerView.vue';
|
||||
import CustomerEdit from '../pages/CustomerEdit.vue';
|
||||
|
||||
import Orders from '../pages/Orders.vue';
|
||||
import About from '../pages/About.vue';
|
||||
|
||||
@@ -26,6 +29,14 @@ const routes = [{
|
||||
path: 'customers',
|
||||
name: 'customers',
|
||||
component: Customers,
|
||||
}, {
|
||||
path: 'customer/:id',
|
||||
name: 'customer-view',
|
||||
component: CustomerView,
|
||||
}, {
|
||||
path: 'customer/:id/edit',
|
||||
name: 'customer-edit',
|
||||
component: CustomerEdit,
|
||||
}, {
|
||||
path: 'orders',
|
||||
name: 'orders',
|
||||
|
||||
Reference in New Issue
Block a user