Aman-Mittal opened a new pull request, #269:
URL: https://github.com/apache/fineract-backoffice-ui/pull/269

   Closes #268. Follows #267, and finishes the loan gaps that needed their own 
UI rather than a menu entry.
   
   ## What this adds
   
   | | |
   |---|---|
   | **Unassign loan officer** | the counterpart to the assign action that 
already existed |
   | **Disburse to savings** | for an approved loan, into the account linked at 
application time |
   | **Undo last disbursal** | offered only where the product allows multiple 
disbursals |
   | **Asset transfers tab** | whether this loan has been sold on, and to whom |
   
   ## Comparing against a mature implementation caught two mistakes before any 
code
   
   I filed #268 claiming disburse-to-savings **needs a savings-account 
picker**. It does not. The destination is the savings account linked to the 
loan when the application was made, and the platform refuses the command 
outright without one:
   
   ```
   403  Disburse Loan with id:4 requires linked savings account for payment
   ```
   
   A picker would have implied a choice that does not exist. Corrected on the 
issue.
   
   The second was the permission. The command is `unassignloanofficer`, so I 
had assumed `UNASSIGNLOANOFFICER_LOAN`. The platform publishes no such code — 
only `UPDATELOANOFFICER_LOAN` and `REMOVELOANOFFICER_LOAN`. Gating on the name 
I assumed would have hidden the action from every user, silently. Every 
permission code here was read from `/permissions` rather than inferred from a 
command name.
   
   One gap the comparison did not help with: unassign-officer does not exist in 
the reference either, so it is built from the platform contract alone.
   
   ## Verified before it was written, and again after
   
   Round trip against a running Fineract: created a loan officer, 
`assignLoanOfficer` → 200, `unassignloanofficer` with `{unassignedDate, locale, 
dateFormat}` → **200** with `loanOfficerId` cleared.
   
   Then through the real screen on an active loan: the dialog opened, 
confirming raised a success toast, and the platform showed the officer cleared. 
The conditional gating held live — **Unassign shown** while an officer was 
assigned, **Undo Last Disbursal hidden** on that single-disbursal loan, 
**Disburse to Savings hidden** because the loan was Active rather than Approved.
   
   ## What the specs pin
   
   Request bodies, because that is where this class of work goes wrong — #267 
found `undoapproval` rejecting the `locale` and `dateFormat` that the shared 
action form sends on every call. The three commands here differ from each other 
and from that one:
   
   - `disbursetosavings` and `unassignloanofficer` **do** take `locale` and 
`dateFormat`, and need the platform's `dd MMMM yyyy` rather than the ISO the 
date picker produces
   - `undoLastDisbursal` takes an **empty body**, like its sibling 
`undoDisbursal`
   
   Each is asserted in both directions: the action sends what it should, and 
stays hidden wherever the platform could only answer 403.
   
   ## A limitation stated rather than hidden
   
   **Neither `disbursetosavings` nor `undoLastDisbursal` can be driven end to 
end against a fresh platform** — one needs a loan with a linked savings 
account, the other a multi-tranche product. Their coverage is mocked, and the 
spec says so. A green real-backend run would otherwise imply more than it 
proves.
   
   ## Checks
   
   - **817 unit specs** pass (was 810 — 7 new)
   - **13 mocked e2e** in `loan-servicing-gaps.spec.ts` pass (was 7 — 6 new)
   - `lint`, HTML lint, `format:check`, `i18n:check`, `check:icons` all pass
   - rebased on `origin/main` (`4c884831`)
   
   ## Not included
   
   The **original schedule** tab. `GET /loans/{id}/schedule` answers **405 
Method Not Allowed**, so there is no verified way to fetch a loan's schedule as 
first generated. Building against a guess would ship a tab that silently shows 
nothing, which is worse than its absence.
   


-- 
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]

Reply via email to