Manage Peer Mentor Chapter Affiliations
NHF supports contacts belonging to up to 5 local chapters simultaneously. The chapter affiliations panel must display all chapters a mentor is affiliated with, allow coordinators to add or remove chapter memberships via a chapter assignment editor, and trigger duplicate activity warnings when activities are detected across chapters for the same mentor. The underlying service must enforce multi-chapter membership rules and log any changes for audit purposes. Changes to chapter affiliations must propagate to the RLS query builder to ensure correct data scoping.
User Story
Acceptance Criteria
- Given a peer mentor belongs to multiple chapters, when I view their detail screen, then all chapter affiliations are listed in the chapter affiliations panel
- Given I am editing a peer mentor's affiliations, when I add a new chapter, then the assignment is saved and immediately reflected in the affiliations panel
- Given a mentor has activities recorded in multiple chapters, when I view the chapter affiliations panel, then a cross-chapter activity warning is surfaced if duplicate activities are detected
- Given I remove a chapter affiliation, when the removal is confirmed, then the mentor's RLS scope is updated and they no longer appear in that chapter's contact list
- Given I make changes to chapter affiliations, when the save completes, then an audit log entry is created recording who made the change, when, and what was changed
Business Value
NHF's organizational structure with 1,400 local chapters means that many active peer mentors legitimately participate across multiple chapters. Without proper multi-chapter affiliation management, coordinators have no way to detect or prevent double-counting of activities for the same mentor, which directly impacts the accuracy of Bufdir reports and funding calculations. This feature is essential for compliance and organizational integrity.
Components
- Chapter Affiliations Panel ui
- Chapter Assignment Editor ui
- Duplicate Activity Warning Dialog ui
- Multi-Chapter Membership Service service
- Duplicate Activity Detection Service service
- Chapter Membership Cubit service
- Contact Chapter Repository data
- Cross-Chapter Activity Query data
- Supabase Contact Chapter Adapter infrastructure
- Duplicate Warning Event Logger infrastructure
- Contact RLS Query Builder infrastructure