Manage Multi-Chapter Affiliations for a Contact
Within the contact detail and edit screens, the coordinator can see and manage chapter affiliations. Multi-chapter affiliation chips display all current chapters. In edit mode, the chapter affiliations panel allows adding new chapters and removing existing ones using a chapter assignment editor. The multi-chapter membership service enforces business rules — for example, NHF peer mentors can belong to up to 5 chapters. When a peer mentor is assigned to multiple chapters, the cross-chapter activity query ensures activities are deduplicated and attributed correctly. Any changes to affiliations trigger the duplicate activity detection service to flag potentially double-counted historical entries.
User Story
Acceptance Criteria
- Given I am on the contact detail screen, When the contact belongs to 3 chapters, Then 3 affiliation chips are displayed, each showing the chapter name and a distinct color indicator
- Given I am in edit mode, When I tap the chapter affiliations panel, Then I can see a chapter assignment editor listing all available chapters with checkboxes for the current affiliations
- Given I am adding a chapter affiliation, When I select a new chapter and save, Then the multi-chapter membership service validates the addition does not exceed the maximum allowed chapters (5) and persists the change
- Given I am removing a chapter affiliation, When I deselect a chapter and save, Then the system checks for existing activity records attributed to that chapter and shows a warning if any exist
- Given a contact belongs to multiple chapters, When I view their activity history, Then a chapter scope indicator is shown on each activity record to identify which chapter it was attributed to
- Given I add a new chapter affiliation, When the save completes, Then the duplicate activity detection service runs a background check and surfaces any newly identified duplicates as a dismissible warning
Business Value
NHF has 1,400 local chapters and peer mentors frequently belong to multiple local chapters simultaneously. Without multi-chapter affiliation management directly on the contact screen, coordinators cannot correctly attribute activities to the right chapter, leading to either under-reporting or double-counting in Bufdir submissions. Accurate chapter affiliations also determine which coordinators can see and manage each peer mentor, making this a prerequisite for correct role-based access and data isolation across the organization.
Components
- Contact Detail Screen ui
- Edit Contact Screen ui
- Multi-Chapter Affiliation Chip Widget ui
- Chapter Affiliations Panel ui
- Chapter Assignment Editor 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