DONE: centralize theme color, interactive dashboard, increase winner result, refer TODO
This commit is contained in:
Vendored
+6
-1
@@ -1,8 +1,9 @@
|
||||
require('./bootstrap.js');
|
||||
import './styles/theme.css';
|
||||
require('./helper/autocloseMenu.js');
|
||||
//window.VueRouter = require('vue-router').default;
|
||||
//import VueRouter from 'vue-router';
|
||||
import Util from './util.js';
|
||||
import Util, { methods as utilMethods } from './util.js';
|
||||
import routes from './routesIndex.js';
|
||||
import OtpInput from "@bachdgvn/vue-otp-input";
|
||||
|
||||
@@ -19,6 +20,10 @@ const router = new VueRouter({
|
||||
});
|
||||
|
||||
router.beforeEach(function (to, from, next) {
|
||||
if (to.name === 'Voter Login' && utilMethods.isAdminPortalSession()) {
|
||||
var dest = utilMethods.getAdminEntryRoute();
|
||||
return next(Object.assign({}, dest, { replace: true }));
|
||||
}
|
||||
if (!to.path.startsWith('/admin') || to.name === 'Admin Login') {
|
||||
return next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user