Unable to create new loan product or share product #1406

This commit is contained in:
Adam Saghy
2022-05-26 18:17:36 +02:00
committed by GitHub
parent 20fa9e89d9
commit ab858f3f77
@@ -88,11 +88,13 @@ export class FixedDepositProductInterestRateChartStepComponent implements OnInit
assignFormData() { assignFormData() {
this.addChart(); this.addChart();
const isChartArray = Array.isArray(this.fixedDepositProductsTemplate.activeChart); const isChartArray = Array.isArray(this.fixedDepositProductsTemplate.activeChart);
if (this.fixedDepositProductsTemplate.activeChart) {
if (!isChartArray) { if (!isChartArray) {
this.chartDetailData.push(this.fixedDepositProductsTemplate.activeChart); this.chartDetailData.push(this.fixedDepositProductsTemplate.activeChart);
} else { } else {
this.chartDetailData = this.fixedDepositProductsTemplate.activeChart; this.chartDetailData = this.fixedDepositProductsTemplate.activeChart;
} }
}
// Build the array of Objects from the retrived value // Build the array of Objects from the retrived value
this.getChartsDetailsData(); this.getChartsDetailsData();
@@ -100,6 +102,10 @@ export class FixedDepositProductInterestRateChartStepComponent implements OnInit
// Iterates for every chart in charts // Iterates for every chart in charts
this.charts.controls.forEach((chartDetailControl: FormGroup, i: number) => { this.charts.controls.forEach((chartDetailControl: FormGroup, i: number) => {
if (!this.chartsDetail[i]) {
return;
}
// Iterate for every chartSlab in chart // Iterate for every chartSlab in chart
this.chartsDetail[i].chartSlabs.forEach((chartSlabDetail: any, j: number) => { this.chartsDetail[i].chartSlabs.forEach((chartSlabDetail: any, j: number) => {