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

   Part of #295. Best taken after #296.
   
   ## Business value
   
   A term deposit exists to mature and pay out. Neither end of that is possible 
today: there is no close action, no premature close, and nothing on the screen 
shows the maturity position.
   
   **Premature close is the one that hurts most.** A member who needs their 
money before term is the single most common exception in deposit-taking, and 
the platform supports it with a choice of what happens to the proceeds — 
withdraw as cash, transfer to a savings account, or reinvest into a new 
deposit. Without it, a branch's only option is to leave the account open and 
settle outside the system, which puts the ledger and reality out of step.
   
   ## What to build
   
   **Close** — for a matured account. Takes a closure date and an on-closure 
action (withdraw / transfer to savings / reinvest). When transferring, the 
destination savings account must be selectable; 
`src/app/features/clients/client-savings-account-dialog.component.ts` is a 
working example of that picker.
   
   **Premature close** — for an active account before maturity. Same shape, 
plus whatever penalty-interest handling the platform applies. Fineract exposes 
a *calculate premature amount* endpoint; **show the member what they will 
actually receive before the action is confirmed.** Committing a member to a 
penalised early withdrawal without showing the figure first is not acceptable 
at a counter.
   
   **Maturity position on the account view** — maturity date, maturity amount, 
and interest earned to date. The account response carries these; the view 
currently does not read them.
   
   ## Two things to get right
   
   1. **Show the premature amount before confirming.** If the calculate 
endpoint is awkward to reach from the dialog, say so on the issue rather than 
shipping the action without it.
   2. **Gate on status.** Close applies to a matured account, premature close 
to an active one before maturity. Reuse the status constants from #296.
   
   ## Testing
   
   - **Unit spec:** each action posts the expected command and body, per 
on-closure action; assert with `toEqual`.
   - **Unit spec:** the destination account picker appears only for the 
transfer option.
   - **Unit spec:** maturity fields render from the account response.
   - **Mocked e2e:** intercept the `POST` and assert command and body — `Probe` 
pattern in `e2e/client-servicing-gaps.spec.ts`.
   
   A backend e2e covering premature close end to end is welcome; it needs an 
active account, so it depends on #296 having landed.
   
   ## Scope
   
   In scope: close, premature close, the premature-amount preview, and maturity 
fields on the view.
   
   Out of scope: the lifecycle actions in #296; transactions (#298); interest 
posting configuration on the product.
   
   ## Getting started
   
   - `src/app/features/products/deposit-account-view.component.ts`
   - Account picker to copy: 
`src/app/features/clients/client-savings-account-dialog.component.ts`
   - Confirm every payload against a live instance — `npm run e2e:stack`.
   - `npm test`, `npm run lint:prune`, `npm run i18n:check`, `npm run build`
   


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