127 lines
6.3 KiB
HTML
127 lines
6.3 KiB
HTML
<!-- Begin page -->
|
|
<div class="wrapper">
|
|
<app-sidebar></app-sidebar>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- Start Page Content here -->
|
|
<!-- ============================================================== -->
|
|
|
|
<div id="content">
|
|
<app-topbar></app-topbar>
|
|
<!-- Start Content-->
|
|
<div class="container-fluid" appMenuSelection>
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a routerLink="/home">Home</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">Accounts</li>
|
|
</ol>
|
|
</nav>
|
|
<div class="card">
|
|
<mat-card-title class="card-header">
|
|
Accounts
|
|
</mat-card-title>
|
|
<div class="card-body">
|
|
<div *ngIf="selection.selected.length <= 0" class="row card-header">
|
|
<mat-form-field appearance="outline">
|
|
<mat-label> ACCOUNT TYPE </mat-label>
|
|
<mat-select id="typeSelect" [(value)]="accountsType" (selectionChange)="filterAccounts()">
|
|
<mat-option value="all">ALL</mat-option>
|
|
<mat-option value="user">USER</mat-option>
|
|
<mat-option value="cashier">CASHIER</mat-option>
|
|
<mat-option value="vendor">VENDOR</mat-option>
|
|
<mat-option value="tokenAgent">TOKENAGENT</mat-option>
|
|
<mat-option value="group">GROUPACCOUNT</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
<button mat-raised-button color="primary" routerLink="/accounts/create" type="button" class="btn btn-outline-primary ml-auto">
|
|
<mat-icon>add</mat-icon>
|
|
ADD NEW </button>
|
|
<button mat-raised-button color="primary" routerLink="/accounts/export" type="button" class="btn btn-outline-primary ml-2"> EXPORT </button>
|
|
</div>
|
|
<div *ngIf="selection.selected.length" class="row card-header">
|
|
<p><strong> {{selection.selected.length}} selected </strong></p>
|
|
<button mat-raised-button color="primary" type="button" class="btn btn-outline-primary ml-auto" (click)="approveAccount()"> APPROVE </button>
|
|
<button mat-raised-button color="primary" routerLink="/accounts/export" type="button" class="btn btn-outline-primary ml-2"> EXPORT </button>
|
|
</div>
|
|
|
|
<mat-form-field appearance="outline">
|
|
<mat-label> Filter </mat-label>
|
|
<input matInput type="text" (keyup)="doFilter($event.target.value)" placeholder="Filter">
|
|
<mat-icon matSuffix>search</mat-icon>
|
|
</mat-form-field>
|
|
|
|
<mat-table class="mat-elevation-z10" [dataSource]="dataSource" matSort matSortActive="created"
|
|
matSortDirection="desc" matSortDisableClear>
|
|
<ng-container matColumnDef="name">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> NAME </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.name}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="phone">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> PHONE NUMBER </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.phone}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="created">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> CREATED </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.created}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="balance">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> BALANCE </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.balance}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="type">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> TYPE </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.type}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="status">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> STATUS </mat-header-cell>
|
|
<mat-cell *matCellDef="let user">
|
|
<span *ngIf="user.status === 'approved'" class="badge badge-success badge-pill"> {{user.status}} </span>
|
|
<span *ngIf="user.status === 'unapproved'" class="badge badge-danger badge-pill"> {{user.status}} </span>
|
|
</mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="location">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> LOCATION </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.location}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="failedPinAttempts">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> FAILED PIN ATTEMPTS </mat-header-cell>
|
|
<mat-cell *matCellDef="let user"> {{user.failedPinAttempts}} </mat-cell>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="select">
|
|
<mat-header-cell *matHeaderCellDef>
|
|
<mat-checkbox (change)="$event ? masterToggle() : null"
|
|
[checked]="selection.hasValue() && isAllSelected()"
|
|
[indeterminate]="selection.hasValue() && !isAllSelected">
|
|
</mat-checkbox>
|
|
</mat-header-cell>
|
|
<mat-cell *matCellDef="let transaction">
|
|
<mat-checkbox (click)="$event.stopPropagation()"
|
|
(change)="$event ? selection.toggle(transaction) : null"
|
|
[checked]="selection.isSelected(transaction)">
|
|
</mat-checkbox>
|
|
</mat-cell>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let account; columns: displayedColumns" (click)="viewAccount(account)" matRipple></mat-row>
|
|
</mat-table>
|
|
|
|
<mat-paginator [pageSize]="10" [pageSizeOptions]="[10, 20, 50, 100]" showFirstLastButtons></mat-paginator>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<app-footer appMenuSelection></app-footer>
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Page content -->
|
|
<!-- ============================================================== -->
|
|
</div>
|