wellkilo opened a new pull request, #633:
URL: https://github.com/apache/fineract-backoffice-ui/pull/633
## What and why
Implements both contract-termination commands from #504.
The loan Actions menu now offers:
- **Terminate Contract** only for an active, non-charged-off progressive
loan that is not already contract-terminated.
- **Undo Contract Termination** only when the loan reports Fineract's
contract-termination sub-status (`900` / `contractTermination`).
Both route through the shared transaction form, which now treats them as
loan-level commands (`POST /loans/{id}?command=...`) rather than transaction
sub-resource calls. Fineract owns the business date for both commands, so the
form hides the client date field and sends only the optional note.
This avoids recording a contract termination as `close` or `foreclosure`,
which have different schedule and accounting semantics.
## Verification
- `npm test -- --watch=false` — 253 test files, 1583 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 eligibility, charged-off/cumulative exclusion,
sub-status detection, routes, optional-note payloads, and loan-level command
dispatch
- Commit `d2e6dfc5` is signed and GitHub reports it as **Verified**
Docker is not installed on this machine, so no live Fineract E2E run was
performed. Eligibility and request shape follow Fineract's
`LoanContractTerminationServiceImpl` validation and the generated `POST
/loans/{id}` binding.
## Screenshots
Not applicable: this adds two conditional loan Actions entries and a
confirmation flow; 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. Unit tests validate
the command payload; live backend validation remains to be exercised in CI.
- [x] Commits are signed — `d2e6dfc5` 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]