feat: add entity data table checks component (#523)

Fixes: #168
This commit is contained in:
punwai
2019-12-29 20:02:17 +03:00
committed by Abhay Chawla
parent 2ce737e53d
commit fc8bb04934
9 changed files with 304 additions and 4 deletions
@@ -0,0 +1,71 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px">
<button mat-raised-button color="primary">
<fa-icon icon="plus"></fa-icon>&nbsp;&nbsp;
Create Entity Data Table Check
</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="entity">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Entity </th>
<td mat-cell *matCellDef="let entityDataTableCheck"> {{ entityDataTableCheck.entity }} </td>
</ng-container>
<ng-container matColumnDef="productName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Product Name </th>
<td mat-cell *matCellDef="let entityDataTableCheck"> {{ entityDataTableCheck.productName }} </td>
</ng-container>
<ng-container matColumnDef="datatableName">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Data Table </th>
<td mat-cell *matCellDef="let entityDataTableCheck"> {{ entityDataTableCheck.datatableName }} </td>
</ng-container>
<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Status </th>
<td mat-cell *matCellDef="let entityDataTableCheck"> {{ entityDataTableCheck.status.value }} </td>
</ng-container>
<ng-container matColumnDef="systemDefined">
<th mat-header-cell *matHeaderCellDef mat-sort-header> System Defined </th>
<td mat-cell *matCellDef="let entityDataTableCheck">
<div [className]="entityDataTableCheck.systemDefined === true ? 'true' : 'false'">
<fa-icon *ngIf="entityDataTableCheck.systemDefined" icon="check-circle" size="lg" matTooltip="Yes" matTooltipPosition="right"></fa-icon>
<fa-icon *ngIf="!entityDataTableCheck.systemDefined" icon="times-circle" size="lg" matTooltip="No" matTooltipPosition="right"></fa-icon>
</div>
</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef> Actions </th>
<td mat-cell *matCellDef="let entityDataTableCheck">
<button mat-button (click)="deleteEntityDataTableCheck(entityDataTableCheck.id)" color="warn">
<fa-icon icon="trash"></fa-icon>&nbsp;&nbsp;Delete
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>