Skip to content

Feat/requestroleaccess

Lakshy Yarlagadda requested to merge feat/requestroleaccess into develop

Title Add role request UI and improve admin role review flow

Description

## Summary

This merge request adds the frontend role request flow and updates the admin role management screen to support reviewing requests more clearly.

## What changed

- added role request API types and client helpers
- added a shared `RoleAccessPanel` component
- moved self role-request access into the sidebar above `Donate`
- enabled sidebar role requests for:
  - admin
  - doctor
  - coordinator
  - volunteer
- kept request approval/rejection only in the admin Assign Roles page
- updated Assign Roles page to:
  - show role requests directly on the page
  - filter requests by `Pending`, `Approved`, and `Denied`
  - search users and requests by:
    - name
    - phone
    - email
    - book number
- updated admin role page tests to match the current query/loading behavior

## Why

This keeps the request flow available from each role dashboard without mixing approval actions into non-admin pages.

The admin page remains the single place for reviewing and managing role requests, while users can still request additional roles for themselves from the sidebar.

## Testing

Executed:
- `npm run test -- --run tests/admin/AssignRolesPage.test.tsx`
- `npm run test -- --run`

Result:
- `53` test files passed
- `653` tests passed

Merge request reports

Loading