fix: bug preventing individual loan application, improved GLIM (#2329)
This fixes a recently introduced bug preventing individual loan applications. It also simplifies dramatically the GLIM process, improving GLIM user experience and functionality. Partially addresses: WEB-9
This commit is contained in:
+4
@@ -42,6 +42,10 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div fxFlex="98%" *ngIf="activeClientMembers">
|
||||
<! -- TODO: Display activeClientMembers -->
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Terms' | translate }}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
+13
@@ -1,5 +1,6 @@
|
||||
/** Angular Imports */
|
||||
import { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
/**
|
||||
* Create Loans Account Preview Step
|
||||
@@ -16,6 +17,9 @@ export class LoansAccountPreviewStepComponent implements OnChanges {
|
||||
@Input() loansAccountProductTemplate: any;
|
||||
/** Loans Account Data */
|
||||
@Input() loansAccount: any;
|
||||
/** active Client Members in case of GSIM Account */
|
||||
@Input() activeClientMembers?: any;
|
||||
|
||||
/** Submit Loans Account */
|
||||
@Output() submitEvent = new EventEmitter();
|
||||
|
||||
@@ -35,11 +39,20 @@ export class LoansAccountPreviewStepComponent implements OnChanges {
|
||||
'collectedon'
|
||||
];
|
||||
|
||||
/** Table Data Source */
|
||||
dataSource: any;
|
||||
productEnableDownPayment = false;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.productEnableDownPayment = this.loansAccountProductTemplate.product.enableDownPayment;
|
||||
if (this.activeClientMembers) {
|
||||
this.dataSource = new MatTableDataSource<any>(this.activeClientMembers);
|
||||
this.loansAccount.principalAmount = this.activeClientMembers.reduce(
|
||||
(acc: number, member: any) => acc + (member.principal ?? 0),
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user