Complete infrastructure reorganization to role-based structure
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:
2025-08-30 22:44:04 +02:00
parent 7c49b9db66
commit 9fa9db9b8a
9 changed files with 3177 additions and 3 deletions

View File

@@ -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 });