The Insurance domain models user insurance policies (e.g., term, health, motor) as part of the wealth area and provides a dedicated detail page under the wealth dashboard's insurance tab.
Key source files:
src/pages/InsuranceDetailPage/index.tsx — main insurance detail page and list container.src/pages/InsuranceDetailPage/components/InsuranceRow.tsx — renders individual policies in the list.src/pages/InsuranceDetailPage/components/InsuranceModal.tsx — modal for adding or editing policies.src/pages/InsuranceDetailPage/components/insuranceConfig.ts — configuration such as column definitions and type-specific labels.The wealth dashboard links into this page from its insurance tab, making insurance a first-class component of the Wealth and Portfolio Domain.
Each row in the insurance list shows key attributes of a policy, including the current sum assured or insured declared value (IDV).
Recent behavior changes:
InsuranceRow.tsx now shows the current IDV / live sum_assured value coming from the backend, rather than any stale value parsed from uploaded documents.When modifying this area, keep the following principles in mind:
sum_assured field as the source of truth for displayed insured amounts.InsuranceModal.tsx orchestrates the create/edit policy flow:
insuranceConfig.ts to render fields appropriate to the policy type.src/services/wealthApiService.js to persist policy data.src/store/invalidation.js so list views refresh after edits.The insurance section also participates in broader wealth data ingestion flows:
UploadWealthData.jsx and onboarding modals) can create or update policies.InsuranceRow.tsx.When adding new insurance types or fields:
insuranceConfig.ts to define labels and column behavior.src/lib/wealth/types.ts if new fields affect shared wealth models.InsuranceRow.tsx and InsuranceModal.tsx handle new fields gracefully, especially around sum assured/IDV.