2018-05-25 13:49:00 +00:00
|
|
|
<mat-card>
|
|
|
|
<mat-card-title-group>
|
2020-05-11 20:01:21 +00:00
|
|
|
<mat-card-title>Roles</mat-card-title>
|
|
|
|
<a mat-button [routerLink]="['/roles', 'new']">
|
2019-06-12 14:04:50 +00:00
|
|
|
<mat-icon>add_box</mat-icon>
|
|
|
|
Add
|
|
|
|
</a>
|
2018-05-25 13:49:00 +00:00
|
|
|
</mat-card-title-group>
|
|
|
|
<mat-card-content>
|
|
|
|
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
|
|
|
<!-- Name Column -->
|
|
|
|
<ng-container matColumnDef="name">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Name</mat-header-cell>
|
2020-10-01 15:21:22 +00:00
|
|
|
<mat-cell *matCellDef="let row"
|
|
|
|
><a [routerLink]="['/roles', row.id]">{{ row.name }}</a></mat-cell
|
|
|
|
>
|
2018-05-25 13:49:00 +00:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<!-- Permissions Column -->
|
|
|
|
<ng-container matColumnDef="permissions">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Permissions</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let row">
|
|
|
|
<ul>
|
2020-10-01 15:21:22 +00:00
|
|
|
<li *ngFor="let permission of row.permissions">{{ permission }}</li>
|
2018-05-25 13:49:00 +00:00
|
|
|
</ul>
|
|
|
|
</mat-cell>
|
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
2020-10-01 15:21:22 +00:00
|
|
|
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
2018-05-25 13:49:00 +00:00
|
|
|
</mat-table>
|
|
|
|
|
2020-10-01 15:21:22 +00:00
|
|
|
<mat-paginator
|
|
|
|
#paginator
|
|
|
|
[length]="dataSource.data.length"
|
|
|
|
[pageIndex]="0"
|
|
|
|
[pageSize]="50"
|
|
|
|
[pageSizeOptions]="[25, 50, 100, 250]"
|
|
|
|
>
|
2018-05-25 13:49:00 +00:00
|
|
|
</mat-paginator>
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|