feat(portal): auth persistence, shift visibility, profile page, and UI polish

- Fix session persistence: add loading state to App.vue, hydrate portal store
  in router guards so page refresh preserves auth + event context
- Fix shift visibility for festivals: query child event time slots so shifts
  on sub-events appear in the portal
- Add profile page with editable personal info and password change
- Add backend endpoints: PUT /portal/profile and PUT /portal/password
- Fix registration form: make first_name/last_name editable for logged-in users
- Restyle login page: remove Vuexy illustration, center form with Crewli branding
- Improve dashboard StatusCard with action cards, icons, and upcoming shift count
- Enhance shift cards with status border colors and availability progress bars

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 10:19:14 +02:00
parent 838bee4d60
commit 59ad09fad2
17 changed files with 1145 additions and 254 deletions

View File

@@ -1,5 +1,6 @@
import type { Router } from 'vue-router'
import { useAuthStore } from '@/stores/useAuthStore'
import { usePortalStore } from '@/stores/usePortalStore'
const guestOnlyPaths = ['/login', '/wachtwoord-vergeten', '/wachtwoord-resetten']
@@ -11,6 +12,12 @@ export function setupGuards(router: Router) {
await authStore.initialize()
}
// Hydrate portal data once after auth is confirmed
if (authStore.isAuthenticated) {
const portalStore = usePortalStore()
await portalStore.hydrateIfNeeded()
}
const requiresAuth = to.meta.requiresAuth === true
// Public routes — no auth check needed