RelativeCaseLinkWidget
Component Detail
Description
An interactive widget embedded in the contact case detail view that displays linked relatives and allows a peer mentor or coordinator to search and associate additional relative records. It renders the current family unit as a list of linked relative cards and provides controls to add or remove links. Changes are reflected immediately in both the case view and the relative record view.
relative-case-link-widget
Sources & reasoning
The phrase "knyttet til samme sak" (linked to the same case) in line 121 directly specifies that relatives must be associated with a case, not just stored independently. This is the linking mechanism that fulfills that requirement. Phase 1 MUST status confirmed on line 438, mapping to MVP. Without case linking the relatives registration feature has no operational value.
-
docs/source/likeperson.md · line 121-122Appen 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 438Pårørende-database er Fase 1 MUST for Barnekreftforeningen
Responsibilities
- Display all relatives currently linked to the active contact case
- Provide a searchable dropdown or modal to find and select existing relative records within the same organization
- Emit link and unlink actions to the CaseLinkService and update the UI on success
- Show bidirectional navigation affordances so coordinators can open a relative record directly from the widget
- Handle loading and error states during async link operations
Interfaces
loadLinkedRelatives(caseId: string): RelativeRecord[]
searchRelatives(query: string, orgId: string): RelativeRecord[]
linkRelative(caseId: string, relativeId: string): LinkResult
unlinkRelative(caseId: string, relativeId: string): void
Related Data Entities (2)
Data entities managed by this component