xpeditis2.0/apps/frontend/app
David b2f5d9968d fix: repair user management CRUD operations (create, update, delete)
Problems Fixed:

1. **User Creation (Invite)**
   -  Missing password field (required by API)
   -  Hardcoded organizationId 'default-org-id'
   -  Wrong role format (lowercase instead of ADMIN/USER/MANAGER)
   -  Now uses currentUser.organizationId from auth context
   -  Added password field with validation (min 8 chars)
   -  Fixed role enum to match backend (ADMIN, USER, MANAGER, VIEWER)

2. **Role Change (PATCH)**
   -  Used 'as any' masking type errors
   -  Lowercase role values
   -  Proper typing with uppercase roles
   -  Added success/error feedback
   -  Disabled state during mutation

3. **Toggle Active (PATCH)**
   -  Was working but added better feedback
   -  Added disabled state during mutation

4. **Delete User (DELETE)**
   -  Was working but added better feedback
   -  Added disabled state during mutation

5. **UI Improvements**
   - Added success messages with auto-dismiss (3s)
   - Added error messages with auto-dismiss (5s)
   - Added loading states on all action buttons
   - Fixed role badge colors to use uppercase keys
   - Better form validation before API call

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 23:35:10 +01:00
..
booking fix v0.2 2025-11-12 18:00:33 +01:00
dashboard fix: repair user management CRUD operations (create, update, delete) 2025-11-20 23:35:10 +01:00
forgot-password fix 2025-11-13 00:15:45 +01:00
login feature 2025-11-04 07:30:15 +01:00
register feature 2025-11-04 07:30:15 +01:00
reset-password fix 2025-11-13 00:15:45 +01:00
test-image feature 2025-11-04 07:30:15 +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
layout.tsx feature 2025-11-04 07:30:15 +01:00
page.tsx feature 2025-11-04 07:30:15 +01:00