WEB-632 Set Installment in multiples of and Decimal Places Fields to Empty by Default in Loan Product Form (#3053)

This commit is contained in:
Soni Jay
2026-01-28 08:19:58 -06:00
committed by GitHub
parent a090c1b463
commit 30a143fced
@@ -42,11 +42,24 @@ export class LoanProductCurrencyStepComponent implements OnInit {
this.currencyData = this.loanProductsTemplate.currencyOptions; this.currencyData = this.loanProductsTemplate.currencyOptions;
this.loanProductCurrencyForm.patchValue({ this.loanProductCurrencyForm.patchValue({
currencyCode: this.loanProductsTemplate.currency.code || this.currencyData[0].code, currencyCode: this.loanProductsTemplate.currency.code || this.currencyData[0].code,
digitsAfterDecimal: this.loanProductsTemplate.currency.decimalPlaces digitsAfterDecimal:
? this.loanProductsTemplate.currency.decimalPlaces this.loanProductsTemplate.currency.decimalPlaces === 0 ||
: 2, this.loanProductsTemplate.currency.decimalPlaces === undefined ||
inMultiplesOf: this.loanProductsTemplate.currency.inMultiplesOf || '', this.loanProductsTemplate.currency.decimalPlaces === null
installmentAmountInMultiplesOf: this.loanProductsTemplate.installmentAmountInMultiplesOf ?? 1 ? ''
: this.loanProductsTemplate.currency.decimalPlaces,
inMultiplesOf:
this.loanProductsTemplate.currency.inMultiplesOf === 0 ||
this.loanProductsTemplate.currency.inMultiplesOf === undefined ||
this.loanProductsTemplate.currency.inMultiplesOf === null
? ''
: this.loanProductsTemplate.currency.inMultiplesOf,
installmentAmountInMultiplesOf:
this.loanProductsTemplate.installmentAmountInMultiplesOf === 0 ||
this.loanProductsTemplate.installmentAmountInMultiplesOf === undefined ||
this.loanProductsTemplate.installmentAmountInMultiplesOf === null
? ''
: this.loanProductsTemplate.installmentAmountInMultiplesOf
}); });
} }
@@ -57,7 +70,7 @@ export class LoanProductCurrencyStepComponent implements OnInit {
Validators.required Validators.required
], ],
digitsAfterDecimal: [ digitsAfterDecimal: [
2, '',
[ [
Validators.required, Validators.required,
Validators.min(0) Validators.min(0)