Skip to content

[FE-20] Complete Users page with role management UI in opsce folder #784

@yusuftomilola

Description

@yusuftomilola

Problem

frontend/app/(dashboard)/users/page.tsx exists but is empty. Admins cannot view, manage, or update user roles through the UI.

Proposed Solution

Create frontend/opsce/features/users/UsersPage.tsx. Fetch users from GET /api/users (ADMIN only). Allow role changes inline and support soft-delete.

Acceptance Criteria

  • Users listed in a table with columns: Full Name, Email, Role, Verified, Created At, Actions
  • Role shown as a color-coded badge (ADMIN = red, MANAGER = blue, VIEWER = gray)
  • An inline role dropdown allows ADMIN users to change another users role
  • "Deactivate" button soft-deletes a user with a confirmation dialog
  • An "Invite User" button opens a modal with email and role fields
  • Page restricted to ADMIN role — non-admins see a 403 Forbidden message
  • Pagination and search by email/name

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions