2025-08-07 12:28:41 +02:00
|
|
|
<template>
|
|
|
|
|
<div class="dashboard-router">
|
|
|
|
|
<v-container v-if="loading" class="fill-height">
|
|
|
|
|
<v-row justify="center" align="center">
|
|
|
|
|
<v-col cols="auto" class="text-center">
|
|
|
|
|
<v-progress-circular
|
|
|
|
|
indeterminate
|
|
|
|
|
color="primary"
|
|
|
|
|
size="64"
|
|
|
|
|
width="6"
|
|
|
|
|
/>
|
|
|
|
|
<p class="mt-4 text-h6">Loading your dashboard...</p>
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
</v-container>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
definePageMeta({
|
2025-08-07 17:21:18 +02:00
|
|
|
middleware: 'auth',
|
|
|
|
|
layout: 'dashboard'
|
2025-08-07 12:28:41 +02:00
|
|
|
});
|
|
|
|
|
|
2025-08-07 17:21:18 +02:00
|
|
|
const { user, userTier } = useAuth();
|
2025-08-07 12:28:41 +02:00
|
|
|
const loading = ref(true);
|
|
|
|
|
|
2025-08-07 17:21:18 +02:00
|
|
|
// Route to tier-specific dashboard - auth middleware ensures user is authenticated
|
|
|
|
|
onMounted(() => {
|
feat: Reorganize platform into member, board, and admin sections
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>
2025-08-30 22:00:59 +02:00
|
|
|
console.log('🔄 Dashboard mounted, routing to role-specific section...');
|
2025-08-07 14:42:05 +02:00
|
|
|
|
feat: Reorganize platform into member, board, and admin sections
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>
2025-08-30 22:00:59 +02:00
|
|
|
// Auth middleware has already verified authentication - route based on highest privilege
|
2025-08-07 17:21:18 +02:00
|
|
|
if (user.value && userTier.value) {
|
2025-08-30 22:24:27 +02:00
|
|
|
// Use old structure for now until new pages are fully deployed
|
|
|
|
|
let targetRoute = `/dashboard/${userTier.value}`;
|
feat: Reorganize platform into member, board, and admin sections
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>
2025-08-30 22:00:59 +02:00
|
|
|
|
|
|
|
|
console.log('🔄 Routing to role-specific dashboard:', targetRoute);
|
|
|
|
|
navigateTo(targetRoute, { replace: true });
|
2025-08-07 14:42:05 +02:00
|
|
|
} else {
|
2025-08-07 17:21:18 +02:00
|
|
|
console.warn('❌ No user or tier found - this should not happen after auth middleware');
|
|
|
|
|
// Fallback - middleware should have caught this
|
|
|
|
|
navigateTo('/login');
|
2025-08-07 12:28:41 +02:00
|
|
|
}
|
2025-08-07 14:42:05 +02:00
|
|
|
|
|
|
|
|
loading.value = false;
|
2025-08-07 12:28:41 +02:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.dashboard-router {
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.v-progress-circular {
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
</style>
|