KpiCardWidget
Component Detail
User Interface
medium complexity
frontend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
A reusable presentational card that displays a single KPI metric with a label, current value, and optional trend indicator. It accepts a metric object as a prop and handles its own loading skeleton and error fallback states.
kpi-card-widget
Sources & reasoning
Lines 325-327 explicitly list "Aktivitetsoversikt og grunnleggende statistikk" (activity overview and basic statistics) as Admin Web Portal MVP scope. Lines 189-197 confirm "organization-level dashboards and KPIs" as a core admin portal capability. Both place this feature in Fase 1 / MVP, normalizing to target_release "MVP".
-
docs/source/likeperson.md · line 325-327Admin Web Portal (MVP scope): Brukeradministrasjon (invitere, deaktivere, rolletildeling) Organisasjonsinnstillinger og terminologikonfigurasjon Aktivitetsoversikt og grunnleggende statistikk
-
docs/source/likeperson.md · line 189-197
Responsibilities
- Display a metric value, label, and optional trend or unit annotation
- Show a loading skeleton while parent data is being fetched
- Render an error state when the metric value is unavailable
- Apply consistent visual styling across all KPI cards on the dashboard
Interfaces
render(metric: KpiMetric): JSX
formatValue(value: number, unit: string): string