Labels: frontend admin users
Area: frontend/app/(auth)/admin/users/UsersClient.tsx, frontend/app/(auth)/admin/users/page.tsx
Difficulty: Advanced
Description
The users management page lets privileged admins manage all admin users in the system. It shows 4 stat cards (total, active, inactive, roles distribution), a filterable user table, and supports inline role changes and account status toggles. Access is filtered by role — SUPER_ADMIN sees all users; other roles cannot see SUPER_ADMIN accounts.
Acceptance Criteria
Technical Notes
UserTable is pre-built in @/components/admin/users/UserTable
- Read current role from
useAuthStore to determine filtering and button visibility
- On successful mutation, invalidate the users query
Labels:
frontendadminusersArea:
frontend/app/(auth)/admin/users/UsersClient.tsx,frontend/app/(auth)/admin/users/page.tsxDifficulty: Advanced
Description
The users management page lets privileged admins manage all admin users in the system. It shows 4 stat cards (total, active, inactive, roles distribution), a filterable user table, and supports inline role changes and account status toggles. Access is filtered by role — SUPER_ADMIN sees all users; other roles cannot see SUPER_ADMIN accounts.
Acceptance Criteria
frontend/app/(auth)/admin/users/page.tsx(server component,metadata: { title: "Users" }, renders<UsersPage />)frontend/app/(auth)/admin/users/UsersClient.tsxas a"use client"component<RoleProtectedPage>adminApi.getUsers())SUPER_ADMINfrom the displayed list/admin/users/new)<UserTable>supporting:Technical Notes
UserTableis pre-built in@/components/admin/users/UserTableuseAuthStoreto determine filtering and button visibility