update RD prodcut code
This commit is contained in:
+1
@@ -71,6 +71,7 @@
|
||||
<mifosx-recurring-deposits-account-interest-rate-chart-step
|
||||
[recurringDepositsAccountTemplate]="recurringDepositsAccountAndTemplate"
|
||||
[recurringDepositsAccountProductTemplate]="recurringDepositsAccountProductTemplate"
|
||||
[rdInterestRates]="rdInterestRates"
|
||||
>
|
||||
</mifosx-recurring-deposits-account-interest-rate-chart-step>
|
||||
</mat-step>
|
||||
|
||||
+12
@@ -13,6 +13,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
/** Custom Services */
|
||||
import { RecurringDepositsService } from '../recurring-deposits.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { ProductsService } from 'app/products/products.service';
|
||||
|
||||
/** Step Components */
|
||||
import { RecurringDepositsAccountDetailsStepComponent } from '../recurring-deposits-account-stepper/recurring-deposits-account-details-step/recurring-deposits-account-details-step.component';
|
||||
@@ -54,6 +55,7 @@ export class EditRecurringDepositAccountComponent {
|
||||
private dateUtils = inject(Dates);
|
||||
private recurringDepositsService = inject(RecurringDepositsService);
|
||||
private settingsService = inject(SettingsService);
|
||||
private productsService = inject(ProductsService);
|
||||
|
||||
/** Imports all the step component */
|
||||
@ViewChild(RecurringDepositsAccountDetailsStepComponent, { static: true })
|
||||
@@ -69,6 +71,8 @@ export class EditRecurringDepositAccountComponent {
|
||||
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 }) => {
|
||||
@@ -82,6 +86,14 @@ 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 */
|
||||
|
||||
Reference in New Issue
Block a user