wellkilo opened a new pull request, #632: URL: https://github.com/apache/fineract-backoffice-ui/pull/632
## What and why Completes the remaining Charge Refund half of #506. Refund by Cash already landed in `700bd855`; this adds the charge-level correction that was still unreachable from the UI. The loan Actions menu now offers **Charge Refund** when Fineract's status rules permit it and the loan has at least one collected, non-installment charge. The shared transaction form then: - lists refundable charges; - pre-fills the amount already collected on the selected charge, while still allowing a partial refund; - loads the available payment types; - submits `loanChargeId`, `transactionAmount`, `paymentTypeId`, `transactionDate`, `dateFormat`, and `locale` under the `chargeRefund` command; - skips the transaction template endpoint, which rejects `chargeRefund`. Installment fees are deliberately excluded for now. Fineract additionally requires `installmentNumber` or `dueDate` for those charges, which is a separate selector and deserves its own change. ## Verification - `npm test -- --watch=false` — 253 test files, 1585 tests passed - `npm run build` — passed; the pre-existing `header.component.ts` stylesheet budget warning remains - `npm run lint` — passed - `npm run i18n:check` — passed - `npm run check:icons` — passed - `npm run check:a11y-names` — passed - `npm run format:check` — passed - `npm run api:surface` — passed - Added unit coverage for paid/unpaid/installment filtering, menu eligibility across supported loan statuses, amount prefill, payload construction, and the no-charge guard - Added the missing jsdom `IntersectionObserver` stub required by Ionic datetime tests - Commit `3ee3ad34` is signed and GitHub reports it as **Verified** Docker is not installed on this machine, so no live Fineract E2E run was performed. The request shape follows the backend `LoanChargeApiJsonValidator` and `LoanChargeWritePlatformServiceImpl` validation rules. ## Screenshots Not applicable beyond the widened loan Actions menu; no binary artifact is committed. ## AI assistance (optional) - Tool / model: OpenAI Codex - Harness / workflow: repository guidance in `AGENTS.md`, local lint/build/unit verification, Fineract backend source review ## Checklist - [x] I did not hand-edit generated files under `src/app/api/`. - [x] New component or service code uses the adapter boundary in `src/app/core/adapters/` instead of direct browser globals or imperative third-party APIs. - [x] User-facing strings use translation keys. - [x] I added or updated tests appropriate to this change. - [x] UI workflow changes include suitable e2e coverage. Mocked/unit coverage validates the payload; live backend validation remains to be exercised in CI. - [x] Commits are signed — `3ee3ad34` is Verified on GitHub. - [x] I followed the AI-assisted contributions guidance. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
