add customer view and edit

This commit is contained in:
2017-03-22 11:08:12 -07:00
parent 7a3d38f7ee
commit 253d3eb6f6
3 changed files with 47 additions and 0 deletions

View 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>

View 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>

View File

@@ -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',