Add Repayment Info as part of the Loan Account request
This commit is contained in:
+6
-6
@@ -34,18 +34,18 @@
|
||||
<td mat-footer-cell *matFooterCellDef> </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="principalDue">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef> Principal Due </th>
|
||||
<td mat-cell class="check r-amount" *matCellDef="let ele"> {{ ele.principalDue | number }} </td>
|
||||
<td mat-footer-cell class="check r-amount" *matFooterCellDef> <b> {{ repaymentScheduleDetails.totalPrincipalExpected | currency }}</b> </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="balanceOfLoan">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef> Balance Of Loan </th>
|
||||
<td mat-cell class="r-amount" *matCellDef="let ele"> {{ ele.principalLoanBalanceOutstanding | number }} </td>
|
||||
<td mat-footer-cell class="r-amount" *matFooterCellDef> </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="principalDue">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef> Principal Due </th>
|
||||
<td mat-cell class="check r-amount" *matCellDef="let ele"> {{ ele.principalDue | number }} </td>
|
||||
<td mat-footer-cell class="check r-amount" *matFooterCellDef> <b> {{ repaymentScheduleDetails.totalPrincipalExpected | currency }}</b> </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="interest">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef> Interest </th>
|
||||
<td mat-cell class="r-amount" *matCellDef="let ele"> {{ ele.interestOriginalDue | number}} </td>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
@@ -8,13 +8,14 @@ import { ActivatedRoute } from '@angular/router';
|
||||
})
|
||||
export class RepaymentScheduleTabComponent implements OnInit {
|
||||
|
||||
loanDetails: any;
|
||||
/** Loan Repayment Schedule Details Data */
|
||||
repaymentScheduleDetails: any;
|
||||
@Input() repaymentScheduleDetails: any = null;
|
||||
loanDetailsDataRepaymentSchedule: any = [];
|
||||
|
||||
/** Stores if there is any waived amount */
|
||||
isWaived: boolean;
|
||||
/** Columns to be displayed in original schedule table. */
|
||||
displayedColumns: string[] = ['number', 'days', 'date', 'paiddate', 'check', 'principalDue', 'balanceOfLoan', 'interest', 'fees', 'penalties', 'due', 'paid', 'inadvance', 'late', 'waived', 'outstanding'];
|
||||
displayedColumns: string[] = ['number', 'days', 'date', 'paiddate', 'check', 'balanceOfLoan', 'principalDue', 'interest', 'fees', 'penalties', 'due', 'paid', 'inadvance', 'late', 'waived', 'outstanding'];
|
||||
|
||||
/**
|
||||
* Retrieves the loans with associations data from `resolve`.
|
||||
@@ -22,12 +23,14 @@ export class RepaymentScheduleTabComponent implements OnInit {
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.parent.data.subscribe((data: { loanDetailsData: any }) => {
|
||||
this.loanDetails = data.loanDetailsData;
|
||||
this.repaymentScheduleDetails = data.loanDetailsData.repaymentSchedule;
|
||||
this.loanDetailsDataRepaymentSchedule = data.loanDetailsData.repaymentSchedule;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.repaymentScheduleDetails == null) {
|
||||
this.repaymentScheduleDetails = this.loanDetailsDataRepaymentSchedule;
|
||||
}
|
||||
this.isWaived = this.repaymentScheduleDetails.totalWaived > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user