Aman-Mittal opened a new pull request, #804: URL: https://github.com/apache/fineract-backoffice-ui/pull/804
Closes #764, #765, #766. Part of #783. Fixed and recurring deposits could not be operated end to end: the product could not be configured honestly, the account form filled nothing in, the account view showed no figures, and a matured deposit could only be paid out in cash. Four issues, one module, and together most of epic #295. Everything below was measured against a running `apache/fineract` before it was written, which is how four of the issues' own assumptions turned out to be wrong. ## What landed **#765 — the product's rate chart is visible.** Creating a deposit product used to send a chart the user never saw: one slab at 5% for 1–60 months, dated from the browser's today. An administrator configuring a 7% two-year product got a 5% five-year one, and every account opened under it inherited that rate. The chart is now an explicit, editable section; the form will not submit until a rate and a period are given; tiered products work; and an edit shows the product's own rates and carries their ids back, which is what keeps the update from a 500. Compounding, posting, calculation and days-in-year were hard-coded and invisible too — all four now come from the product template. Recurring deposit products had the identical bug and are fixed with it. **#766 — choosing a product fills the form in.** The prefill read four fields the platform does not send. The template carries no `depositAmount`, no `depositPeriod` and no `depositPeriodFrequency`, and sends `nominalAnnualInterestRate` as `0` — so `0 || undefined` disposed of the one field that was there. The rate now comes from the chart slab for the chosen term and follows the term when it changes; the amount comes from the product, the only place it is. **#764 — the account view shows its figures.** A deposit account carries no top-level `accountBalance`; it is under `summary`. Adds deposit amount, term, maturity amount, maturity date, the funding account and whether interest is paid to savings. **#783 — closing and charging.** A maturity closure offers all four options the platform accepts; a premature one offers the two it accepts, because the other two are refused with `reinvest.not.allowed` and the template offers them anyway. Transfer to savings collects its target, re-investment says a replacement deposit will be opened pending approval, and a deposit account can now be charged. ## Where the issues were wrong about the platform **`linkAccountId` is the funding account, not the maturity payout account.** #783 describes it as "the customer's savings account" for the payout. Activation **debits** it: a savings account holding 20,000 went to 15,000 when a 5,000 deposit linked to it was activated, and an unfunded linked account makes activation fail with 403 "Insufficient account balance." Getting this wrong in the UI would move a customer's money, so it is labelled "Fund From Savings Account" with a warning that says what activation will do. The payout target is `transferToSavingsId`, which the platform makes mandatory once the instruction is "transfer to savings". **Re-investment is maturity-only.** Measured per command: `close` on a matured account accepts 100, 200, 300 and 400; `prematureClose` accepts 100 and 200 and refuses the two reinvest options. The close template returns all four for both, so the filtering is the UI's. **The frequency bug was not an Ionic bug.** #766 reports the Frequency select showing a value while its control was invalid. The cause was the prefill assigning `undefined` to the bound model property: the control emptied and failed `required` while the select went on displaying Months. It only appeared after choosing a product, which is why the reproduction meets it at step 4. ## Two defects the e2e run caught **Charge options never loaded**, because the code read `savingsProductId` — what the generated type declares and what the savings response calls it. A fixed deposit answers only `depositProductId`. The same read is in the account form's edit path, where it left the product unselected on every edit. **The chart editor logged NG01354 four times per render.** Its controls cannot register with the parent `NgForm`, which is the constraint it was designed around; each is now declared `standalone`, stating the intent in code. ## A note on where the editor lives The rate editor is a new shared component built on native controls, not Ionic. Both product forms are files where Ionic markup would have been allowed, but duplicating a rate editor across them was the worse trade — and ADR 0005 puts Ionic out of bounds for new files while `src/app/ui` has no input primitive yet (#287, #684). `_common.scss` documents native controls as the third option for exactly this case. It adds no suppression. This is the third batch in a row to run into the missing form primitives; **#684 is worth scheduling.** ## Left alone, deliberately Two NG01354 warnings remain on the product forms, from `product-accounting-section.component.ts`. They predate this batch and affect every product form. Silencing them with `standalone` would describe what happens today, but the alternative fix — `viewProviders` — would make those fields block submit for the first time, and which is wanted is a decision beyond these four issues. #783 is not fully closed: its charges acceptance criterion is met for adding, and pay/waive on a deposit charge follows the savings charge work in #754. ## Verification - **2376 unit tests / 303 files**, all passing. - **8 backend e2e** against `apache/fineract:latest`, in 1.1 minutes: the five new lifecycle tests plus the three pre-existing deposit specs. The rate test types 7.25 into the editor, saves, and reads the product back from the platform; the closure test checks the proceeds actually arrived in the savings account. - All repo checks, `eslint` with **no new suppressions**, `prettier --check`, `typecheck:e2e`, production 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]
