rd account and rd product code update

This commit is contained in:
Nitesh Yadav
2026-05-08 13:51:58 +05:30
parent 19c0e98e96
commit 9e85872eac
35 changed files with 2247 additions and 591 deletions
@@ -71,7 +71,7 @@
<mifosx-recurring-deposits-account-interest-rate-chart-step
[recurringDepositsAccountTemplate]="recurringDepositsAccountAndTemplate"
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
[rdInterestRates]="rdInterestRates"
[submittedOnDate]="submittedOnDate"
>
</mifosx-recurring-deposits-account-interest-rate-chart-step>
</mat-step>
@@ -94,7 +94,11 @@
[recurringDepositsAccountTemplate]="recurringDepositsAccountAndTemplate"
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
[recurringDepositAccountData]="recurringDepositAccountData"
[rdInterestRates]="rdInterestRates"
[rdTenureDays]="rdTenureDays"
[rdApplicableSlab]="rdApplicableSlab"
[rdMaturityAmount]="rdMaturityAmount"
[rdInterestEarned]="rdInterestEarned"
[rdDaysInYear]="rdDaysInYear"
(submitEvent)="submit()"
>
</mifosx-recurring-deposits-account-preview-step>
@@ -67,12 +67,37 @@ export class EditRecurringDepositAccountComponent {
@ViewChild(RecurringDepositsAccountChargesStepComponent, { static: true })
recurringDepositAccountChargesStep: RecurringDepositsAccountChargesStepComponent;
@ViewChild(RecurringDepositsAccountInterestRateChartStepComponent)
recurringDepositsAccountChartStep: RecurringDepositsAccountInterestRateChartStepComponent;
get rdTenureDays(): number | null {
return this.recurringDepositsAccountChartStep?.matchResult?.tenureDays ?? null;
}
get rdApplicableSlab(): any | null {
return this.recurringDepositsAccountChartStep?.matchResult?.slab ?? null;
}
get rdMaturityAmount(): number | null {
return this.recurringDepositsAccountChartStep?.matchResult?.maturityAmount ?? null;
}
get rdInterestEarned(): number | null {
return this.recurringDepositsAccountChartStep?.matchResult?.interestEarned ?? null;
}
get rdDaysInYear(): number | null {
return this.recurringDepositsAccountChartStep?.matchResult?.daysInYear ?? null;
}
get submittedOnDate(): Date | null {
return this.recurringDepositAccountDetailsForm?.value?.submittedOnDate ?? null;
}
/** Recurring Deposits Account And Template */
recurringDepositsAccountAndTemplate: any;
/** Recurring Deposit Account Product Template */
recurringDepositsAccountProductTemplate: any;
/** Active CBS base interest rate chart */
rdInterestRates: any[] = [];
constructor() {
this.route.data.subscribe((data: { recurringDepositsAccountAndTemplate: any }) => {
@@ -86,14 +111,6 @@ export class EditRecurringDepositAccountComponent {
*/
setTemplate($event: any) {
this.recurringDepositsAccountProductTemplate = $event;
this.productsService.getRdBaseInterestRates().subscribe({
next: (rates: any[]) => {
this.rdInterestRates = rates || [];
},
error: () => {
this.rdInterestRates = [];
}
});
}
/** Get Recurring Deposit Account Details Form Data */
@@ -169,6 +186,15 @@ export class EditRecurringDepositAccountComponent {
this.recurringDepositAccount.expectedFirstDepositOnDate,
dateFormat
),
charts: [
{
chartSlabs:
this.recurringDepositsAccountProductTemplate?.accountChart?.chartSlabs ??
this.recurringDepositsAccountProductTemplate?.activeChart?.chartSlabs ??
this.recurringDepositsAccountProductTemplate?.interestRateCharts?.[0]?.chartSlabs ??
[]
}
],
dateFormat,
monthDayFormat,
locale