DONE: centralize theme color, interactive dashboard, increase winner result, refer TODO

This commit is contained in:
ISMAIL MASSERAN
2026-05-10 11:51:19 +08:00
parent 654a0c9fea
commit fd1baf34c8
47 changed files with 2680 additions and 932 deletions
+6 -1
View File
@@ -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();
}