User Interface medium complexity mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

A persistent UI control displayed in the app header or home screen that shows the user's currently active profile and organization context. It allows users to open a profile picker and select a different organizational role. The widget updates visually to reflect the newly selected profile after a successful switch.

Feature: Profile Switching

profile-switch-widget

Sources & reasoning

Profile Switching is v1.0 per the blueprint [v1.0] marker, aligning with Fase 2 of the roadmap. The need is driven by NHF's multi-association requirement (line 106) requiring unambiguous affiliation to prevent double-reporting, and the platform-wide design decision that Org Admins are surfaced as Coordinators on mobile (line 257), both demanding a context-switch mechanism that does not require re-authentication.

  • **Håndtering av medlemmer i flere lokallag (opptil 5):** Avklare tilhørighet og hindre dobbeltrapportering.
  • **On mobile, an Org Admin is surfaced as a Coordinator** - they use the same mobile experience as coordinators without a separate UI path.

Responsibilities

  • Display the active profile name, role, and organization badge
  • Open the profile selection bottom sheet or modal on tap
  • Reflect loading state during the context switch operation
  • Show error feedback if the switch fails

Interfaces

renderActiveProfile(profile: ActiveProfile): void
openProfilePicker(): void
onProfileSelected(profileId: string): void
setLoadingState(loading: boolean): void