Loan account fixed due required fields

This commit is contained in:
Jose Alberto Hernandez
2022-05-26 09:13:39 -05:00
parent 479fefaa3f
commit 86a48f9691
23 changed files with 96 additions and 91 deletions
@@ -78,7 +78,7 @@ export class LoansAccountDetailsStepComponent implements OnInit {
'loanOfficerId': [''],
'loanPurposeId': [''],
'fundId': [''],
'submittedOnDate': ['', Validators.required],
'submittedOnDate': [new Date(), Validators.required],
'expectedDisbursementDate': ['', Validators.required],
'externalId': [''],
'linkAccountId': [''],
@@ -72,7 +72,7 @@
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
<mat-label>Select On</mat-label>
<mat-select formControlName="repaymentFrequencyNthDayType" required>
<mat-select formControlName="repaymentFrequencyNthDayType">
<mat-option
*ngFor="let repaymentFrequencyNthDayType of repaymentFrequencyNthDayTypeData"
[value]="repaymentFrequencyNthDayType.id">
@@ -83,7 +83,7 @@
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value == 2">
<mat-label>Select Day</mat-label>
<mat-select formControlName="repaymentFrequencyDayOfWeekType" required>
<mat-select formControlName="repaymentFrequencyDayOfWeekType">
<mat-option
*ngFor="let repaymentFrequencyDayOfWeekType of repaymentFrequencyDaysOfWeekTypeData"
[value]="repaymentFrequencyDayOfWeekType.id">
@@ -91,6 +91,12 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
'repaymentsStartingFromDate': this.loansAccountTemplate.expectedFirstRepaymentOnDate && new Date(this.loansAccountTemplate.expectedFirstRepaymentOnDate)
});
}
if (this.loansAccountTemplate.isInterestRecalculationEnabled) {
this.loansAccountTermsForm.patchValue({
'recalculationCompoundingFrequencyDate': ''
});
}
}
this.createloansAccountTermsForm();
this.setCustomValidators();
@@ -126,8 +132,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
'numberOfRepayments': ['', Validators.required],
'repaymentEvery': ['', Validators.required],
'repaymentFrequencyType': ['', Validators.required],
'repaymentFrequencyNthDayType': ['', Validators.required],
'repaymentFrequencyDayOfWeekType': ['', Validators.required],
'repaymentFrequencyNthDayType': [''],
'repaymentFrequencyDayOfWeekType': [''],
'repaymentsStartingFromDate': [''],
'interestChargedFromDate': [''],
'interestRatePerPeriod': [''],
@@ -147,8 +153,7 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
'loanIdToClose': [''],
'fixedEmiAmount': [''],
'isTopup': [''],
'maxOutstandingLoanBalance': [''],
'recalculationCompoundingFrequencyDate': ['']
'maxOutstandingLoanBalance': ['']
});
}