Search and Filter Peer Mentors When Selecting for Proxy or Bulk Registration
The Peer Mentor Selection Widget applies a 'peer_mentor' role filter to the Contact Repository to render only the coordinator's peer mentors. It supports a live search input that filters results by name as the coordinator types. Additional filters such as availability status or local association can narrow the list further. The widget operates in two modes controlled by a configuration parameter: single-select for proxy registration (selecting one mentor) and multi-select for bulk registration (selecting any number of mentors with checkboxes). Selected mentors are shown in a summary chip list above the search input.
User Story
Acceptance Criteria
- Given the peer mentor selection widget is rendered in bulk registration mode, when the coordinator types in the search field, then the list filters in real time to show only mentors whose names match the query
- Given the widget is in multi-select mode, when the coordinator taps a mentor row, then a checkbox toggles and the mentor is added to the selection chip list
- Given the widget is in single-select mode (proxy registration), when the coordinator taps a mentor, then that mentor is immediately selected and the wizard advances to the next step
- Given no mentors match the current search or filter combination, when the list updates, then an empty state message is shown prompting the coordinator to adjust their search
- Given the coordinator has applied filters, when they clear all filters, then the full unfiltered peer mentor list is restored
Business Value
Coordinators managing dozens or hundreds of peer mentors cannot rely on a flat scrollable list to locate the right mentors quickly. Search and filter capability is the minimum ergonomic requirement for the bulk and proxy flows to be practically usable at scale. Without it, selection errors and time cost would discourage coordinators from using the feature.