Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 4x 94x 94x 2x 2x 2x 2x 2x 2x 2x 2x 4x 126x 126x 126x 126x 6x 60x 6x 6x 60x 6x 6x 120x 40x 6x 20x 6x 4x |
<h1 class="title">Administration Panel</h1>
<div class="container">
<p-table [value]="users" [tableStyle]="{ 'min-width': '50rem' }" [paginator]="true" [rows]="10"
[rowsPerPageOptions]="[10, 20, 50]" [showCurrentPageReport]="true"
currentPageReportTemplate="{first} - {last} of {totalRecords} users" [rowHover]="true">
<ng-template #header>
<tr>
<th pSortableColumn="lastname">Lastname <p-sortIcon field="lastname"></p-sortIcon></th>
<th pSortableColumn="firstname">Firstname <p-sortIcon field="firstname"></p-sortIcon></th>
<th pSortableColumn="email">Email <p-sortIcon field="email"></p-sortIcon></th>
<th pSortableColumn="company_id">Company <p-sortIcon field="company_id"></p-sortIcon></th>
<th pSortableColumn="is_active">Status <p-sortIcon field="is_active"></p-sortIcon></th>
<th pSortableColumn="is_admin">Role <p-sortIcon field="is_admin"></p-sortIcon></th>
<th>Action</th>
</tr>
</ng-template>
<ng-template #body let-users>
<tr>
<td>{{ users.lastname }}</td>
<td>{{ users.firstname }}</td>
<td>{{ users.email }}</td>
<td>{{ users.company_id }}</td>
<td>
<p-tag [value]="getStatus(users.is_active)" [severity]="users.is_active ? 'warn' : 'success' " />
</td>
<td>
<p-tag [value]="getRole(users.is_admin)" [severity]="users.is_admin ? 'contrast' : 'info' " />
</td>
<td>
@if (this.actualUserId !== users.id) {
<a href="#" [routerLink]="['/users/', users.id]" class="pi pi-pen-to-square"><i class="fa fa-edit edit"></i></a>
}
@else {
<a href="#" [routerLink]="['/profile']" class="pi pi-pen-to-square"><i class="fa fa-edit edit"></i></a>
}
</td>
</tr>
</ng-template>
</p-table>
</div>
|