Skip to content

Add role, facilitator/membership status, age range, topic & staff-tag filters to the people directory - #2312

Merged
maebeale merged 3 commits into
mainfrom
maebeale/admin-people-filters-dropdown
Aug 22, 2026
Merged

Add role, facilitator/membership status, age range, topic & staff-tag filters to the people directory#2312
maebeale merged 3 commits into
mainfrom
maebeale/admin-people-filters-dropdown

Conversation

@maebeale

@maebeale maebeale commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 filter scopes wired through one dispatcher per dropdown; model + request specs cover each branch

Adds several filters to the people directory, built on the event-registration filter mechanism (shared events/_filter_select partial + collection Stimulus controller — no new JS). Rebased on main, so it also carries in and integrates the staff-tag filter from #2313.

General filter (everyone who can reach the index)

  • Age range — dropdown of published AgeRange categories; matches people tagged with that range.

Admin-only filters (grouped in a blue panel)

  • Role — story / blog / workshop / workshop-variation / workshop-log authors, and sector leaders.
  • Facilitator status — active, inactive, boomerang (2+ facilitator affiliations, 1+ active), formerly active.
  • Membership status — active/inactive (membership cancelled_at) and paid/due/overdue (current invoice vs. allocations + grace period).
  • Topic subscription — people with an active (not unsubscribed) subscription.
  • Staff tag — from Add StaffTags: internal admin-only tagging for people #2313 (staff_tagged_with); moved into this blue panel and restyled to match, gated by allowed_to?(:index?, StaffTag).

Field order

Name/email/phone → Organization → Sector name → Age range, then the blue admin panel (Role → Facilitator status → Membership status → Topic subscription → Staff tag), then Clear.

Notes

  • The old "Sector leaders only" checkbox is folded into the Role dropdown.
  • Workshop log authorship: WorkshopLog has no Person column — only created_by → User. So "workshop log author" = the person whose linked user created the log (routed through User). Flagging in case a different tie is intended.
  • All filters flow through Person.search_by_params; no controller/strong-params change. New scopes return plain relations (where(id: subquery)) so count/paginate are unaffected.
  • Blue is the admin/status marker here (matches the bg-blue-100 admin convention), not a DomainTheme color.
  • Branch squashed to one commit and rebased onto main; updated the Features & tips seed.

Closes #2322

@maebeale maebeale changed the title Add admin role + topic-subscription filters to the people directory Add role, facilitator status, membership status, age range & topic filters to the people directory Aug 22, 2026
@maebeale
maebeale marked this pull request as ready for review August 22, 2026 13:05
@maebeale
maebeale force-pushed the maebeale/admin-people-filters-dropdown branch from 24fffd7 to 0611f98 Compare August 22, 2026 13:21
@maebeale maebeale changed the title Add role, facilitator status, membership status, age range & topic filters to the people directory Add role, facilitator/membership status, age range, topic & staff-tag filters to the people directory Aug 22, 2026
@maebeale
maebeale force-pushed the maebeale/admin-people-filters-dropdown branch from 0611f98 to d53085b Compare August 22, 2026 13:25
maebeale and others added 3 commits August 22, 2026 09:56
Role (story/blog/workshop/variation/log authors, sector leaders), facilitator
status (active/inactive/boomerang/formerly active), membership status
(active/inactive/paid/due/overdue), age range, and topic subscription. The
admin-only dropdowns are grouped in a blue panel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rder admin panel

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uthored news

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale
maebeale force-pushed the maebeale/admin-people-filters-dropdown branch from 6e88abf to fc01c4b Compare August 22, 2026 13:57
@maebeale
maebeale merged commit ea46e6f into main Aug 22, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/admin-people-filters-dropdown branch August 22, 2026 14:06
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.

People directory: admin filters for role, facilitator/membership status, age range, topic, and staff tag

1 participant