21 lines
987 B
HTML
21 lines
987 B
HTML
<div class="header-container">
|
|
<h1 i18n="@@headerRoleManagement">Gestión de roles</h1>
|
|
<button mat-flat-button color="primary" (click)="addUser()" i18n="@@buttonAddRole">+ Añadir</button>
|
|
</div>
|
|
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
|
|
|
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
|
<th mat-header-cell *matHeaderCellDef> {{ column.header }} </th>
|
|
<td mat-cell *matCellDef="let role"> {{ column.cell(role) }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="actions">
|
|
<th mat-header-cell *matHeaderCellDef i18n="@@headerActions">Acciones</th>
|
|
<td mat-cell *matCellDef="let role">
|
|
<button mat-button color="warn" [disabled]="role.name === 'Super Admin'" (click)="deleteRole(role)" i18n="@@buttonDelete">Eliminar</button>
|
|
</td>
|
|
</ng-container>
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
</table>
|