Management Loan tranches
This commit is contained in:
@@ -47,12 +47,12 @@
|
|||||||
</span>
|
</span>
|
||||||
<button type="button" mat-icon-button color="primary"
|
<button type="button" mat-icon-button color="primary"
|
||||||
(click)="editDisbursementDataEntry(rowIndex)" matTooltip="Edit"
|
(click)="editDisbursementDataEntry(rowIndex)" matTooltip="Edit"
|
||||||
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate">
|
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate && showActionsTrancheButtons()">
|
||||||
<fa-icon icon="edit"></fa-icon>
|
<fa-icon icon="edit"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" mat-icon-button color="warn"
|
<button type="button" mat-icon-button color="warn"
|
||||||
(click)="removeDisbursementDataEntry(rowIndex)" matTooltip="Delete"
|
(click)="removeDisbursementDataEntry(rowIndex)" matTooltip="Delete"
|
||||||
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate">
|
matTooltipPosition="left" *ngIf="!ele.actualDisbursementDate && showActionsTrancheButtons()">
|
||||||
<fa-icon icon="trash"></fa-icon>
|
<fa-icon icon="trash"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export class LoanTrancheDetailsComponent implements OnInit {
|
|||||||
maxDate = new Date(2100, 0, 1);
|
maxDate = new Date(2100, 0, 1);
|
||||||
disbursementDataSource: {}[] = [];
|
disbursementDataSource: {}[] = [];
|
||||||
totalMultiDisbursed: number = null;
|
totalMultiDisbursed: number = null;
|
||||||
|
disallowExpectedDisbursements = false;
|
||||||
pristine = true;
|
pristine = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,6 +44,7 @@ export class LoanTrancheDetailsComponent implements OnInit {
|
|||||||
this.route.parent.data.subscribe((data: { loanDetailsData: any }) => {
|
this.route.parent.data.subscribe((data: { loanDetailsData: any }) => {
|
||||||
this.loanId = data.loanDetailsData.id;
|
this.loanId = data.loanDetailsData.id;
|
||||||
this.loanDetails = data.loanDetailsData;
|
this.loanDetails = data.loanDetailsData;
|
||||||
|
this.disallowExpectedDisbursements = this.loanDetails.disallowExpectedDisbursements || false;
|
||||||
this.disbursementDataSource = data.loanDetailsData.disbursementDetails;
|
this.disbursementDataSource = data.loanDetailsData.disbursementDetails;
|
||||||
this.currentPrincipalAmount = this.loanDetails.approvedPrincipal;
|
this.currentPrincipalAmount = this.loanDetails.approvedPrincipal;
|
||||||
});
|
});
|
||||||
@@ -60,7 +62,8 @@ export class LoanTrancheDetailsComponent implements OnInit {
|
|||||||
this.status === 'Overpaid' ||
|
this.status === 'Overpaid' ||
|
||||||
this.status === 'Closed (rescheduled)' ||
|
this.status === 'Closed (rescheduled)' ||
|
||||||
this.status === 'Closed (written off)' ||
|
this.status === 'Closed (written off)' ||
|
||||||
this.status === 'Submitted and pending approval'
|
this.status === 'Submitted and pending approval' ||
|
||||||
|
this.disallowExpectedDisbursements
|
||||||
) {
|
) {
|
||||||
this.return = false;
|
this.return = false;
|
||||||
}
|
}
|
||||||
@@ -74,6 +77,21 @@ export class LoanTrancheDetailsComponent implements OnInit {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showActionsTrancheButtons() {
|
||||||
|
if (
|
||||||
|
this.status === 'Closed (obligations met)' ||
|
||||||
|
this.status === 'Overpaid' ||
|
||||||
|
this.status === 'Closed (rescheduled)' ||
|
||||||
|
this.status === 'Closed (written off)' ||
|
||||||
|
this.status === 'Submitted and pending approval' ||
|
||||||
|
this.disallowExpectedDisbursements
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the Principal Disbursed.
|
* Adds the Principal Disbursed.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user