Aman-Mittal opened a new pull request, #667:
URL: https://github.com/apache/fineract-backoffice-ui/pull/667
Part of #123. Same defect class as #663, reached from the other direction:
there the control was withheld by permission, here it needs to be withheld by
record state.
## What was wrong
Two button rows each had one member exempt from the state checks its
neighbours already carried.
**Loan view.** `APPROVE` is wrapped in `@if (isLoanPendingApproval)` and
`DISBURSE` in `@if (isLoanApproved)`. `REPAYMENT` was wrapped in nothing, so a
loan awaiting approval offered it, and the platform refuses:
```
POST /loans/2/transactions?command=repayment
400 error.msg.loan.must.be.active.fully.paid.or.overpaid
"Loan must be Active, Fully Paid or Overpaid"
```
**Savings account view.** `CLOSE` and the entire `ACTIONS` menu are wrapped
in `@if (isActive())`. `SAVINGS DEPOSIT` and `WITHDRAW` were not:
```
POST /savingsaccounts/23/transactions?command=deposit
400 error.msg.savingsaccount.transaction.account.is.not.active
"Transaction is not allowed. Account is not active."
```
Both land the operator on a full transaction form — date, amount, payment
type, receipt number, bank and cheque numbers, routing code, note — and only
tell them it was never possible after they fill it in and submit.
## How it was found
Browsing a live instance, not reading code. On a savings account in
**Submitted and pending approval** the deposit form accepted an amount and a
payment type and answered on submit with:
```
Validation errors exist.
• [2026-10-02] Transaction is not allowed. Account is not active.
```
Each refusal above was then reproduced directly against the platform before
being written into a test, so the three accepted states are the platform's rule
rather than a guess at it.
## The change
Withheld, not disabled — the convention in `DOCS/RBAC.md` is that a control
leading to another screen is removed, and both of these open a separate form.
- `canAcceptRepayment` on the loan view: `status.active || status.overpaid
|| status.closedObligationsMet`, which is exactly what the platform's repayment
validator accepts.
- The savings deposit and withdrawal buttons move inside the existing `@if
(isActive())`, which also removes a redundant second copy of the same condition
on the line below.
8 new unit tests cover both: offered in each accepted state, withheld
awaiting approval, withheld awaiting disbursal, withheld once written off or
closed. 279 files / 1835 tests pass.
## Not fixed here
The platform's error object for the savings refusal has two fields
transposed — `defaultUserMessage` holds `"transactionDate"` (a parameter name)
and `parameterName` holds `"02 October 2026"` (the submitted value). That
belongs in ASF Jira, not this repo; it is noted only because it explains the
odd `[2026-10-02]` prefix in the toast above.
--
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]