feat: senior citizen rate fix, joint ownership cap, FD/RD UI improvements

- Senior citizen interest rate correctly sent in FD/RD create payload
  (isSeniorCitizen, seniorCitizenInterestRate, nominalAnnualInterestRate override)
- Joint account ownership capped at 100%: Add Holder/Partner button disabled
  when 100% reached; dialog enforces remaining share as max across all account types
- FD/RD interest rate chart step: rate calculator with tenure, senior citizen toggle,
  maturity preview
- FD/RD preview step improvements
- Base FD interest rate chart component added under fixed-deposit-products
- Base recurring deposit interest rate chart component removed (replaced)
- Savings account details step: joint holder improvements
- Products routing and module updated for base FD rate chart

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jaanu423
2026-05-21 21:15:45 +05:30
co-authored by Claude Sonnet 4.6
parent 846b2484d7
commit 61b0244fa0
37 changed files with 1998 additions and 435 deletions
@@ -75,6 +75,7 @@
[recurringDepositsAccountTemplate]="recurringDepositsAccountTemplate"
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
[submittedOnDate]="submittedOnDate"
[cbsBaseRates]="cbsBaseRates"
(tenureSelected)="handleTenureSelected($event)"
>
</mifosx-recurring-deposits-account-interest-rate-chart-step>
@@ -105,6 +106,8 @@
[rdMaturityAmount]="rdMaturityAmount"
[rdInterestEarned]="rdInterestEarned"
[rdDaysInYear]="rdDaysInYear"
[rdAppliedRate]="rdAppliedRate"
[rdIsSeniorCitizen]="rdIsSeniorCitizen"
(submitEvent)="submit()"
>
</mifosx-recurring-deposits-account-preview-step>
@@ -77,10 +77,14 @@ export class CreateRecurringDepositsAccountComponent {
recurringDepositsAccountTemplate: any;
/** Recurring Deposit Account Product Template */
recurringDepositsAccountProductTemplate: any;
/** Active CBS base interest rate versions */
cbsBaseRates: any[] = [];
/** Selected tenure value and frequency from calculator */
selectedTenureValue: number | null = null;
selectedTenureFrequencyId: number | null = null;
selectedDepositAmount: number | null = null;
rdAppliedRate: number | null = null;
rdIsSeniorCitizen = false;
constructor() {
this.route.data.subscribe((data: { recurringDepositsAccountTemplate: any }) => {
@@ -94,6 +98,10 @@ export class CreateRecurringDepositsAccountComponent {
*/
setTemplate($event: any) {
this.recurringDepositsAccountProductTemplate = $event;
this.productsService.getFdBaseInterestRates().subscribe({
next: (rates: any[]) => (this.cbsBaseRates = rates || []),
error: () => (this.cbsBaseRates = [])
});
}
/** Captures tenure selection from calculator */
@@ -101,6 +109,8 @@ export class CreateRecurringDepositsAccountComponent {
this.selectedTenureValue = $event.depositPeriod;
this.selectedTenureFrequencyId = $event.depositPeriodFrequencyId;
this.selectedDepositAmount = $event.depositAmount;
this.rdAppliedRate = $event.appliedRate ?? null;
this.rdIsSeniorCitizen = $event.isSeniorCitizen ?? false;
}
/** Get Recurring Deposit Account Details Form Data */
@@ -283,6 +293,13 @@ export class CreateRecurringDepositsAccountComponent {
recurringDepositAccount.mandatoryRecommendedDepositAmount = this.selectedDepositAmount;
}
// Senior citizen rate override
if (this.rdIsSeniorCitizen && this.rdAppliedRate != null && this.rdAppliedRate > 0) {
recurringDepositAccount.isSeniorCitizen = true;
recurringDepositAccount.seniorCitizenInterestRate = this.rdAppliedRate;
recurringDepositAccount.nominalAnnualInterestRate = this.rdAppliedRate;
}
const nominees = this.recurringDepositsAccountCurrencyStep?.nominees ?? [];
if (nominees.length > 0) {
recurringDepositAccount.nominees = nominees.map((n: any) => ({