Detect and Warn on Cross-Chapter Duplicate Activity Registration
When a coordinator registers an activity for a peer mentor who belongs to multiple chapters, the system must query all chapters for recent activities involving the same peer mentor and similar metadata (date, activity type, duration). If a potential duplicate is found across chapters, a warning dialog is presented before saving. The coordinator can choose to proceed anyway, cancel, or view the conflicting record for comparison. All duplicate warning events are logged for audit purposes.
User Story
Acceptance Criteria
- Given a peer mentor belongs to at least two chapters, when a coordinator completes the activity wizard and taps submit, then the system queries cross-chapter activity history before persisting
- Given a cross-chapter duplicate is detected (same peer mentor, same date ±1 day, same activity type), when the submit action is triggered, then a duplicate warning dialog is displayed with the conflicting record's details
- Given the duplicate warning dialog is shown, when the coordinator selects 'Proceed Anyway', then the activity is saved and a duplicate-reviewed flag is set on the record
- Given the duplicate warning dialog is shown, when the coordinator selects 'Cancel', then no activity is saved and the wizard remains open with all data intact
- Given any duplicate warning interaction occurs, when the event completes, then a log entry is written by the duplicate warning event logger for audit traceability
- Given a peer mentor belongs to only one chapter, when a coordinator submits an activity, then no cross-chapter duplicate check is performed and submission is immediate
Business Value
Double-reporting is a significant risk identified by NHF in workshop sessions. When the same activity is counted by two coordinators from different chapters, Bufdir statistics become inflated, grant reporting is inaccurate, and the organization's credibility with funders is damaged. This story directly prevents financial and reputational harm by catching duplicate registrations at the point of entry rather than requiring manual audits after the fact.
Components
- Duplicate Activity Warning Dialog ui
- Duplicate Activity Detection Service service
- Chapter Membership Cubit service
- Cross-Chapter Activity Query data
- Duplicate Warning Event Logger infrastructure
- Contact Chapter Repository data
- Supabase Contact Chapter Adapter infrastructure