xpeditis2.0/apps/frontend/app
David 2054e73e78 fix: resolve profile page data persistence and password change issues
Fixed critical issues with the profile page (/dashboard/profile):

1. **Form data not persisting on page refresh**:
   - Added useEffect to update form values when user data loads
   - Forms now properly populate after auth context loads user data

2. **Blank page on refresh**:
   - Added loading and error states for better UX
   - Handle case where user is not loaded yet (loading spinner)
   - Handle case where user fails to load (retry button)

3. **Password change API endpoint correction**:
   - Fixed: POST /api/v1/users/change-password (incorrect)
   - Corrected to: PATCH /api/v1/users/me/password (matches backend)
   - Updated return type to include { message: string }

The root cause was that useForm defaultValues were set once at
component mount when user was still null. The form never updated
when user data was subsequently loaded by the auth context.

Now the form properly resets with user data via useEffect, and
proper loading/error states prevent showing a blank page.

Refs: apps/frontend/app/dashboard/profile/page.tsx:68-78

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-12 18:18:04 +01:00
..
booking fix v1.0.0 2025-12-23 11:49:57 +01:00
carrier fix: use environment variable for API URL in carrier accept/reject pages 2025-12-23 13:04:29 +01:00
dashboard fix: resolve profile page data persistence and password change issues 2026-01-12 18:18:04 +01:00
demo-carte fix carte 2025-12-03 22:24:48 +01:00
forgot-password fix 2025-11-13 00:15:45 +01:00
login contexte user reparer 2025-11-30 17:50:05 +01:00
register send invitations 2025-11-30 13:39:32 +01:00
reset-password fix 2025-11-13 00:15:45 +01:00
test-image fix v1.0.0 2025-12-23 11:49:57 +01:00
verify-email fix 2025-11-13 00:15:45 +01:00
globals.css fix landing page , login , register 2025-10-31 12:38:05 +01:00
icon.svg fix icon 2025-12-23 19:14:13 +01:00
layout.tsx fix icon 2025-12-23 19:14:13 +01:00
page.tsx feature 2025-11-04 07:30:15 +01:00