Clients search enhancement (#1605)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2022-12-26 14:25:49 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent 475059a974
commit d0dc2aabb2
29 changed files with 514 additions and 234 deletions
@@ -19,6 +19,40 @@
</mat-error>
</mat-form-field>
<div fxLayout="row wrap" class="content">
<div fxFlex="50%" class="mat-body-strong">
{{ 'Principal' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.principalPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Interest' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.interestPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Fees' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.feeChargesPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Penalties' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.penaltyChargesPortion | number }}
</div>
</div>
<mat-form-field>
<mat-label>Transaction Amount</mat-label>
<input type="number" matInput required formControlName="transactionAmount">
@@ -19,6 +19,40 @@
</mat-error>
</mat-form-field>
<div fxLayout="row wrap" class="content">
<div fxFlex="50%" class="mat-body-strong">
{{ 'Principal' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.principalPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Interest' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.interestPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Fees' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.feeChargesPortion | number }}
</div>
<div fxFlex="50%" class="mat-body-strong">
{{ 'Penalties' | translate }}
</div>
<div fxFlex="50%" class="r-amount">
{{ dataObject.penaltyChargesPortion | number }}
</div>
</div>
<mat-form-field>
<mat-label>Transaction Amount</mat-label>
<input type="number" matInput required formControlName="transactionAmount">
@@ -27,19 +61,6 @@
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Principal</mat-label>
<input matInput formControlName="principal">
</mat-form-field>
<mat-form-field>
<mat-label>Interest Amount</mat-label>
<input matInput required formControlName="interestAmount">
<mat-error *ngIf="prepayLoanForm.controls.interestAmount.hasError('required')">
Interest Amount <strong>is required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>External Id</mat-label>
<input matInput formControlName="externalId">
@@ -70,8 +70,6 @@ export class PrepayLoanComponent implements OnInit {
this.prepayLoanForm = this.formBuilder.group({
'transactionDate': [new Date(), Validators.required],
'transactionAmount': ['', Validators.required],
'principal': [{value: '', disabled: true}],
'interestAmount': [{value: '', disabled: true}, Validators.required],
'externalId': [''],
'paymentTypeId': [''],
'note': ['']
@@ -84,9 +82,7 @@ export class PrepayLoanComponent implements OnInit {
setPrepayLoanDetails() {
this.paymentTypes = this.dataObject.paymentTypeOptions;
this.prepayLoanForm.patchValue({
transactionAmount: this.dataObject.amount,
principal: this.dataObject.principalPortion,
interestAmount: this.dataObject.interestPortion,
transactionAmount: this.dataObject.amount
});
}