87 lines
2.0 KiB
JavaScript
87 lines
2.0 KiB
JavaScript
import Vue from "vue";
|
|
import Router from "vue-router";
|
|
import Home from "./views/Home.vue";
|
|
import service from "./views/service.vue";
|
|
import dispatch from "./views/dispatch.vue";
|
|
import accounting from "./views/accounting.vue";
|
|
import administration from "./views/administration.vue";
|
|
import operations from "./views/operations.vue";
|
|
import notfound from "./views/notfound.vue";
|
|
|
|
Vue.use(Router);
|
|
|
|
export default new Router({
|
|
mode: "history",
|
|
base: process.env.BASE_URL,
|
|
routes: [
|
|
{
|
|
path: "/login",
|
|
name: "login",
|
|
component: () =>
|
|
import(/* webpackChunkName: "login" */ "./views/login.vue")
|
|
},
|
|
|
|
{
|
|
path: "/",
|
|
name: "home",
|
|
component: Home
|
|
},
|
|
{
|
|
path: "/about",
|
|
name: "about",
|
|
// route level code-splitting
|
|
// this generates a separate chunk (about.[hash].js) for this route
|
|
// which is lazy-loaded when the route is visited.
|
|
component: () =>
|
|
import(/* webpackChunkName: "about" */ "./views/About.vue")
|
|
},
|
|
{
|
|
path: "/log",
|
|
name: "log",
|
|
component: () => import(/* webpackChunkName: "log" */ "./views/log.vue")
|
|
},
|
|
{
|
|
path: "/inventory",
|
|
name: "inventory",
|
|
component: () =>
|
|
import(/* webpackChunkName: "inventory" */ "./views/inventory.vue")
|
|
},
|
|
{
|
|
path: "/service",
|
|
name: "service",
|
|
component: service
|
|
},
|
|
{
|
|
path: "/dispatch",
|
|
name: "dispatch",
|
|
component: dispatch
|
|
},
|
|
{
|
|
path: "/accounting",
|
|
name: "accounting",
|
|
component: accounting
|
|
},
|
|
{
|
|
path: "/admin",
|
|
name: "administration",
|
|
component: administration
|
|
},
|
|
{
|
|
path: "/ops",
|
|
name: "operations",
|
|
component: operations
|
|
},
|
|
{
|
|
path: "/inventory/widget/edit/:id",
|
|
name: "inventory-widget-edit",
|
|
component: () =>
|
|
import(/* webpackChunkName: "inventory-widget-edit" */ "./views/inventory-widget-edit.vue")
|
|
},
|
|
{
|
|
path: "*",
|
|
name: "notfound",
|
|
component: notfound
|
|
}
|
|
]
|
|
});
|