refactor: Loans Module (#1150)

Fixes: #1149
This commit is contained in:
Muskan Khedia
2020-07-22 20:32:55 +05:30
committed by GitHub
parent f618bb3cda
commit 55280eae2a
65 changed files with 622 additions and 470 deletions
@@ -129,7 +129,7 @@
<ng-container matColumnDef="Type">
<th mat-header-cell *matHeaderCellDef> Type </th>
<td mat-cell *matCellDef="let element">
<i class="fa fa-large" [ngClass]="(element.loanType.value=== 'Individual')?'fa-user':'fa-group'"></i>
<i class="fa fa-large" [ngClass]="(element.loanType.value=== 'Individual')?'fa-user':'fa-group'" matTooltip=" {{ element.loanType.value }}" matTooltipPosition="above"></i>
</td>
</ng-container>
@@ -137,20 +137,30 @@
<ng-container matColumnDef="Actions">
<th mat-header-cell *matHeaderCellDef> Actions </th>
<td mat-cell *matCellDef="let element">
<button *ngIf="element.status.active" class="account-action-button" mat-raised-button color="primary">
<button *ngIf="element.status.active" class="account-action-button" mat-raised-button color="primary" matTooltip="Make Repayment" matTooltipPosition="above"
(click)="routeEdit($event)" [routerLink]="['../','loans', element.id, 'actions', 'make-repayment']">
<i class="fa fa-dollar"></i>
</button>
<button *ngIf="element.status.pendingApproval" class="account-action-button" mat-raised-button color="primary">
<i class="fa fa-check"></i>
</button>
<button *ngIf="!element.status.pendingApproval && !element.status.active && !element.status.overpaid"
class="account-action-button" mat-raised-button color="primary">
<i class="fa fa-flag"></i>
</button>
<button *ngIf="!element.status.pendingApproval && !element.status.active && element.status.overpaid"
class="account-action-button" mat-raised-button color="primary">
<span *ngIf="element.status.pendingApproval">
<button class="account-action-button" mat-raised-button color="primary" matTooltip="Approve"
matTooltipPosition="above" *mifosxHasPermission="'APPROVE_LOAN'" (click)="routeEdit($event)"
[routerLink]="['../','loans', element.id, 'actions', 'approve']">
<i class="fa fa-check"></i>
</button>
</span>
<span *ngIf="!element.status.pendingApproval && !element.status.active && !element.status.overpaid">
<button class="account-action-button" mat-raised-button color="primary" matTooltip="Disburse"
matTooltipPosition="above" *mifosxHasPermission="'DISBURSE_LOAN'"
(click)="routeEdit($event)" [routerLink]="['../','loans', element.id, 'actions', 'disburse']">
<i class="fa fa-flag"></i>
</button>
</span>
<span *ngIf="!element.status.pendingApproval && !element.status.active && element.status.overpaid">
<button class="account-action-button" mat-raised-button color="primary" matTooltip="Transfer Funds"
matTooltipPosition="above" *mifosxHasPermission="'DISBURSE_LOAN'">
<i class="fa fa-exchange"></i>
</button>
</span>
</td>
</ng-container>
@@ -193,11 +203,10 @@
<ng-container matColumnDef="Type">
<th mat-header-cell *matHeaderCellDef> Type </th>
<td mat-cell *matCellDef="let element">
<i class="fa fa-large" [ngClass]="(element.loanType.value=== 'Individual')?'fa-user':'fa-group'"></i>
<i class="fa fa-large" [ngClass]="(element.loanType.value === 'Individual')?'fa-user':'fa-group'" matTooltip=" {{ element.loanType.value }}" matTooltipPosition="above"></i>
</td>
</ng-container>
<ng-container matColumnDef="Closed Date">
<th mat-header-cell *matHeaderCellDef> Closed Date </th>
<td mat-cell *matCellDef="let element">{{element.timeline.closedOnDate | date}}</td>