Aman-Mittal opened a new pull request, #267:
URL: https://github.com/apache/fineract-backoffice-ui/pull/267
Closes #266 when complete. Opened early and as a draft so CI runs alongside
the remaining work.
## Landed so far
**Undo approval** — an approved loan can be returned to `Submitted and
pending approval`.
Approval was the one loan lifecycle step with no way back. Disbursal,
write-off and charge-off all have an undo; approving the wrong loan left reject
or withdraw as the only exit, and those close the application rather than
reopening it, putting a rejection on the record of a client who was never
rejected.
- offered only while the loan is approved, gated on `APPROVALUNDO_LOAN` —
the code the platform actually publishes for it, read from `/permissions`
rather than guessed
- a dialog collecting the optional reason the platform records against the
command
- **not** routed through the shared account action form: that form sends
`locale` and `dateFormat` on every request and `undoapproval` rejects both,
answering 400 and naming them as unsupported parameters. It takes an empty body
or one carrying only `note`. This is the same trap already documented for
`undo-charge-off`, and the comment cross-references it.
### Verified before it was written
Every claim above came from probing a running Fineract, and then from
driving the real screen in a browser:
| Request | Result |
|---|---|
| `POST /loans/5?command=undoapproval` `{}` | `Approved` → `Submitted and
pending approval` |
| … with `{note}` | accepted, same transition |
| … with `{locale, dateFormat}` | **400**, `errors[].parameterName` =
`locale`, `dateFormat` |
Then through the UI on loan 5: the menu item appears only while the loan is
approved, the dialog opens with its explanation and note field, and **both**
the note-carrying and the empty-body paths leave the loan at `Submitted and
pending approval` with `pendingApproval: true` and `timeline.approvedOnDate`
cleared, with a success toast on screen.
## Still to come on this branch
- **Term variations** and **overdue charges** tabs — `loanTermVariations`
and `overdueCharges` already arrive in the `associations=all` response and are
discarded today, so these cost no extra request
- **Delinquency** tab — the `delinquent` block, its pause periods, and `GET
/loans/{id}/delinquencytags`
- **Standing instructions** tab, *conditional*: the generated client filters
by the **from** account, but an instruction paying into a loan has the loan as
the **to** account. I will create one through the app's own form and inspect a
real row first. If the shape does not let me identify the loan, this tab is
dropped from the PR and filed separately rather than shipped showing nothing.
- unit specs, a mocked e2e asserting the exact request body, and a
real-backend e2e
### One limitation stated up front
A fresh platform has no data for three of these tabs — `loanTermVariations`,
`overdueCharges` and the delinquency tags all come back `[]`. So the
real-backend spec will cover undo approval and term variations (generated by
rescheduling through the app's existing screens) in full, and assert only the
empty state for delinquency and overdue charges; their data-carrying coverage
lives in the mocked spec. Producing genuine delinquency needs a past-due loan,
i.e. business-date advance plus COB, which is a heavier fixture than this PR
should own.
## Not in scope
The **original schedule** tab. `GET /loans/{id}/schedule` answers **405
Method Not Allowed** on the current platform, so there is no verified way to
fetch a loan's schedule as first generated. Worth its own issue once the right
endpoint is established.
## Checks run locally
`lint`, HTML lint, `format:check`, `i18n:check`, `check:icons` and the
production build all pass. Unit and e2e suites follow with the rest of the work.
--
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]