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:
15
middleware/board.ts
Normal file
15
middleware/board.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export default defineNuxtRouteMiddleware((to, from) => {
|
||||
const { isAuthenticated, isBoard, isAdmin } = useAuth();
|
||||
|
||||
if (!isAuthenticated.value) {
|
||||
return navigateTo('/login');
|
||||
}
|
||||
|
||||
// Only board members and admins can access board pages
|
||||
if (!isBoard.value && !isAdmin.value) {
|
||||
throw createError({
|
||||
statusCode: 403,
|
||||
statusMessage: 'Access denied. Board member privileges required.'
|
||||
});
|
||||
}
|
||||
});
|
||||
15
middleware/member.ts
Normal file
15
middleware/member.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export default defineNuxtRouteMiddleware((to, from) => {
|
||||
const { isAuthenticated, isUser, isBoard, isAdmin } = useAuth();
|
||||
|
||||
if (!isAuthenticated.value) {
|
||||
return navigateTo('/login');
|
||||
}
|
||||
|
||||
// Members, board members, and admins can all access member pages
|
||||
if (!isUser.value && !isBoard.value && !isAdmin.value) {
|
||||
throw createError({
|
||||
statusCode: 403,
|
||||
statusMessage: 'Access denied. Member privileges required.'
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user