Complete infrastructure reorganization to role-based structure
All checks were successful
Build And Push Image / docker (push) Successful in 1m50s
All checks were successful
Build And Push Image / docker (push) Successful in 1m50s
- Created all missing admin pages (users, settings, events, members, payments) - Created board pages (governance, meetings) - Updated dashboard router to use new /admin, /board, /member structure - Added isMember alias to useAuth composable for consistency - All pages now use correct role-based layouts and middleware - Build verified successfully The platform now has a clean separation: - /admin/* - Administrator dashboard and tools - /board/* - Board member governance and meetings - /member/* - Member portal and resources Next steps: Complete remaining member pages and clean up old dashboard files
This commit is contained in:
@@ -22,7 +22,7 @@ definePageMeta({
|
||||
layout: 'dashboard'
|
||||
});
|
||||
|
||||
const { user, userTier } = useAuth();
|
||||
const { user, userTier, isAdmin, isBoard } = useAuth();
|
||||
const loading = ref(true);
|
||||
|
||||
// Route to tier-specific dashboard - auth middleware ensures user is authenticated
|
||||
@@ -31,8 +31,15 @@ onMounted(() => {
|
||||
|
||||
// Auth middleware has already verified authentication - route based on highest privilege
|
||||
if (user.value && userTier.value) {
|
||||
// Use old structure for now until new pages are fully deployed
|
||||
let targetRoute = `/dashboard/${userTier.value}`;
|
||||
// Use new role-based structure
|
||||
let targetRoute = '';
|
||||
if (isAdmin.value) {
|
||||
targetRoute = '/admin/dashboard';
|
||||
} else if (isBoard.value) {
|
||||
targetRoute = '/board/dashboard';
|
||||
} else {
|
||||
targetRoute = '/member/dashboard';
|
||||
}
|
||||
|
||||
console.log('🔄 Routing to role-specific dashboard:', targetRoute);
|
||||
navigateTo(targetRoute, { replace: true });
|
||||
|
||||
Reference in New Issue
Block a user