feat: Reorganize platform into member, board, and admin sections
Some checks failed
Build And Push Image / docker (push) Failing after 55s
Some checks failed
Build And Push Image / docker (push) Failing after 55s
Major platform reorganization implementing role-based portal sections: ## Infrastructure Changes - Created role-based middleware for member, board, and admin access - Updated main dashboard router to redirect based on highest privilege - Implemented access hierarchy: Admin > Board > Member ## New Layouts - Member layout: Simplified navigation for regular members - Board layout: Enhanced tools for board member management - Admin layout: Full system administration capabilities ## Member Portal (/member/*) - Dashboard: Profile overview, events, payments, activity tracking - Events: Browse, register, and manage event participation - Profile: Complete personal and professional information management - Resources: Access to documents, guides, FAQs, and quick links ## Board Portal (/board/*) - Dashboard: Statistics, dues management, board-specific tools - Members: Comprehensive member management with filtering ## Admin Portal (/admin/*) - Dashboard: System overview and administrative controls (existing) ## Design Implementation - Monaco red (#dc2626) as primary accent color - Modern card-based layouts with consistent spacing - Responsive design for all screen sizes - Glass morphism effects for enhanced visual appeal This reorganization provides clear separation of concerns based on user privileges while maintaining a cohesive user experience across all sections. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -27,13 +27,23 @@ const loading = ref(true);
|
||||
|
||||
// Route to tier-specific dashboard - auth middleware ensures user is authenticated
|
||||
onMounted(() => {
|
||||
console.log('🔄 Dashboard mounted, routing to tier-specific page...');
|
||||
console.log('🔄 Dashboard mounted, routing to role-specific section...');
|
||||
|
||||
// Auth middleware has already verified authentication - just route to tier page
|
||||
// Auth middleware has already verified authentication - route based on highest privilege
|
||||
if (user.value && userTier.value) {
|
||||
const tierRoute = `/dashboard/${userTier.value}`;
|
||||
console.log('🔄 Routing to tier-specific dashboard:', tierRoute);
|
||||
navigateTo(tierRoute, { replace: true });
|
||||
let targetRoute = '/member/dashboard';
|
||||
|
||||
// Route to the highest privilege level section
|
||||
if (userTier.value === 'admin') {
|
||||
targetRoute = '/admin/dashboard';
|
||||
} else if (userTier.value === 'board') {
|
||||
targetRoute = '/board/dashboard';
|
||||
} else {
|
||||
targetRoute = '/member/dashboard';
|
||||
}
|
||||
|
||||
console.log('🔄 Routing to role-specific dashboard:', targetRoute);
|
||||
navigateTo(targetRoute, { replace: true });
|
||||
} else {
|
||||
console.warn('❌ No user or tier found - this should not happen after auth middleware');
|
||||
// Fallback - middleware should have caught this
|
||||
|
||||
Reference in New Issue
Block a user