38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
<nz-table [nzData]="users()"
|
|
[nzLoading]="usersLoading()"
|
|
[nzFrontPagination]="false"
|
|
class="mr-7">
|
|
<thead>
|
|
<tr class="text-center">
|
|
<th>Nom</th>
|
|
<th>Email</th>
|
|
<th>Fonction</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="text-center">
|
|
@for (user of users(); track user.id) {
|
|
<tr>
|
|
<td>{{user.name}}</td>
|
|
<td>{{user.email}}</td>
|
|
<td>{{user.fonction}}</td>
|
|
<td>
|
|
<div style="justify-content: center; display: flex">
|
|
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" (click)="openEditModal(user)"></nz-icon>
|
|
<nz-divider nzType="vertical"></nz-divider>
|
|
<div>
|
|
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(user.id)" class="cursor-pointer text-red-700"/>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</nz-table>
|
|
|
|
<div class="hidden">
|
|
<app-modal-nav #modalNav nameIcon="edit" [name]="'Modifier'" (ok)="onModalOk(selectedUser.id, updateUser, modalNav)" (cancel)="onModalCancel(modalNav)">
|
|
<app-profil-form #updateUser [user]="selectedUser"></app-profil-form>
|
|
</app-modal-nav>
|
|
</div>
|