Repository navigation
fix(loan): display missing capitalized income fields - #675
Conversation
E2E — mocked backend🎭 E2E Tests✅ All green — 409 passed · 0 failed · 1 skipped, across 38 spec files in 10m 6s. By spec file
All 410 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 37021735024 from |
E2E — real Fineract🎭 E2E Tests✅ All green — 121 passed · 0 failed · 0 skipped, across 36 spec files in 11m 38s. By spec file
All 121 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 37021735024 from |
What and why
This PR addresses the deferred-income item (#3) from #672 by fixing a display gap in the loan view's Capitalized Income tab.
The tab already receives five fields from Fineract for each row:
amountamortizedAmountunrecognizedAmountamountAdjustmentchargedOffAmountHowever, the UI only rendered the first three, so
amountAdjustmentandchargedOffAmountwere fetched by the existing request but never displayed.While investigating #672, I also checked the
/deferredincomeendpoint referenced by the issue. It is a deprecated alias of the existing Capitalized Income functionality, using the same response model and the sameenableIncomeCapitalizationflag. Because the existing Capitalized Income tab is already wired to this data, this PR does not introduce a second tab or add a new request against the deprecated route.Instead, it exposes the two fields that the client was already receiving, with no additional API calls.
Scope of #672
This PR is intentionally limited to the deferred-income display gap:
amountAdjustmentandchargedOffAmount.Changes
amountAdjustmentto the Capitalized Income table.chargedOffAmountto the Capitalized Income table.LOANS.*translation keys.No new API request or backend change is required.
Verification
The following checks pass:
npm run typecheck:e2enpm run format:checknpm run lintnpm run i18n:checknpm run test:unit(scoped toloan-view.component.test.ts): 46/46 passingnpx playwright test --project=mocked e2e/loan-schedule-type-gating.spec.ts: 6/6 passingThe new unit test specifically verifies that both previously omitted columns render with the expected values.
The change was exercised with mocked data only. No backend behavior or API contract was modified, so a real-Fineract run was not performed.
Screenshots and recording
The attached before/after evidence shows the Capitalized Income tab changing from 3 displayed columns to all 5 fields returned by Fineract, using the same synthetic mocked loan data.
Before
After
Before / After comparison
side-by-side.mp4
The capture details and the mocked-data setup are documented in the accompanying README.
AI assistance (optional)
Checklist
src/app/api/.src/app/core/adapters/instead of direct browser globals or imperative third-party APIs. (N/A — no new component or service was added.)LOANS.AMOUNT_ADJUSTMENTandLOANS.CHARGED_OFF_AMOUNTtoen.json.)