summaryrefslogtreecommitdiffstats
path: root/webapp/src/router.js
diff options
context:
space:
mode:
authorUdo Walter2018-08-04 09:07:56 +0200
committerUdo Walter2018-08-04 09:07:56 +0200
commitebb9336648072ae56ff5bdc324645b21406c16f4 (patch)
treed886edcb04e45526b82ecb4d7cc24849c43366d0 /webapp/src/router.js
parent[webapp/groups] small bugfix (diff)
downloadbas-ebb9336648072ae56ff5bdc324645b21406c16f4.tar.gz
bas-ebb9336648072ae56ff5bdc324645b21406c16f4.tar.xz
bas-ebb9336648072ae56ff5bdc324645b21406c16f4.zip
small changes
Diffstat (limited to 'webapp/src/router.js')
-rw-r--r--webapp/src/router.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/webapp/src/router.js b/webapp/src/router.js
index 35d0d6a..7c530a9 100644
--- a/webapp/src/router.js
+++ b/webapp/src/router.js
@@ -4,6 +4,10 @@ import LoginPage from '@/components/LoginPage'
import DashboardPage from '@/components/DashboardPage'
import dashboardModules from '@/config/dashboard'
+dashboardModules.forEach(item => {
+ item.name = item.component.name
+})
+
Vue.use(Router)
function setChildren (routes, parent) {
@@ -12,7 +16,7 @@ function setChildren (routes, parent) {
route.children = setChildren(route.component.routes(), route.component)
}
if (route.name && parent && parent.name) route.name = parent.name + '.' + route.name
- else delete route.name
+ else if (parent) delete route.name
})
return routes
}
@@ -29,7 +33,7 @@ var router = new Router({
path: '/dashboard',
name: 'dashboard',
component: DashboardPage,
- children: setChildren(dashboardModules.concat(DashboardPage.routes()), DashboardPage)
+ children: setChildren(dashboardModules.concat(DashboardPage.routes()))
},
{
path: '*',