Switch Active Chapter Context During Session
Administrators who oversee multiple regions or chapters need to shift their operational context — viewing contacts, activities, and reports scoped to different organizational units — within a single session. A chapter switcher component must update the active chapter state across the application, triggering RLS context updates and refreshing scoped data. The switcher must clearly indicate which chapter is currently active and provide a quick way to return to the top-level (all chapters) view.
User Story
Acceptance Criteria
- Given I am an org admin overseeing multiple chapters, when I open the chapter switcher, then I see a list of all chapters I am authorized to administer
- Given I select a different chapter from the switcher, when the selection is confirmed, then all data views (contacts, activities, statistics) refresh to show data scoped to the selected chapter
- Given I have switched to a specific chapter context, when I register an activity or view reports, then all operations are attributed to or filtered by the active chapter
- Given I want to return to a cross-chapter view, when I select 'All Chapters' from the switcher, then the application shows aggregated data across all chapters I manage
- Given I switch chapters, when the RLS context is updated, then no data from the previous chapter context bleeds through into the new chapter's views
Business Value
Administrators overseeing many local chapters must context-switch frequently. Without a built-in chapter switcher, admins resort to multiple logins or lose track of which chapter's data they are currently viewing — leading to misattributed activities and reporting errors. This feature directly increases admin efficiency and reduces the risk of cross-chapter data leakage.
Components
- Chapter Switcher ui
- Active Chapter State (BLoC) service
- Access Scope Service service
- RLS Policy Manager infrastructure
- Hierarchy Cache data
- Hierarchy Service service