feat(IAV-1227): Refactor users section with role-based pill toggle and UI cleanup
Summary
- Replace the role dropdown in the "Add User" modal with a pill toggle switch (Super Admin / Client Marchand)
- Add a role filter pill toggle above the users table to switch between Super Admin and Client Marchand views
- Remove the Rôle column from the users data table
- Remove the delete action from user rows (keep edit and status toggle only)
- Rename
UserRole.USERtoUserRole.COLLABORATOR, then remove it entirely as it's no longer needed - Update role labels: Admin → Client Marchand
- Clean up dead code: unused props (onView, onSettings, onDelete), delete confirm dialog, and handlers
- Set default pagination to 4 items per page with options [4, 8, 12]
- Expand mock data to 11 users (6 Super Admin, 5 Client Marchand)
Changes
-
src/types/user.ts— Remove COLLABORATOR from UserRole enum -
src/types/data-table.ts— Add limitOptions to DataTablePagination -
src/shared/sections/users/view.tsx— Add role pill toggle, remove dead handlers, update pagination -
src/shared/sections/users/components/add-user-modal.tsx— Replace role dropdown with pill toggle -
src/shared/sections/users/components/users-list.tsx— Remove role column, delete action, and dead props -
src/shared/sections/users/styles.ts— Update role labels and badge styles -
src/shared/components/ui/data-table/index.tsx— Pass limitOptions to PaginationFooter -
src/shared/_mock/user.ts— Update mock data (11 users, no collaborators)
Closes IAV-1227