Files
cbsnexora/src/app/tasks/checker-inbox-and-tasks-tabs/reschedule-loan/reschedule-loan.component.html
T

109 lines
4.1 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/.
-->
@if (loans && loans.length > 0) {
<div class="tab-container mat-typography">
<div class="layout-row align-start-center">
<div class="search-box flex-40">
<mat-form-field class="flex-90">
<input
matInput
placeholder="{{ 'labels.text.Filter by name' | translate }}"
(keyup)="applyFilter($event.target.value)"
/>
</mat-form-field>
</div>
<div class="flex-60">
<button
mat-raised-button
color="success"
*mifosxHasPermission="'APPROVE_LOANRESCHEDULE'"
(click)="bulkLoanReschedule('Approve')"
>
<fa-icon icon="check" class="m-r-10"></fa-icon>{{ 'labels.buttons.Approve' | translate }}
</button>
<button
mat-raised-button
color="reject"
*mifosxHasPermission="'APPROVE_LOANRESCHEDULE'"
(click)="bulkLoanReschedule('Reject')"
>
<fa-icon icon="times" class="m-r-10"></fa-icon>{{ 'labels.buttons.Reject' | translate }}
</button>
</div>
</div>
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox
(change)="$event ? masterToggle() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()"
[aria-label]="checkboxLabel()"
>
</mat-checkbox>
</th>
<td mat-cell *matCellDef="let row">
<mat-checkbox
(click)="$event.stopPropagation()"
(change)="$event ? selection.toggle(row) : null"
[checked]="selection.isSelected(row)"
[aria-label]="checkboxLabel(row)"
>
</mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="client">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Client' | translate }}</th>
<td
mat-cell
*matCellDef="let loan"
class="view-details"
[routerLink]="['../../clients', loan.clientId, 'general']"
>
{{ loan.clientName }}
</td>
</ng-container>
<ng-container matColumnDef="rescheduleRequestNo">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Reschedule Request' | translate }}#</th>
<td mat-cell *matCellDef="let loan">{{ loan.id }}</td>
</ng-container>
<ng-container matColumnDef="loanAccountNo">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Loan Account' | translate }}#</th>
<td
mat-cell
*matCellDef="let loan"
class="view-details"
[routerLink]="['../../clients', loan.clientId, 'loans', loan.loanId, 'general']"
>
{{ loan.loanAccountNumber }}
</td>
</ng-container>
<ng-container matColumnDef="rescheduleForm">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Reschedule Form' | translate }}</th>
<td mat-cell *matCellDef="let loan">{{ loan.rescheduleFromDate | dateFormat }}</td>
</ng-container>
<ng-container matColumnDef="rescheduleReason">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Reschedule Reason' | translate }}</th>
<td mat-cell *matCellDef="let loan">{{ loan.rescheduleReasonCodeValue.name }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" (click)="selection.toggle(row)"></tr>
</table>
</div>
}
@if (loans.length === 0) {
<div class="alert">
<div class="message">
<i class="fa fa-exclamation-circle alert-check"></i>
{{ 'labels.text.No pending rescheduled loan available for this account' | translate }}
</div>
</div>
}