Aman-Mittal opened a new issue, #266:
URL: https://github.com/apache/fineract-backoffice-ui/issues/266

   ## Summary
   
   Five gaps on the loan account screen, all verified against a running 
Fineract.
   
   ### 1. An approved loan cannot be un-approved
   
   `POST /loans/{id}?command=undoapproval` is never sent anywhere in 
`src/app/features/loans`. The loan screen offers Approve, Reject, Withdrawn by 
client, Disburse, Undo disbursal, Write off, Undo write off, Charge off, Undo 
charge off, Re-age, Re-amortize, Foreclosure and more — but nothing that walks 
an approval back.
   
   The command is already wired up for working-capital loans 
(`wc-loan-view.component.ts:151`, `wc-loan-action-form.component.ts:321`), so 
the pattern to follow is in the repository. Ordinary loans simply never got it.
   
   ### 2–5. Data the platform returns and the screen drops
   
   `GET /loans/{id}?associations=all` already carries three of these, so they 
cost no extra request:
   
   | Field | Currently shown |
   |---|---|
   | `delinquent` — `pastDueDays`, `delinquentDays`, `delinquentAmount`, 
`nextPaymentDueDate`, `nextPaymentAmount`, `delinquencyPausePeriods` | no |
   | `loanTermVariations` | no |
   | `overdueCharges` | no |
   | standing instructions against the loan's client (`GET 
/standinginstructions`) | no |
   
   `GET /loans/{id}/delinquencytags` and `GET /loans/{id}/delinquency-actions` 
also exist and both answer 200.
   
   The loan view has 11 tabs today — Overview, Repayment schedule, 
Transactions, Charges, Custom fields, Notes, Documents, Buy-down fees, 
Capitalized income, Disbursement details, Collateral management — and none of 
them covers the above.
   
   ## Proposed scope
   
   - **Undo approval** on the actions menu, offered only for an approved loan, 
gated on the permission, confirming through `DialogService`
   - **Delinquency** tab: the delinquency summary, the pause periods, and the 
delinquency tags
   - **Term variations** tab: what was varied on the loan and when
   - **Overdue charges** tab
   - **Standing instructions** tab: instructions that pay into or out of this 
loan
   
   New components use the adapter boundary (ADR-0003) and hold state in 
signals. Tabs render through `app-data-table` so they get search, paging and a 
retry on a failed load rather than an empty table (#223).
   
   ## Explicitly 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 — guessing at it here would ship a tab that silently 
shows nothing.
   
   ## Testing
   
   - unit specs for the new tabs and the undo-approval flow
   - a mocked e2e asserting the request the undo-approval command sends and 
that each tab renders what the response carries
   - a real-backend e2e that creates and approves a loan through the UI, undoes 
the approval, and confirms the loan returns to Submitted and pending approval
   
   ## Business Value
   
   **Undo approval** is the one that costs money today. Approval is the point 
where a loan officer commits the institution to an amount, and approving the 
wrong loan — wrong client, wrong figure — is an ordinary mistake. Everywhere 
else in the app a lifecycle step can be walked back: disbursal, write-off and 
charge-off all have an undo. Approval does not, so the only route out is to 
reject or withdraw the application, which is a different thing entirely: it 
closes the application rather than returning it to pending, and it leaves a 
rejection on a client who was never rejected. That is a permanent, visible 
error in a customer's record caused by a slip, and it is a documented reason 
institutions keep a second system open alongside this one.
   
   **The four tabs** decide whether an officer can answer a question without 
leaving the screen. Delinquency is the single most-asked question about a loan 
— how far behind is it, and by how much — and today the screen shows the 
schedule and transactions and lets the officer work it out. Term variations are 
the audit trail for anyone asking why a loan's terms differ from its product. 
Overdue charges are what the borrower actually owes on top of the balance. 
Standing instructions explain money arriving without anyone posting it, which 
otherwise reads as an unexplained transaction.
   
   None of the four needs new platform work, and three need no extra request — 
the data is already being fetched and thrown away.
   


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