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

   Part of #295. Best taken after #279 and #278, which fix the routing and the 
missing `command` on the recurring-deposit form.
   
   ## Business value
   
   Recurring deposits have a transaction form (broken — see #278) and fixed 
deposits have none at all. Neither has a transactions view with a correction 
path.
   
   A recurring deposit is a series of instalments; without a transactions tab a 
member cannot be shown what they have paid, and a teller who mis-keys an amount 
has no way to reverse it. A cash-handling screen with no undo is a screen that 
produces reconciliation breaks.
   
   ## What to build
   
   **A transactions tab** on `deposit-account-view.component.ts` listing date, 
type, amount and running balance, with reversed entries visually distinguished. 
The savings account view already styles reversed transactions 
(`savings-account-view.component.ts:441-443`) — reuse that treatment rather 
than inventing a second one.
   
   **An undo action per transaction**, confirmed through 
`DialogService.confirm({ destructive: true })`. Confirm the command name and 
payload against a live instance first.
   
   **A fixed-deposit transaction form** for deposit and withdrawal, mirroring 
the recurring-deposit one. Route it properly — #279 covers the dead navigation 
targets, so coordinate if that has not merged.
   
   ## Two things to get right
   
   1. **Send the `command` query parameter.** This is the bug in #278 — the 
platform dispatches deposit versus withdrawal on it, and the generated method's 
optional `command?: string` is optional only because the OpenAPI spec marks it 
so. Verified against a live backend: omitting it returns `400 "unsupported 
value of: null"` with `args: [{}, {"value":["deposit","withdrawal"]}]`. Do not 
repeat that on the fixed-deposit side.
   2. **Reversed transactions must stay visible.** An undone transaction is 
struck through, not removed. Removing it destroys the audit trail, which is the 
same class of mistake as #280.
   
   ## Testing
   
   - **Unit spec:** the form posts with the correct `command` for both deposit 
and withdrawal. Assert the third argument explicitly — a spec checking only the 
body would pass throughout #278.
   - **Unit spec:** the transactions table renders reversed rows distinctly; 
undo posts the expected command; cancelling the confirmation posts nothing.
   - **Mocked e2e:** intercept the POSTs and assert `command` is non-null. That 
single assertion is what would have caught #278.
   - **Backend e2e:** open a recurring deposit, activate it, record two 
instalments, undo one, and assert the balance and the reversed marker. Depends 
on #296.
   
   ## Scope
   
   In scope: the transactions tab, per-transaction undo, and the fixed-deposit 
transaction form.
   
   Out of scope: charges; receipts and printing; the lifecycle actions in #296 
and #297.
   
   ## Getting started
   
   - `src/app/features/products/deposit-account-view.component.ts`
   - 
`src/app/features/products/recurring-deposit-transactions/recurring-deposit-transaction-form.component.ts`
   - Reversed-row styling: 
`src/app/features/products/savings-account-view.component.ts:420-464`
   - `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