Management Loan tranches

This commit is contained in:
Jose Alberto Hernandez
2022-09-12 19:03:04 -05:00
parent 414fe2a2d7
commit e8bab81ebd
3 changed files with 179 additions and 43 deletions
@@ -7,29 +7,29 @@
<h3>Loan Tranche Details</h3>
<div fxLayout="row" fxLayoutAlign="flex-end">
<button mat-raised-button color="primary" *ngIf="showAddDeleteTrancheButtons('adddisbursedetails')">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;Add
</button>
<span class="delete-button">
<button mat-raised-button color="warn" (click)="delete()" *ngIf="showAddDeleteTrancheButtons('deletedisbursedetails')">
<fa-icon icon="trash"></fa-icon>&nbsp;&nbsp;Delete
</button>
</span>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="flex-end" fxLayoutGap="2%">
<button mat-raised-button color="primary" *ngIf="showAddTrancheButtons()"
(click)="addDisbursementDataEntry()">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;Add
</button>
<button mat-raised-button color="primary" *ngIf="!pristine"
(click)="editDisbursementData()">
Apply Changes
</button>
</div>
<table mat-table [dataSource]="loanDetails.disbursementDetails" *ngIf="loanDetails.disbursementDetails.length>0">
<table mat-table [dataSource]="disbursementDataSource" *ngIf="disbursementDataSource.length > 0">
<ng-container matColumnDef="expected disbursement on">
<th mat-header-cell *matHeaderCellDef> Expected Disbursement On </th>
<td mat-cell *matCellDef="let ele"> {{ ele.expectedDisbursementDate | dateFormat}} </td>
<td mat-cell *matCellDef="let ele"> {{ ele.expectedDisbursementDate | dateFormat}} </td>
</ng-container>
<ng-container matColumnDef="disbursed on">
<th mat-header-cell *matHeaderCellDef> Disbursed On </th>
<td mat-cell *matCellDef="let ele">
<span *ngIf="ele.actualDisbursementDate">
{{ ele.actualDisbursementDate | dateFormat }}
{{ ele.actualDisbursementDate | dateFormat }}
</span>
</td>
</ng-container>
@@ -41,12 +41,19 @@
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef> Actions </th>
<td mat-cell *matCellDef="let ele">
<td mat-cell *matCellDef="let ele; let rowIndex = index">
<span *ngIf="ele.actualDisbursementDate">
<i class="fa fa-check "></i>
</span>
<button mat-raised-button color="primary" *ngIf="showEdit(ele)">
<i class="fa fa-pencil"></i>
<button type="button" mat-icon-button color="primary"
(click)="editDisbursementDataEntry(rowIndex)" matTooltip="Edit"
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate">
<fa-icon icon="edit"></fa-icon>
</button>
<button type="button" mat-icon-button color="warn"
(click)="removeDisbursementDataEntry(rowIndex)" matTooltip="Delete"
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate">
<fa-icon icon="trash"></fa-icon>
</button>
</td>
</ng-container>
@@ -63,7 +70,7 @@
<ng-container matColumnDef="emi amount variation from">
<th mat-header-cell *matHeaderCellDef> Applicable From Date </th>
<td mat-cell *matCellDef="let ele"> {{ ele.termVariationApplicableFrom | dateFormat}} </td>
<td mat-cell *matCellDef="let ele"> {{ ele.termVariationApplicableFrom | dateFormat}} </td>
</ng-container>
<ng-container matColumnDef="fixed emi amount">
@@ -75,6 +82,4 @@
<tr mat-row *matRowDef="let row; columns: emivariationColumns;"></tr>
</table>
</div>
</div>