RelativeRoleTagWidget
Component Detail
Description
An inline widget rendered within the case link record view for assigning and displaying a semantic role to a relative. It presents a dropdown populated with organization-configured role labels and reflects the currently saved role. Changes are submitted in-place without navigating away from the case link context.
relative-role-tag-widget
Sources & reasoning
Line 121 enumerates distinct relative types - foreldre (parents), søsken (siblings), nærmeste omsorgsperson (primary caregiver) - implying role differentiation is a first-class requirement, not just a free-text note. Phase 1/MVP is confirmed by the priority matrix (line 161). Role tagging gives structured, queryable meaning to the type enumeration and is marked [MVP] in the blueprint alongside the other relatives-database features.
-
docs/source/likeperson.md · line 121Appen må støtte registrering av pårørende (foreldre, søsken, nærmeste omsorgsperson) som egne kontaktsubjekter knyttet til samme sak.
-
docs/source/likeperson.md · line 161Pårørende database | ✓ | - | - | - | ✓ | MUST (Barnekreft) | 1
Responsibilities
- Render a role selection dropdown populated from Organization Labels configuration
- Display the currently assigned role for the case link record
- Emit role change events to the parent form or case link view on selection
- Show validation feedback when no role is selected and one is required
Interfaces
render(caseLinkId: string, currentRole: string | null): void
onRoleChange(handler: (role: string) => void): void
setAvailableRoles(roles: RoleLabel[]): void