Conversation
* Introduce CustomUser entity with fields for first name, last name, job title, department, email, and phone * Add CustomUserRepository for entity management * Create migration for custom_user table
* Add endpoints to create and delete custom users * Include custom users in user listing with proper flags * Handle photo upload and deletion for custom users * Refactor error handling and photo storage logic
* Add CustomUserModal component for user creation * Update UserGrid to display "add user" card for admins * Integrate custom user creation flow with useUsers hook * Refresh user list after successful creation
* Refine CustomUserModal styles and accessibility * Update labels and required field indicators * Add loading state to submit button with spinner * Introduce AddUserCard component for user grid * Enhance user grid with new add collaborator card
* Add form validation for required fields (first name, last name, email) * Disable submit button when form is invalid or loading * Trim input values on change * Update phone placeholder and button disabled styles
* Replace hardcoded status codes with Symfony Response constants * Improve code readability and maintainability
* Add PATCH endpoint to update custom users * Refactor delete endpoint to use entity injection * Extract user hydration and validation to private method * Improve error handling and response codes
* Support editing existing users with pre-filled form data * Update modal title and icon based on mode (create/edit) * Adjust submit button label and icon for edit mode
* Add handleUpdateCustomUser to support PATCH for custom users * Refactor API calls to centralize base URL and auth headers * Improve cache management and error handling * Update return values and success messages for consistency
* Add edit button to custom user cards for admins * Implement modal for editing custom users with pre-filled data * Update UserGrid to handle both create and edit custom user modals
* Add defaults for firstName and lastName to prevent errors * Update display and alt text to use safe values
* Remove redundant authHeaders and handle401 callbacks * Use consistent Authorization header construction * Inline 401 error handling for all user-related API calls * Rename API_BASE to apiBase for naming consistency
* Include created user's ID in the response payload * Improve API feedback for client integrations
* Replace "Utilisateur" with "Collaborateur" in API responses * Ensure consistent terminology for create, update, and delete actions
* Use returned userId and message from API on user creation * Update user state with constructed user object * Display dynamic success messages from API on create and update
* Ensure PATCH requests to custom-users API use userId without 'custom_' prefix * Prevents potential API errors when updating custom users
* Set jobTitle to 'Agent' if empty * Set department to 'Non renseigné' if empty
* Remove unused animation variants and transition * Use a simpler opacity animation with fixed duration
* Delete UserIgnore and UserPhoto entities linked to custom user * Remove physical photo file if it exists before deleting UserPhoto
* Add optional title and description props * Allow overriding default modal text * Improve button hover/tap handling when loading
* Add delete button for custom users in UserCard (admin only) * Implement delete confirmation modal in UserGrid * Add handleDeleteCustomUser logic in useUsers hook * Wire delete handler through App, UserGrid, and UserCard
* Make sorting case-insensitive * Sort by first name when last names are equal
* Change HTTP status to 503 Service Unavailable on exception * Update test to expect new error message for LDAP connection issues
* Return 404 error if user not found in AD when resetting photo * Prevents null reference errors and improves error messaging
* Verify getter and setter methods for all CustomUser properties * Ensure getId returns null before persistence
* Clean up UserPhotoTest by removing unnecessary comments * Remove redundant fluent interface test from UserIgnoreTest
* Add tests for listing, creating, updating, and deleting custom users * Cover validation errors for missing names and invalid emails * Ensure related entities (photos, ignores) are handled on delete * Test photo upload and deletion for custom users in AD mode
Cold-FR
added a commit
that referenced
this pull request
Mar 31, 2026
* feat(user): add CustomUser entity and repository * Introduce CustomUser entity with fields for first name, last name, job title, department, email, and phone * Add CustomUserRepository for entity management * Create migration for custom_user table * feat(api): support create/delete custom users * Add endpoints to create and delete custom users * Include custom users in user listing with proper flags * Handle photo upload and deletion for custom users * Refactor error handling and photo storage logic * feat(ui): add custom user creation modal * Add CustomUserModal component for user creation * Update UserGrid to display "add user" card for admins * Integrate custom user creation flow with useUsers hook * Refresh user list after successful creation * feat(ui): improve custom user modal and add card * Refine CustomUserModal styles and accessibility * Update labels and required field indicators * Add loading state to submit button with spinner * Introduce AddUserCard component for user grid * Enhance user grid with new add collaborator card * style(ui): adjust AddUserCard button animation * feat(ui): validate custom user form and improve UX * Add form validation for required fields (first name, last name, email) * Disable submit button when form is invalid or loading * Trim input values on change * Update phone placeholder and button disabled styles * fix(api): use Response constants for error status codes * Replace hardcoded status codes with Symfony Response constants * Improve code readability and maintainability * feat(api): add update and delete for custom users * Add PATCH endpoint to update custom users * Refactor delete endpoint to use entity injection * Extract user hydration and validation to private method * Improve error handling and response codes * feat(ui): add edit mode to custom user modal * Support editing existing users with pre-filled form data * Update modal title and icon based on mode (create/edit) * Adjust submit button label and icon for edit mode * feat(api): add update custom user functionality * Add handleUpdateCustomUser to support PATCH for custom users * Refactor API calls to centralize base URL and auth headers * Improve cache management and error handling * Update return values and success messages for consistency * feat(ui): add edit custom user modal for admins * Add edit button to custom user cards for admins * Implement modal for editing custom users with pre-filled data * Update UserGrid to handle both create and edit custom user modals * fix(ui): remove default empty string for email in edit form * fix(ui): handle missing user fields in UserCard * Add defaults for firstName and lastName to prevent errors * Update display and alt text to use safe values * refactor(api): simplify user API calls and error handling * Remove redundant authHeaders and handle401 callbacks * Use consistent Authorization header construction * Inline 401 error handling for all user-related API calls * Rename API_BASE to apiBase for naming consistency * feat(api): return userId on custom user creation * Include created user's ID in the response payload * Improve API feedback for client integrations * fix(api): update success messages for custom user actions * Replace "Utilisateur" with "Collaborateur" in API responses * Ensure consistent terminology for create, update, and delete actions * feat(api): update user creation and update responses * Use returned userId and message from API on user creation * Update user state with constructed user object * Display dynamic success messages from API on create and update * fix(api): remove custom_ prefix from userId in PATCH * Ensure PATCH requests to custom-users API use userId without 'custom_' prefix * Prevents potential API errors when updating custom users * fix(api): set default values for jobTitle and department * Set jobTitle to 'Agent' if empty * Set department to 'Non renseigné' if empty * refactor(ui): simplify UserCard motion animation * Remove unused animation variants and transition * Use a simpler opacity animation with fixed duration * fix(api): remove related ignores and photos on custom user delete * Delete UserIgnore and UserPhoto entities linked to custom user * Remove physical photo file if it exists before deleting UserPhoto * feat(ui): make ConfirmDeleteModal title and description customizable * Add optional title and description props * Allow overriding default modal text * Improve button hover/tap handling when loading * feat(ui): add custom user delete functionality * Add delete button for custom users in UserCard (admin only) * Implement delete confirmation modal in UserGrid * Add handleDeleteCustomUser logic in useUsers hook * Wire delete handler through App, UserGrid, and UserCard * feat(api): improve user sorting by last and first name * Make sorting case-insensitive * Sort by first name when last names are equal * fix(api): update error response for user fetch failure * Change HTTP status to 503 Service Unavailable on exception * Update test to expect new error message for LDAP connection issues * fix(api): handle missing user in AD photo reset * Return 404 error if user not found in AD when resetting photo * Prevents null reference errors and improves error messaging * test(entity): add unit tests for CustomUser getters/setters * Verify getter and setter methods for all CustomUser properties * Ensure getId returns null before persistence * test(entity): remove redundant and commented assertions * Clean up UserPhotoTest by removing unnecessary comments * Remove redundant fluent interface test from UserIgnoreTest * test(api): add integration tests for custom user CRUD * Add tests for listing, creating, updating, and deleting custom users * Cover validation errors for missing names and invalid emails * Ensure related entities (photos, ignores) are handled on delete * Test photo upload and deletion for custom users in AD mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.