92 lines
3.6 KiB
HTML
92 lines
3.6 KiB
HTML
<!--
|
|
Copyright since 2025 Mifos Initiative
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
|
|
<mat-card class="loan-card">
|
|
<mat-card-content>
|
|
<h2>{{ 'labels.heading.GLIM Account Overview' | translate }}</h2>
|
|
|
|
<table mat-table [dataSource]="dataSource">
|
|
<ng-container matColumnDef="loanId">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Loan Id' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">
|
|
{{ element.childLoanId }}
|
|
</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="clientId">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Client ID' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">{{ element.clientId }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="clientName">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Client Name' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">{{ element.clientName }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="loanAccountNumber">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Loan Account Number' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">{{ element.childLoanAccountNo }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="clientPrincipalLoan">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Client Principal Loan' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">{{ element.childPrincipalAmount }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="groupPrincipalLoan">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Group Principal Loan' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">{{ element.parentPrincipalAmount }}</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="status">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Status' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">
|
|
@if (element.status) {
|
|
<span [ngClass]="element.status.code | statusLookup">
|
|
{{ element.status.value }}
|
|
</span>
|
|
}
|
|
</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="actions">
|
|
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
|
|
<td mat-cell *matCellDef="let element">
|
|
@if (element.status?.submittedAndPendingApproval) {
|
|
<button
|
|
mat-raised-button
|
|
color="primary"
|
|
(click)="routeEdit($event)"
|
|
[routerLink]="['/loans-accounts', element.childLoanId, 'actions', 'Approve']"
|
|
>
|
|
<i class="fa fa-check"></i> {{ 'buttons.Approve' | translate }}
|
|
</button>
|
|
}
|
|
@if (element.status?.waitingForDisbursal) {
|
|
<button
|
|
mat-raised-button
|
|
color="primary"
|
|
(click)="routeEdit($event)"
|
|
[routerLink]="['/loans-accounts', element.childLoanId, 'actions', 'Disburse']"
|
|
>
|
|
<i class="fa fa-flag"></i> {{ 'buttons.Disburse' | translate }}
|
|
</button>
|
|
}
|
|
</td>
|
|
</ng-container>
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr
|
|
mat-row
|
|
[routerLink]="['/loans-accounts', row.childLoanId, 'general']"
|
|
*matRowDef="let row; columns: displayedColumns"
|
|
></tr>
|
|
</table>
|
|
</mat-card-content>
|
|
</mat-card>
|