more typescript changes/conversion nonsense (this broke a lot of stuff)

This commit is contained in:
2025-11-17 16:00:20 -05:00
parent 881df1c2df
commit 74151dbf2d
5 changed files with 18 additions and 13 deletions

View File

@@ -17,7 +17,7 @@ const router = createRouter({
{ path: '/transfer', component: () => import('@/pages/Transfer.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/calendar', component: () => import('@/pages/Calendar.vue'), meta: { requiresAuth: true, memberOnly: true } },
{ path: '/trainingReport', component: () => import('@/pages/TrainingReport.vue'), meta: { requiresAuth: true, memberOnly: true } },
// ADMIN / STAFF ROUTES
{
path: '/administration',
@@ -47,12 +47,12 @@ router.beforeEach(async (to) => {
}
// Not logged in
if (to.meta.requiresAuth && !user.isLoggedIn) {
// Redirect back to original page after login
const redirectUrl = encodeURIComponent(window.location.origin + to.fullPath)
window.location.href = `https://aj17thdevapi.nexuszone.net/login?redirect=${redirectUrl}`
return false // Prevent Vue Router from continuing
}
// if (to.meta.requiresAuth && !user.isLoggedIn) {
// // Redirect back to original page after login
// const redirectUrl = encodeURIComponent(window.location.origin + to.fullPath)
// window.location.href = `https://aj17thdevapi.nexuszone.net/login?redirect=${redirectUrl}`
// return false // Prevent Vue Router from continuing
// }
// // Must be a member