Filter Search Results by Contact Type and Chapter
In organizations like NHF with up to 1,400 local chapters, or when a coordinator oversees multiple chapters, a simple name search can return many results from different contexts. Filter controls on the search screen allow the coordinator to scope results to a specific chapter, to only peer mentors or only contacts, or to a specific assignment status. These filters are applied client-side where possible and pushed as query parameters to the repository layer for database-level filtering, ensuring performance at scale. The chapter filter also prevents the coordinator from accidentally acting on contacts outside their permitted scope.
User Story
Acceptance Criteria
- Given the coordinator is on the search screen, when they tap a filter control, then filter options appear for contact type (peer mentor / contact) and chapter affiliation
- Given a chapter filter is selected, when the search query is executed, then only contacts affiliated with that chapter appear in results
- Given a contact type filter is selected, when results are displayed, then only the selected contact type appears, and the active filter is visually indicated
- Given multiple filters are active, when results are displayed, then all active filters are shown as dismissible chips above the results list
- Given a filter chip is dismissed, when the search re-executes, then results update to reflect the removed filter
- Given the coordinator has access to only one chapter, when the chapter filter is shown, then it defaults to that chapter and the filter control is disabled
Business Value
NHF's complex hierarchy (12 national associations, 9 regions, 1,400 local chapters) and Blindeforbundet's geographic matching requirements mean that unfiltered search results create confusion and risk of cross-chapter data leakage. Filtering is essential for coordinators managing multi-chapter scopes to maintain operational clarity, uphold data privacy requirements, and act decisively on the correct contact subset.