Loan Repayment Schedule edition to have variations (#1608)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2022-12-27 22:22:11 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 25ca2b7bb0
commit 6431ede355
19 changed files with 319 additions and 50 deletions
@@ -74,7 +74,7 @@
<mat-form-field fxFlex="48%">
<mat-label>Delinquency Bucket</mat-label>
<mat-select formControlName="delinquencyBucketId">
<mat-select formControlName="delinquencyBucketId" required>
<mat-option *ngFor="let delinquencyBucket of delinquencyBucketData" [value]="delinquencyBucket.id">
{{ delinquencyBucket.name }}
</mat-option>
@@ -162,7 +162,10 @@
<mat-form-field fxFlex="48%">
<mat-label>Maximum gap between Installments</mat-label>
<input type="number" matInput formControlName="maximumGap">
<input type="number" matInput formControlName="maximumGap" required>
<mat-error>
Maximum gap between Installments is <strong>required</strong>
</mat-error>
</mat-form-field>
</div>
@@ -174,7 +174,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
'graceOnPrincipalAndInterestPayment': [true],
'graceOnArrearsAgeing': [true]
}),
'delinquencyBucketId': ['']
'delinquencyBucketId': ['', Validators.required]
});
}
@@ -194,7 +194,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
.subscribe((allowVariableInstallments: any) => {
if (allowVariableInstallments) {
this.loanProductSettingsForm.addControl('minimumGap', new FormControl('', Validators.required));
this.loanProductSettingsForm.addControl('maximumGap', new FormControl(''));
this.loanProductSettingsForm.addControl('maximumGap', new FormControl('', Validators.required));
} else {
this.loanProductSettingsForm.removeControl('minimumGap');
this.loanProductSettingsForm.removeControl('maximumGap');