Enhancement in loan and savings account views (#1690)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-02-22 23:15:51 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent c0185627f7
commit 6ef53c6462
91 changed files with 841 additions and 568 deletions
@@ -38,11 +38,6 @@
<span fxFlex="60%">{{ savingsAccountTermsForm.get('decimal').value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Currency in multiples of</span>
<span fxFlex="60%">{{ savingsAccountTermsForm.get('currencyMultiple').value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Nominal Annual Interest Rate:</span>
<span fxFlex="60%">{{ savingsAccount.nominalAnnualInterestRate }}</span>
@@ -12,11 +12,6 @@
<input type="number" matInput formControlName="decimal">
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Currency in multiples of</mat-label>
<input type="number" matInput formControlName="currencyMultiple" >
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>Nominal Annual Interest Rate</mat-label>
<input type="number" matInput formControlName="nominalAnnualInterestRate" required>
@@ -50,7 +50,6 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
this.savingsAccountTermsForm.patchValue({
'currencyCode': this.savingsAccountProductTemplate.currency.code,
'decimal': this.savingsAccountProductTemplate.currency.decimalPlaces,
'currencyMultiple': this.savingsAccountProductTemplate.currency.inMultiplesOf,
'minBalanceForInterestCalculation': this.savingsAccountProductTemplate.minBalanceForInterestCalculation,
'nominalAnnualInterestRate': this.savingsAccountProductTemplate.nominalAnnualInterestRate,
'interestCompoundingPeriodType': this.savingsAccountProductTemplate.interestCompoundingPeriodType.id,
@@ -99,7 +98,6 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
'decimal': [{value: '', disabled: true}],
'nominalAnnualInterestRate': ['', Validators.required],
'interestCompoundingPeriodType': ['', Validators.required],
'currencyMultiple': [{value: '', disabled: true}],
'interestPostingPeriodType': ['', Validators.required],
'interestCalculationType': ['', Validators.required],
'interestCalculationDaysInYearType': ['', Validators.required],
@@ -146,7 +144,10 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
* Returns savings account terms form value.
*/
get savingsAccountTerms() {
return this.savingsAccountTermsForm.getRawValue();
const payload = this.savingsAccountTermsForm.getRawValue();
delete payload.currencyCode;
delete payload.decimal;
return payload;
}
}