WEB-172 Merging all changes from main branch into dev branch (#2450)

This commit is contained in:
Gopi Kishan
2025-05-13 20:32:32 -06:00
committed by GitHub
parent c8d857f3cb
commit e643c64711
29 changed files with 331 additions and 95 deletions
@@ -58,6 +58,7 @@ export class MakeRepaymentComponent implements OnInit {
* and initialize with the required values
*/
ngOnInit() {
this.command = this.dataObject.type.code.split('.')[1];
this.maxDate = this.settingsService.businessDate;
this.createRepaymentLoanForm();
this.setRepaymentLoanDetails();
@@ -76,14 +77,27 @@ export class MakeRepaymentComponent implements OnInit {
this.settingsService.businessDate,
Validators.required
],
transactionAmount: [
'',
Validators.required
],
externalId: '',
paymentTypeId: '',
note: ''
});
if (this.isCapitalizedIncome()) {
this.repaymentLoanForm.addControl(
'transactionAmount',
new UntypedFormControl('', [
Validators.required,
Validators.min(0.001),
Validators.max(this.dataObject.amount)])
);
} else {
this.repaymentLoanForm.addControl(
'transactionAmount',
new UntypedFormControl('', [
Validators.required,
Validators.min(0.001)])
);
}
}
setRepaymentLoanDetails() {
@@ -114,7 +128,14 @@ export class MakeRepaymentComponent implements OnInit {
}
showDetails(): boolean {
return !['capitalizedIncome'].includes(this.command);
return !this.isCapitalizedIncome();
}
isCapitalizedIncome(): boolean {
return [
'capitalizedIncome',
'capitalizedIncomeAdjustment'
].includes(this.command);
}
/** Submits the repayment form */