feat: add cashiers list page (#888)

Fixes: #757
This commit is contained in:
Karan Takalkar
2020-06-23 02:44:29 +05:30
committed by GitHub
parent e01897aa66
commit 02e2155f15
11 changed files with 218 additions and 6 deletions
@@ -0,0 +1,62 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
<button mat-raised-button color="primary" [routerLink]="['create']">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;
New Cashier
</button>
</div>
<div class="container">
<div fxLayout="row" fxLayoutGap="20px">
<mat-form-field fxFlex>
<mat-label>Filter</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)">
</mat-form-field>
</div>
<div class="mat-elevation-z8">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="period">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Period </th>
<td mat-cell *matCellDef="let cashier"> {{ cashier.startDate | date }} - {{ cashier.endDate | date }}</td>
</ng-container>
<ng-container matColumnDef="staffName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Cashier/Staff </th>
<td mat-cell *matCellDef="let cashier"> {{ cashier.staffName }} </td>
</ng-container>
<ng-container matColumnDef="isFullDay">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Full Day/Time </th>
<td mat-cell *matCellDef="let cashier"> {{ cashier.isFullDay ? 'Yes' : 'No' }} </td>
</ng-container>
<ng-container matColumnDef="vaultActions">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Vault Actions </th>
<td mat-cell *matCellDef="let cashier">
<button class="cashier-action-button" mat-raised-button color="accent" matTooltip="Allocate Cash">
<i class="fa fa-arrow-up"></i>
</button>
<button class="cashier-action-button" mat-raised-button color="warn" matTooltip="Settle Cash">
<i class="fa fa-arrow-down"></i>
</button>
<button class="cashier-action-button" mat-raised-button color="primary" matTooltip="View Transactions">
<i class="fa fa-eye"></i>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" [routerLink]="[row.id]"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>