feat: update TDS config, RBI reserve returns, current products, and dormancy reports

This commit is contained in:
2026-09-24 18:07:54 +05:30
parent 1eaa8cc8cf
commit be35f3cbc3
66 changed files with 5474 additions and 565 deletions
@@ -181,15 +181,15 @@
</tr>
</thead>
<tbody>
@for (r of visibleRows; track r.accountId) {
<tr [class.dr-row--warn]="isNearingEscheat(r)" [class.dr-row--sel]="selected.has(r.accountId)">
@for (r of visibleRows; track r.accountType + '-' + r.accountId) {
<tr [class.dr-row--warn]="isNearingEscheat(r)" [class.dr-row--sel]="isSelected(r)">
@if (tab === 'ESCHEAT') {
<td class="dr-tick">
<!-- An already-remitted balance cannot be remitted again. -->
<input
type="checkbox"
[checked]="selected.has(r.accountId)"
[disabled]="r.remittance === 'REMITTED'"
[checked]="isSelected(r)"
[disabled]="!isRemittable(r)"
(click)="toggleSelect(r, $event)"
/>
</td>
@@ -203,7 +203,12 @@
<td>{{ branchName(r.branchCode) }}</td>
<td class="dr-prod">{{ r.productName }}</td>
<td class="dr-prod">
{{ r.productName }}
@if (r.accountType === 'CURRENT') {
<div class="dr-sub">Current Account</div>
}
</td>
<td class="num strong">{{ r.balance | number: '1.0-0' }}</td>
@@ -147,8 +147,24 @@ export class DormancyReportComponent implements OnInit {
remitSaving = false;
remitError = '';
/**
* Only savings accounts can be put into a DEAF remittance: remittances are recorded against a savings account, so
* the selection (keyed by account id) holds savings ids alone and a current account with the same id cannot be
* mistaken for one.
*/
isRemittable(row: DormancyRow): boolean {
return row.accountType !== 'CURRENT' && row.remittance !== 'REMITTED';
}
isSelected(row: DormancyRow): boolean {
return row.accountType !== 'CURRENT' && this.selected.has(row.accountId);
}
toggleSelect(row: DormancyRow, event: Event): void {
event.stopPropagation();
if (!this.isRemittable(row)) {
return;
}
if (this.selected.has(row.accountId)) {
this.selected.delete(row.accountId);
} else {
@@ -158,7 +174,7 @@ export class DormancyReportComponent implements OnInit {
/** Ticks every unremitted row on display, or clears them if all are already ticked. */
toggleSelectAll(): void {
const selectable = this.visibleRows.filter((r) => r.remittance !== 'REMITTED');
const selectable = this.visibleRows.filter((r) => this.isRemittable(r));
if (selectable.every((r) => this.selected.has(r.accountId))) {
selectable.forEach((r) => this.selected.delete(r.accountId));
} else {
@@ -177,12 +193,12 @@ export class DormancyReportComponent implements OnInit {
}
get allSelected(): boolean {
const selectable = this.visibleRows.filter((r) => r.remittance !== 'REMITTED');
const selectable = this.visibleRows.filter((r) => this.isRemittable(r));
return selectable.length > 0 && selectable.every((r) => this.selected.has(r.accountId));
}
get selectedTotal(): number {
return this.rows.filter((r) => this.selected.has(r.accountId)).reduce((s, r) => s + r.balance, 0);
return this.rows.filter((r) => this.isSelected(r)).reduce((s, r) => s + r.balance, 0);
}
openRemit(): void {
@@ -316,6 +332,7 @@ export class DormancyReportComponent implements OnInit {
const next = lastTxn ? nextStage(lastTxn, stage) : { date: '', label: '' };
return {
accountType: a?.accountType || 'SAVINGS',
accountId: a?.accountId,
accountNo: a?.accountNo || '—',
clientId: a?.clientId,
@@ -80,6 +80,8 @@ export const DORMANCY_STAGES: Record<DormancyStage, DormancyStageMeta> = {
export type DeafRemittanceState = 'PENDING' | 'REMITTED';
export interface DormancyRow {
/** SAVINGS or CURRENT. Ids are only unique within one kind, so rows are keyed by both. */
accountType: string;
accountId: number;
accountNo: string;
clientId: number;