This commit is contained in:
@ -14,6 +14,7 @@ import { devPage } from './pages/dev.js';
|
||||
import { insightsPage } from './pages/insights.js';
|
||||
import { coachesPage } from './pages/coaches.js';
|
||||
import { sessionsPage } from './pages/sessions.js';
|
||||
import { schedulePage } from './pages/schedule.js';
|
||||
import { openChangeOwnPasswordModal } from './password-modal.js';
|
||||
|
||||
// Auth state
|
||||
@ -136,6 +137,9 @@ function updateNav() {
|
||||
if (!active && href === '/sessions' && hash.startsWith('/sessions')) {
|
||||
active = true;
|
||||
}
|
||||
if (!active && href === '/schedule' && hash.startsWith('/schedule')) {
|
||||
active = true;
|
||||
}
|
||||
if (!active && href !== '/' && hash.startsWith(href)) {
|
||||
active = true;
|
||||
}
|
||||
@ -160,6 +164,7 @@ addRoute('/login', loginPage);
|
||||
addRoute('/', roleGuard(['admin', 'supervisor'], homeDashboardPage));
|
||||
addRoute('/questionnaires', authGuard(questionnairesPage));
|
||||
addRoute('/sessions', roleGuard(['admin', 'supervisor'], sessionsPage));
|
||||
addRoute('/schedule', roleGuard(['admin', 'supervisor'], schedulePage));
|
||||
addRoute('/questionnaire/new', authGuard(editorPage));
|
||||
addRoute('/questionnaire/:id/results', authGuard(resultsPage));
|
||||
addRoute('/questionnaire/:id', authGuard(editorPage));
|
||||
|
||||
Reference in New Issue
Block a user