Add precommit hooks
This commit is contained in:
@@ -20,19 +20,30 @@
|
||||
<mat-card-title class="card-header">
|
||||
<div class="row">
|
||||
Actions
|
||||
<button mat-raised-button color="primary" type="button" class="btn btn-outline-primary ml-auto mr-2" (click)="downloadCsv()"> EXPORT </button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
type="button"
|
||||
class="btn btn-outline-primary ml-auto mr-2"
|
||||
(click)="downloadCsv()"
|
||||
>
|
||||
EXPORT
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-title>
|
||||
<div class="card-body">
|
||||
|
||||
<mat-form-field appearance="outline">
|
||||
<mat-label> Filter </mat-label>
|
||||
<input matInput type="text" (keyup)="doFilter($event.target.value)" placeholder="Filter">
|
||||
<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" multiTemplateDataRows>
|
||||
|
||||
<!-- Expand Column -->
|
||||
<ng-container matColumnDef="expand">
|
||||
<mat-header-cell *matHeaderCellDef> Expand </mat-header-cell>
|
||||
@@ -44,32 +55,52 @@
|
||||
|
||||
<ng-container matColumnDef="user">
|
||||
<mat-header-cell *matHeaderCellDef> NAME </mat-header-cell>
|
||||
<mat-cell *matCellDef="let action"> {{action.user}} </mat-cell>
|
||||
<mat-cell *matCellDef="let action"> {{ action.user }} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="role">
|
||||
<mat-header-cell *matHeaderCellDef> ROLE </mat-header-cell>
|
||||
<mat-cell *matCellDef="let action"> {{action.role}} </mat-cell>
|
||||
<mat-cell *matCellDef="let action"> {{ action.role }} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef> ACTION </mat-header-cell>
|
||||
<mat-cell *matCellDef="let action"> {{action.action}} </mat-cell>
|
||||
<mat-cell *matCellDef="let action"> {{ action.action }} </mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="status">
|
||||
<mat-header-cell *matHeaderCellDef> STATUS </mat-header-cell>
|
||||
<mat-cell *matCellDef="let action">
|
||||
<span *ngIf="action.approval == true" class="badge badge-success badge-pill"> {{approvalStatus(action.approval)}} </span>
|
||||
<span *ngIf="action.approval == false" class="badge badge-danger badge-pill"> {{approvalStatus(action.approval)}} </span>
|
||||
<span *ngIf="action.approval == true" class="badge badge-success badge-pill">
|
||||
{{ approvalStatus(action.approval) }}
|
||||
</span>
|
||||
<span *ngIf="action.approval == false" class="badge badge-danger badge-pill">
|
||||
{{ approvalStatus(action.approval) }}
|
||||
</span>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="approve">
|
||||
<mat-header-cell *matHeaderCellDef> APPROVE </mat-header-cell>
|
||||
<mat-cell *matCellDef="let action">
|
||||
<button mat-raised-button color="primary" *ngIf="!action.approval" class="btn btn-outline-success" (click)="approveAction(action)"> Approve </button>
|
||||
<button mat-raised-button color="warn" *ngIf="action.approval" class="btn btn-outline-danger" (click)="disapproveAction(action)"> Disapprove </button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
*ngIf="!action.approval"
|
||||
class="btn btn-outline-success"
|
||||
(click)="approveAction(action)"
|
||||
>
|
||||
Approve
|
||||
</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="warn"
|
||||
*ngIf="action.approval"
|
||||
class="btn btn-outline-danger"
|
||||
(click)="disapproveAction(action)"
|
||||
>
|
||||
Disapprove
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
@@ -77,22 +108,37 @@
|
||||
<ng-container matColumnDef="expandedDetail">
|
||||
<mat-cell *matCellDef="let action">
|
||||
<div>
|
||||
<span><strong>Staff Name:</strong> {{action.user}}</span><br>
|
||||
<span><strong>Role:</strong> {{action.role}}</span><br>
|
||||
<span><strong>Action Details:</strong> {{action.action}}</span><br>
|
||||
<span><strong>Approval Status:</strong> {{action.approval}}</span><br>
|
||||
<span><strong>Staff Name:</strong> {{ action.user }}</span
|
||||
><br />
|
||||
<span><strong>Role:</strong> {{ action.role }}</span
|
||||
><br />
|
||||
<span><strong>Action Details:</strong> {{ action.action }}</span
|
||||
><br />
|
||||
<span><strong>Approval Status:</strong> {{ action.approval }}</span
|
||||
><br />
|
||||
</div>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;" matRipple class="element-row"
|
||||
[class.expanded]="row.isExpanded"></mat-row>
|
||||
<mat-row *matRowDef="let row; columns: ['expandedDetail'];"
|
||||
[@detailExpand]="row.isExpanded == true ? 'expanded': 'collapsed'" style="overflow: hidden"></mat-row>
|
||||
<mat-row
|
||||
*matRowDef="let row; columns: displayedColumns"
|
||||
matRipple
|
||||
class="element-row"
|
||||
[class.expanded]="row.isExpanded"
|
||||
></mat-row>
|
||||
<mat-row
|
||||
*matRowDef="let row; columns: ['expandedDetail']"
|
||||
[@detailExpand]="row.isExpanded == true ? 'expanded' : 'collapsed'"
|
||||
style="overflow: hidden"
|
||||
></mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator [pageSize]="10" [pageSizeOptions]="[10, 20, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator
|
||||
[pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100]"
|
||||
showFirstLastButtons
|
||||
></mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,4 +148,3 @@
|
||||
<!-- End Page content -->
|
||||
<!-- ============================================================== -->
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user