Skip to content

feat(admin): add staff filter to users list - #235

Merged
trtajim merged 2 commits into
mainfrom
feat/admin-users-staff-filter
Aug 30, 2026
Merged

feat(admin): add staff filter to users list#235
trtajim merged 2 commits into
mainfrom
feat/admin-users-staff-filter

Conversation

@trtajim

@trtajim trtajim commented Aug 30, 2026

Copy link
Copy Markdown
Member

Description

This PR adds a filter to the admin users management page (/admin/users) to easily view staff members vs all users.

Summary of Changes:

  • Backend Controller (UserController.php):
    • Added role filtering logic in index method (staff, student, or specific roles like admin, editor, manager).
    • Added user counts (all, staff) in Inertia response props.
    • Preserved query parameters across pagination via withQueryString().
  • Frontend UI (Index.vue):
    • Added segmented toggle buttons (All vs Staff Only) with live user count badges.
    • Linked search and role filter parameters seamlessly.
    • Added an empty state for when no staff users are found.
  • Tests (AdminUserListFilterTest.php):
    • Added automated feature tests covering default listing, staff filtering, and combined search + staff filter.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: eba1c6d5-b92b-4cae-bc28-cf20e76bc9bc

📥 Commits

Reviewing files that changed from the base of the PR and between 3880da6 and d350f65.

📒 Files selected for processing (4)
  • .coderabbit.yaml
  • app/Http/Controllers/Admin/UserController.php
  • resources/js/pages/admin/users/Index.vue
  • tests/Feature/AdminUserListFilterTest.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@trtajim
trtajim merged commit 3db3d10 into main Aug 30, 2026
6 checks passed
@trtajim
trtajim deleted the feat/admin-users-staff-filter branch August 30, 2026 10:57
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.

1 participant