Unable to create new loan product or share product #1406

This commit is contained in:
Adam Saghy
2022-05-26 18:30:34 +02:00
committed by GitHub
parent 29c48c9b30
commit f42b089449
2 changed files with 13 additions and 7 deletions
@@ -25,7 +25,7 @@
<mat-form-field fxFlex="32%">
<mat-label>Name</mat-label>
<input matInput formControlName="name">
<input matInput formControlName="name" required>
</mat-form-field>
<mat-form-field fxFlex="31%">
@@ -47,7 +47,7 @@
<mat-form-field fxFlex="65%">
<mat-label>Description</mat-label>
<textarea matInput formControlName="description"></textarea>
<textarea matInput formControlName="description" required></textarea>
</mat-form-field>
<div fxFlex="31%" fxLayout="row" fxLayoutAlign="space-between center">
@@ -80,7 +80,7 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
this.clientClassificationData = this.recurringDepositProductsTemplate.chartTemplate.clientClassificationOptions;
this.incentiveTypeData = this.recurringDepositProductsTemplate.chartTemplate.incentiveTypeOptions;
if (!(this.recurringDepositProductsTemplate === undefined) && this.recurringDepositProductsTemplate.id) {
if (!(this.recurringDepositProductsTemplate === undefined)) {
this.assignFormData();
}
}
@@ -89,10 +89,12 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
assignFormData() {
this.addChart();
const isChartArray = Array.isArray(this.recurringDepositProductsTemplate.activeChart);
if (!isChartArray) {
this.chartDetailData.push(this.recurringDepositProductsTemplate.activeChart);
} else {
this.chartDetailData = this.recurringDepositProductsTemplate.activeChart;
if (this.fixedDepositProductsTemplate.activeChart) {
if (!isChartArray) {
this.chartDetailData.push(this.recurringDepositProductsTemplate.activeChart);
} else {
this.chartDetailData = this.recurringDepositProductsTemplate.activeChart;
}
}
// Build the array of Objects from the retrived value
@@ -101,6 +103,10 @@ export class RecurringDepositProductInterestRateChartStepComponent implements On
// Iterates for every chart in charts
this.charts.controls.forEach((chartDetailControl: FormGroup, i: number) => {
if (!chartDetails[i]) {
return;
}
// Iterate for every chartSlab in chart
this.chartsDetail[i].chartSlabs.forEach((chartSlabDetail: any, j: number) => {