FINERACT-1971: Multiples of currency and installment amount is not mandatory

This commit is contained in:
Adam Saghy
2023-09-21 15:05:55 +02:00
parent dc29d5c5fc
commit ab55521a5a
2 changed files with 5 additions and 13 deletions
@@ -24,18 +24,12 @@
<mat-form-field fxFlex="48%">
<mat-label>Currency in multiples of</mat-label>
<input type="number" matInput matTooltip="You can enter multiples of currency value. For example, if you put multiples of 100, the currency value will be rounded off to 200, 300, 400, etc." formControlName="inMultiplesOf" required>
<mat-error>
Currency in multiples of is <strong>required</strong>
</mat-error>
<input type="number" matInput matTooltip="You can enter multiples of currency value. For example, if you put multiples of 100, the currency value will be rounded off to 200, 300, 400, etc." formControlName="inMultiplesOf">
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Installment in multiples of</mat-label>
<input type="number" matInput formControlName="installmentAmountInMultiplesOf" required>
<mat-error>
Installment in multiples of is <strong>required</strong>
</mat-error>
<input type="number" matInput formControlName="installmentAmountInMultiplesOf">
</mat-form-field>
</div>
@@ -24,17 +24,15 @@ export class LoanProductCurrencyStepComponent implements OnInit {
this.loanProductCurrencyForm.patchValue({
'currencyCode': this.loanProductsTemplate.currency.code || this.currencyData[0].code,
'digitsAfterDecimal': this.loanProductsTemplate.currency.decimalPlaces ? this.loanProductsTemplate.currency.decimalPlaces : 2,
'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf ? this.loanProductsTemplate.currency.inMultiplesOf : 1,
'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf ? this.loanProductsTemplate.installmentAmountInMultiplesOf : 1
'inMultiplesOf': this.loanProductsTemplate.currency.inMultiplesOf,
'installmentAmountInMultiplesOf': this.loanProductsTemplate.installmentAmountInMultiplesOf
});
}
createLoanProductCurrencyForm() {
this.loanProductCurrencyForm = this.formBuilder.group({
'currencyCode': ['', Validators.required],
'digitsAfterDecimal': [2, Validators.required],
'inMultiplesOf': [1, Validators.required],
'installmentAmountInMultiplesOf': [1, Validators.required]
'digitsAfterDecimal': [2, Validators.required]
});
}