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:
+19
-6
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user