Add Auto Repayment flag for Loan product Down Payment settings (#1845)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
ed47d769e3
commit
0c88a37952
+5
@@ -434,6 +434,11 @@
|
||||
Disbursed Amount Percentage Down Payment is out <strong>percentage range</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox fxFlex="48%" labelPosition="before" formControlName="enableAutoRepaymentForDownPayment" matTooltip="nable or disable the auto repayment of down-payment.
|
||||
When “auto repayment for the down-payments“ is enabled, the disbursements will trigger an auto down payment transaction for the down payment amount" class="margin-b">
|
||||
Enable Auto Repayment for Down Payment
|
||||
</mat-checkbox>
|
||||
</div>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
+4
-1
@@ -102,7 +102,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
|
||||
if (this.loanProductsTemplate.enableDownPayment) {
|
||||
this.loanProductSettingsForm.patchValue({
|
||||
'disbursedAmountPercentageForDownPayment': this.loanProductsTemplate.disbursedAmountPercentageForDownPayment || 0
|
||||
'disbursedAmountPercentageForDownPayment': this.loanProductsTemplate.disbursedAmountPercentageForDownPayment || 0,
|
||||
'enableAutoRepaymentForDownPayment': this.loanProductsTemplate.enableAutoRepaymentForDownPayment || false
|
||||
});
|
||||
}
|
||||
|
||||
@@ -345,8 +346,10 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
.subscribe(enableDownPayment => {
|
||||
if (enableDownPayment) {
|
||||
this.loanProductSettingsForm.addControl('disbursedAmountPercentageForDownPayment', new FormControl(0, [Validators.required, rangeValidator(0, 100) ]));
|
||||
this.loanProductSettingsForm.addControl('enableAutoRepaymentForDownPayment', new FormControl(false, []));
|
||||
} else {
|
||||
this.loanProductSettingsForm.removeControl('disbursedAmountPercentageForDownPayment');
|
||||
this.loanProductSettingsForm.removeControl('enableAutoRepaymentForDownPayment');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user