2020-07-24 09:48:58 +02:00
|
|
|
<app-refresh-table [loading]="dataSource.loading$ | async" [selection]="selection" (refreshed)="refreshPage()"
|
|
|
|
[dataSize]="dataSource.totalResult">
|
|
|
|
<ng-template appHasRole [appHasRole]="['project.app.write']" actions>
|
2020-05-13 14:41:43 +02:00
|
|
|
<a [disabled]="disabled" class="add-button" [routerLink]="[ '/projects', projectId, 'apps', 'create']"
|
|
|
|
color="primary" mat-raised-button>
|
|
|
|
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
|
|
|
</a>
|
|
|
|
</ng-template>
|
|
|
|
|
2020-07-24 09:48:58 +02:00
|
|
|
<div class="table-wrapper">
|
2020-07-30 16:54:15 +02:00
|
|
|
<table [dataSource]="dataSource" mat-table class="table" matSort aria-label="Elements">
|
2020-07-24 09:48:58 +02:00
|
|
|
<ng-container matColumnDef="select">
|
|
|
|
<th class="selection" mat-header-cell *matHeaderCellDef>
|
|
|
|
<mat-checkbox color="primary" (change)="$event ? masterToggle() : null"
|
|
|
|
[checked]="selection.hasValue() && isAllSelected()"
|
|
|
|
[indeterminate]="selection.hasValue() && !isAllSelected()">
|
|
|
|
</mat-checkbox>
|
|
|
|
</th>
|
|
|
|
<td class="selection" mat-cell *matCellDef="let row">
|
|
|
|
<mat-checkbox color="primary" (click)="$event.stopPropagation()"
|
|
|
|
(change)="$event ? selection.toggle(row) : null" [checked]="selection.isSelected(row)">
|
|
|
|
</mat-checkbox>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2020-07-24 09:48:58 +02:00
|
|
|
<ng-container matColumnDef="name">
|
|
|
|
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.ROLE.NAME' | translate }} </th>
|
|
|
|
<td class="pointer" [routerLink]="['/projects', projectId, 'apps', role.id ]" mat-cell
|
|
|
|
*matCellDef="let role">
|
|
|
|
{{role.name}} </td>
|
|
|
|
</ng-container>
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2020-07-24 09:48:58 +02:00
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
|
|
<tr class="data-row" mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
|
|
</table>
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2020-07-30 16:54:15 +02:00
|
|
|
<mat-paginator class="paginator" #paginator [length]="dataSource.totalResult" [pageSize]="25"
|
2020-07-24 09:48:58 +02:00
|
|
|
[pageSizeOptions]="[25, 50, 100, 250]">
|
|
|
|
</mat-paginator>
|
|
|
|
</div>
|
|
|
|
</app-refresh-table>
|