Library/frontend/src/router/index.js

115 lines
2.5 KiB
JavaScript
Raw Normal View History

2017-11-09 09:31:03 +00:00
import Vue from 'vue'
import Router from 'vue-router'
2017-11-09 11:19:53 +00:00
import Home from '@/components/Home'
import Login from '@/components/Login'
2017-11-09 14:12:04 +00:00
import Books from '@/components/Books'
import BooksAddEdit from '@/components/BooksAddEdit'
2017-11-21 12:23:46 +00:00
import BookOverview from '@/components/BookOverview'
2017-11-21 10:16:07 +00:00
import Authors from '@/components/Authors'
import AuthorsAddEdit from '@/components/AuthorsAddEdit'
2017-11-21 12:32:34 +00:00
import AuthorOverview from '@/components/AuthorOverview'
import Publishers from '@/components/Publishers'
import PublishersAddEdit from '@/components/PublishersAddEdit'
2017-11-21 12:38:20 +00:00
import PublisherOverview from '@/components/PublisherOverview'
2017-11-29 13:51:51 +00:00
import Items from '@/components/Items'
import ItemsOverview from '@/components/ItemOverview'
import ItemsAddEdit from '@/components/ItemsAddEdit'
2017-11-09 09:31:03 +00:00
Vue.use(Router)
export default new Router({
routes: [
{
2017-11-24 09:53:15 +00:00
path: '/',
2017-11-17 13:07:41 +00:00
name: 'home',
2017-11-09 11:19:53 +00:00
component: Home
},
{
path: '/login',
2017-11-17 13:07:41 +00:00
name: 'login',
2017-11-09 11:19:53 +00:00
component: Login
2017-11-09 14:12:04 +00:00
},
{
path: '/books',
2017-11-17 13:07:41 +00:00
name: 'books',
2017-11-09 14:12:04 +00:00
component: Books
},
{
path: '/books/add',
2017-11-17 13:07:41 +00:00
name: 'add-book',
component: BooksAddEdit
},
{
path: '/books/:id/edit',
name: 'book-edit',
component: BooksAddEdit
2017-11-21 10:16:07 +00:00
},
2017-11-21 12:23:46 +00:00
{
path: '/books/:id',
name: 'book-show',
component: BookOverview
},
2017-11-21 10:16:07 +00:00
{
path: '/authors',
name: 'authors',
component: Authors
},
{
path: '/authors/add',
name: 'authors-add',
component: AuthorsAddEdit
},
{
path: '/authors/:id/edit',
name: 'author-edit',
component: AuthorsAddEdit
},
2017-11-21 12:32:34 +00:00
{
path: '/authors/:id',
name: 'author-show',
component: AuthorOverview
},
{
path: '/publishers',
name: 'publishers',
component: Publishers
},
{
path: '/publishers/add',
name: 'publishers-add',
component: PublishersAddEdit
},
2017-11-21 12:38:20 +00:00
{
path: '/publishers/:id',
name: 'publisher-show',
component: PublisherOverview
},
{
path: '/publishers/:id/edit',
name: 'publisher-edit',
component: PublishersAddEdit
2017-11-29 13:51:51 +00:00
},
{
path: '/items',
name: 'items',
component: Items
},
{
path: '/items/add',
name: 'item-add',
component: ItemsAddEdit
},
{
path: '/items/:id',
name: 'item-show',
component: ItemsOverview
},
{
path: '/items/:id/edit',
name: 'item-edit',
component: ItemsAddEdit
2017-11-09 09:31:03 +00:00
}
2017-11-09 15:27:43 +00:00
],
linkActiveClass: 'active'
2017-11-09 09:31:03 +00:00
})