2020-04-15 18:38:30 +02:00
|
|
|
import Vue from "vue";
|
|
|
|
import VueRouter from "vue-router";
|
|
|
|
import Home from "../views/Home.vue";
|
|
|
|
import Profile from "../views/profile.vue";
|
|
|
|
import missing from "../views/missing.vue";
|
|
|
|
import Info from "../views/Info.vue";
|
2020-04-25 18:01:26 +02:00
|
|
|
import TimeRecords from "../views/TimeRecords.vue";
|
2020-04-29 11:57:58 +02:00
|
|
|
import About from "../views/About.vue";
|
|
|
|
import Login from "../views/Login.vue";
|
2020-05-03 11:30:21 +02:00
|
|
|
import Register from "../views/Register.vue";
|
2020-05-21 10:21:32 +02:00
|
|
|
import StatisticOverview from "../views/StatisticOverview.vue";
|
|
|
|
import Users from "../views/Users.vue";
|
2020-05-15 12:40:59 +02:00
|
|
|
|
2020-04-15 18:38:30 +02:00
|
|
|
Vue.use(VueRouter);
|
|
|
|
|
|
|
|
const routes = [
|
|
|
|
{
|
|
|
|
path: "/",
|
|
|
|
name: "Home",
|
|
|
|
component: Home
|
|
|
|
},
|
2020-04-25 18:01:26 +02:00
|
|
|
{
|
|
|
|
path: "/timerecords",
|
|
|
|
name: "TimeRecords",
|
|
|
|
component: TimeRecords
|
|
|
|
},
|
2020-04-29 11:57:58 +02:00
|
|
|
{
|
|
|
|
path: "/login",
|
|
|
|
name: "Login",
|
|
|
|
component: Login
|
|
|
|
},
|
2020-05-03 11:30:21 +02:00
|
|
|
{
|
|
|
|
path: "/register",
|
|
|
|
name: "Register",
|
|
|
|
component: Register
|
|
|
|
},
|
2020-04-15 18:38:30 +02:00
|
|
|
{
|
|
|
|
path: "/profile/:id",
|
|
|
|
name: "Profile",
|
|
|
|
component: Profile,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'info',
|
|
|
|
name: 'Info',
|
|
|
|
component: Info
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/profile",
|
|
|
|
name: "ProfileMain",
|
|
|
|
component: Profile
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/about",
|
|
|
|
name: "About",
|
2020-04-29 11:57:58 +02:00
|
|
|
component: About
|
2020-04-15 18:38:30 +02:00
|
|
|
},
|
2020-05-04 19:10:38 +02:00
|
|
|
{
|
2020-05-17 17:32:50 +02:00
|
|
|
path: "/statistics",
|
|
|
|
name: "Statistics",
|
|
|
|
component: StatisticOverview
|
2020-05-04 19:10:38 +02:00
|
|
|
},
|
2020-05-21 10:21:32 +02:00
|
|
|
{
|
|
|
|
path: "/users",
|
|
|
|
name: "Users",
|
|
|
|
component: Users
|
|
|
|
},
|
2020-04-15 18:38:30 +02:00
|
|
|
{
|
|
|
|
path: '*',
|
|
|
|
component: missing
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
const router = new VueRouter({
|
|
|
|
mode: "history",
|
|
|
|
base: process.env.BASE_URL,
|
|
|
|
routes
|
|
|
|
});
|
|
|
|
|
|
|
|
export default router;
|