Profile Switcher
Component Detail
User Interface
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Mobile UI control that surfaces the user's available profile contexts and lets them swap the active one without signing out. Appears in the app header or account menu and triggers a context refresh across home, contacts, and activity screens.
profile-switcher
Sources & reasoning
NHF explicitly needs to disambiguate members belonging to up to five local associations, and the doc requires Org Admins to appear as Coordinators on mobile - both demand an explicit context switcher to prevent mis-attributed activities. Targeted to Core Product because MVP only needs single-context login; multi-context handling is a documented Phase-2 concern tied to proxy/bulk registration and duplicate detection.
-
docs/source/likeperson.md · line 66-66Håndtering av medlemmer i flere lokallag (opptil 5): Avklare tilhørighet og hindre dobbeltrapportering.
-
docs/source/likeperson.md · line 192-192On mobile, an Org Admin is surfaced as a Coordinator - they use the same mobile experience as coordinators without a separate UI path.
Responsibilities
- Render the list of available role and association profiles for the current user
- Highlight the currently active profile context
- Capture user selection and dispatch a context-switch request
- Trigger refresh of dependent screens (home dashboard, contacts, activity registration)
- Show loading and error states during context transition
Interfaces
openSwitcher(): void
selectProfile(profileId): Promise<void>
renderActiveProfile(profile): ReactNode
Related Data Entities (1)
Data entities managed by this component