From 865ad8ba8875f6c7efb835e4467b460bafc42934 Mon Sep 17 00:00:00 2001 From: Nitesh Yadav Date: Thu, 24 Sep 2026 16:01:43 +0530 Subject: [PATCH] feat(fd): add FD Dashboard -- maturity ladder + manual Renew action New screen (Deposits menu, repurposing the dead "FD Maturity Report" shell button): every active Fixed Deposit positioned against its own maturity date (Matured / Due Soon / Upcoming / On Track), computed client-side from maturityDate so it can never drift out of step with the account. Reads the new lean maturity-dashboard backend endpoint. A matured, renewable row (no maturity instruction chosen at account-opening, or an explicit Reinvest instruction still waiting on its product's grace period) gets a Renew action wired to the account's own Payment dialog -- see the FD account-view commit for that side of it. Co-Authored-By: Claude Sonnet 5 --- src/app/accounts/accounts.service.ts | 11 + src/app/app.module.ts | 2 + src/app/core/shell/shell.component.html | 12 +- src/app/core/shell/shell.component.ts | 16 +- .../fixed-deposits/fixed-deposits.service.ts | 20 + .../fd-dashboard-routing.module.ts | 29 + .../fd-dashboard/fd-dashboard.component.html | 240 ++++++++ .../fd-dashboard/fd-dashboard.component.scss | 578 ++++++++++++++++++ .../fd-dashboard/fd-dashboard.component.ts | 273 +++++++++ src/app/fd-dashboard/fd-dashboard.compute.ts | 240 ++++++++ src/app/fd-dashboard/fd-dashboard.module.ts | 22 + 11 files changed, 1434 insertions(+), 9 deletions(-) create mode 100644 src/app/fd-dashboard/fd-dashboard-routing.module.ts create mode 100644 src/app/fd-dashboard/fd-dashboard.component.html create mode 100644 src/app/fd-dashboard/fd-dashboard.component.scss create mode 100644 src/app/fd-dashboard/fd-dashboard.component.ts create mode 100644 src/app/fd-dashboard/fd-dashboard.compute.ts create mode 100644 src/app/fd-dashboard/fd-dashboard.module.ts diff --git a/src/app/accounts/accounts.service.ts b/src/app/accounts/accounts.service.ts index ad7e49688..ddc9efadc 100644 --- a/src/app/accounts/accounts.service.ts +++ b/src/app/accounts/accounts.service.ts @@ -74,6 +74,17 @@ export class AccountsService { return this.http.get('/fixeddepositaccounts', { params: httpParams }); } + /** + * FD Dashboard's data source: every ACTIVE FD, id/account/client/product identity, maturity date + * and deposit/maturity amounts only. Deliberately a separate, narrow endpoint rather than + * getFixedDepositAccounts() above -- that one's backend query joins in six more tables (audit + * who-did-what-when, currency, tax group) an unbounded dashboard fetch does not need, over columns + * that had no index until this feature added one (see backend migration 0571). + */ + getFixedDepositMaturityDashboard(): Observable { + return this.http.get('/fixeddepositaccounts/maturity-dashboard'); + } + getRecurringDepositAccounts(params: AccountListParams = {}): Observable { let httpParams = new HttpParams() .set('paged', 'true') diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4136ae258..b95fd0ad1 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -63,6 +63,7 @@ import { CfcfrmsModule } from './cfcfrms/cfcfrms.module'; import { BankCalendarModule } from './bank-calendar/bank-calendar.module'; import { DeafModule } from './deaf/deaf.module'; import { SavingsDailyInterestModule } from './savings-daily-interest/savings-daily-interest.module'; +import { FdDashboardModule } from './fd-dashboard/fd-dashboard.module'; import { DicgcModule } from './dicgc/dicgc.module'; import { FiuModule } from './fiu/fiu.module'; import { GlReportsModule } from './gl-reports/gl-reports.module'; @@ -176,6 +177,7 @@ export function HttpLoaderFactory(http: HttpClient) { BankCalendarModule, DeafModule, SavingsDailyInterestModule, + FdDashboardModule, DicgcModule, FiuModule, GlReportsModule, diff --git a/src/app/core/shell/shell.component.html b/src/app/core/shell/shell.component.html index 3351e3022..7a55eb0dc 100644 --- a/src/app/core/shell/shell.component.html +++ b/src/app/core/shell/shell.component.html @@ -65,6 +65,14 @@ ESC Show Header } + + @else if (currentUrl.includes('/fd-dashboard')) { + + } @else if (currentUrl.includes('/clerk/')) {