Skip to content

feat: add role filter dropdown to admin users page#1257

Merged
RobinNagpal merged 2 commits intomainfrom
feat/admin-users-role-filter
Apr 2, 2026
Merged

feat: add role filter dropdown to admin users page#1257
RobinNagpal merged 2 commits intomainfrom
feat/admin-users-role-filter

Conversation

@ryan-koala
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a dropdown filter on /admin/users to filter users by Role (Student, Admin, Instructor)
  • Filter is applied server-side via a new role query parameter on GET /api/users, so pagination totals and page counts stay correct
  • Selecting a role resets to page 1 to avoid empty-page edge cases

Test plan

  • Navigate to /admin/users and verify the "Filter by Role" dropdown appears
  • Select each role (Student, Admin, Instructor) and confirm only users with that role are shown
  • Select "All Roles" and confirm all users are shown
  • Verify pagination updates correctly (total count, page count) when a filter is active
  • Verify switching filters resets to page 1

🤖 Generated with Claude Code

Add a dropdown to filter users by Role (Student, Admin, Instructor) on the
/admin/users page. The filter is applied server-side via a new `role` query
parameter on the GET /api/users endpoint, so pagination counts remain correct.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dodao-ui-defi-alerts Ready Ready Preview Mar 31, 2026 11:02am
dodao-ui-simulations-ui Ready Ready Preview Mar 31, 2026 11:02am
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
dodao-ui-academy-ui Ignored Ignored Preview Mar 31, 2026 11:02am
dodao-ui-base-ui Ignored Ignored Preview Mar 31, 2026 11:02am
dodao-ui-insights-ui Ignored Ignored Preview Mar 31, 2026 11:02am
dodao-ui-news-reader Ignored Ignored Preview Mar 31, 2026 11:02am

Request Review

Copy link
Copy Markdown
Collaborator

@Hassaan-Qaisar Hassaan-Qaisar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the code and it looks fine. I also tested the functionality locally, and it’s working as expected.

@RobinNagpal RobinNagpal merged commit f0fb531 into main Apr 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants