Skip to content

WAIT: Add organization status and location filters to registrants list#1839

Draft
maebeale wants to merge 1 commit into
mainfrom
maebeale/filter-rows-card-org-status
Draft

WAIT: Add organization status and location filters to registrants list#1839
maebeale wants to merge 1 commit into
mainfrom
maebeale/filter-rows-card-org-status

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

The event registrants filter bar had grown unwieldy and was missing controls admins need to triage registrants by how their organization is resolved and where they live.

How did you approach the change?

Grouped the filters into a card with two rows (keyword · organization status · scholarship · payment · attendance, then state · locality · county · country), added an Organization status filter (Linked/Pending/None) backed by the new EventOrganizationLinkStatus PORO that mirrors the per-row badge logic, and added Locality and Country location filters via new EventRegistration scopes and an EventDashboard#localities option source.

UI Testing Checklist

  • Filters render as a card with two rows in the expected order
  • Organization status filters to Linked, Pending, and None correctly (overlap allowed)
  • Locality and Country dropdowns appear when registrants have that data and filter correctly
  • "Clear filters" resets every control

Anything else to add?

The Linked/Pending/None states intentionally overlap (a registration can be both linked and pending), so each option returns everyone matching that state. Covered by model, service, dashboard, and request specs.

Group the registrants filters into a card with two rows so the growing
set of controls stays scannable, and surface filters admins were missing:
an Organization status filter (Linked/Pending/None, mirroring the badge
logic already shown per row) plus Locality and Country location filters
alongside the existing State and County.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
end.map(&:id)
end

def needs_linking?(registration)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 From Claude: Overlap is intentional — a registration with a linked org and a non-matching submitted agency name counts as both Linked and Pending, matching the per-row badges. Each filter option returns everyone in that state rather than a single exclusive bucket.

expect(response.body).to include(">Pending<")
expect(response.body).not_to include(">None<")
expect(response.body).to include("<span>Pending</span>")
expect(response.body).not_to include("<span>None</span>")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 From Claude: Tightened from >None< to the exact chip markup because the new Organization status dropdown legitimately renders a "None"/"Pending" <option>, which would otherwise match this assertion.

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