Files
cbsnexora/src/app/organization/tellers/tellers.component.html
T

83 lines
3.3 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/.
-->
<div class="container">
<div class="table-header">
<div class="table-title-group">
<h2 class="table-title">
<i class="fas fa-cash-register title-icon"></i>
{{ 'labels.heading.Teller / Cashier Management' | translate }}
</h2>
</div>
<div class="table-actions">
<mat-form-field class="table-search" appearance="outline">
<i matPrefix class="fas fa-search"></i>
<mat-label>{{ 'labels.inputs.Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" />
</mat-form-field>
<div class="table-buttons" *ngIf="!tellersData || tellersData.length === 0">
<button
mat-flat-button
color="primary"
class="btn-create"
[routerLink]="['create']"
*mifosxHasPermission="'CREATE_TELLER'"
>
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Create Teller' | translate }}
</button>
</div>
</div>
</div>
<div class="table-container">
<table mat-table [dataSource]="dataSource" matSort class="modern-table">
<ng-container matColumnDef="officeName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Branch' | translate }}</th>
<td mat-cell *matCellDef="let teller">{{ teller.officeName }}</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Teller Name' | translate }}</th>
<td mat-cell *matCellDef="let teller">{{ teller.name }}</td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Status' | translate }}</th>
<td mat-cell *matCellDef="let teller">
<span [class]="teller.status === 'ACTIVE' ? 'status-badge status-active' : 'status-badge status-closed'">
{{
teller.status === 'ACTIVE'
? ('labels.inputs.Active' | translate)
: ('labels.catalogs.Inactive' | translate)
}}
</span>
</td>
</ng-container>
<ng-container matColumnDef="startDate">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Started On' | translate }}</th>
<td mat-cell *matCellDef="let teller">{{ teller.startDate | dateFormat }}</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let teller" (click)="$event.stopPropagation()">
<a class="cell-link" [routerLink]="[teller.id, 'cashiers']">
<i class="fas fa-eye" style="margin-right: 6px; font-size: 11px"></i
>{{ 'labels.buttons.View Cashiers' | translate }}
</a>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" [routerLink]="[row.id]" class="table-row"></tr>
</table>
</div>
</div>