2018-03-09 19:46:34 +03:00
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
import Router from 'vue-router';
|
|
|
|
|
import Users from './views/Users';
|
|
|
|
|
|
|
|
|
|
Vue.use(Router);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This is the list of routes where the vuejs app will
|
|
|
|
|
* take over php to provide data
|
|
|
|
|
* You need to forward the php routing (routes.php) to
|
|
|
|
|
* /settings/main.php, where the vue-router will ensure
|
|
|
|
|
* the proper route.
|
|
|
|
|
* ⚠️ Routes needs to match the php routes.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export default new Router({
|
2018-04-09 12:03:21 +03:00
|
|
|
|
mode: 'history',
|
2018-05-09 16:37:35 +03:00
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: '/:index(index.php/)?settings/users',
|
|
|
|
|
component: Users,
|
|
|
|
|
props: true,
|
|
|
|
|
name: 'users',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: ':selectedGroup',
|
|
|
|
|
name: 'group',
|
|
|
|
|
component: Users
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
});
|