Purpose
Left-hand card on the Analys & Grafer tab. Lists detected data gaps and offers a “Fyll gap” button. File: frontend/kundkort/components/ui/GapsPanel.tsx.
Data source
useEcoApi.gaps: GapsResponse | null (services/ecoApiClient.ts:34-40). Despite the name, this is built client-side by inspecting the main API payload — not from EcoAPI. See EcoAPI Integration caveat.
GapsResponse:
{ org_nr, total_gaps, high_priority_gaps, gaps: DataGap[], recommendation }DataGap:
{ field, priority: 'high'|'medium'|'low', current_value, fillable_via_enrichment }Gaps detected
fetchGaps() checks (ecoApiClient.ts:103-138):
financials—priority: highiffinansiell_historik,omsattning,anstalldaall emptycontacts—priority: highifkontakteremptywebsite—priority: mediumif neitherhemsidanordomainset
Layout
- Header line “N datagap identifierade (M högprioriterade)” or the green ”✓ All data komplett”
- “Fyll gap” button on the right when
total_gaps > 0. Clicking it triggers the samehandleEnrichfrom Kundkort Page (passed viaonEnrichprop). <Accordion>with oneAccordionItemper priority bucket. Bucket colour: high → red, medium → yellow, low → gray (GapsPanel.tsx:11-15).- Each gap row: priority badge + Swedish label from
FIELD_LABELS(GapsPanel.tsx:17-26) + “Kan fyllas” badge iffillable_via_enrichment.
Warning
FIELD_LABELScoversturnover, employees, contacts, vd_contact_info, website, email, phone, tech_stackbutfetchGaps()actually emitsfinancials, contacts, website. Sofinancialsfalls back to its raw English key in the UI (GapsPanel.tsx:113).
See also
Insights Panel, EcoAPI Integration, Kundkort Page.