continuation de la partie admin
This commit is contained in:
parent
de939b47f1
commit
91171a3765
35 changed files with 840 additions and 162 deletions
|
|
@ -30,8 +30,8 @@
|
|||
</div>
|
||||
|
||||
<div class="btnAjouterContainer">
|
||||
<button mat-button class="btnAjouter" (click)="onAddAdmin()">
|
||||
<mat-icon>add_circle</mat-icon> Ajouter un admin
|
||||
<button mat-button class="btnAjouter" (click)="onCreateUser()">
|
||||
<mat-icon>add_circle</mat-icon> Ajouter un utilisateur
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
@ -60,13 +60,30 @@
|
|||
<ng-container matColumnDef="dateOfBirth">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Date de naissance </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.dateOfBirth | date:'dd/LL/YYYY à HH:mm:ss' }}
|
||||
{{ user.dateOfBirth | date:'dd/LL/YYYY' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Age Column -->
|
||||
<ng-container matColumnDef="age">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Âge </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{user.age}}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Sexe Column -->
|
||||
<ng-container matColumnDef="sexe">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Sexe </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span *ngIf="user.gender === 'man'">Homme</span>
|
||||
<span *ngIf="user.gender === 'woman'">Femme</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Interests Column -->
|
||||
<ng-container matColumnDef="interests">
|
||||
<th mat-header-cell *matHeaderCellDef> Centre d'intérêts </th>
|
||||
<th mat-header-cell *matHeaderCellDef> Centres d'intérêt </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<span *ngFor="let interest of user.interests; let isLast = last;">
|
||||
<span *ngIf="!isLast"> {{interest}}, </span>
|
||||
|
|
@ -83,11 +100,11 @@
|
|||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- UpdatedAt Column -->
|
||||
<ng-container matColumnDef="updatedAt">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Dernière modification </th>
|
||||
<!-- LastConnexion Column -->
|
||||
<ng-container matColumnDef="lastConnexion">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Dernière connexion </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
{{ user.updatedAt | date:'dd/LL/YYYY à HH:mm:ss' }}
|
||||
{{ user.lastConnexion | date:'dd/LL/YYYY à HH:mm:ss' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
|
@ -101,22 +118,15 @@
|
|||
</ng-container>
|
||||
|
||||
<!-- Delete Column -->
|
||||
<ng-container matColumnDef="delete">
|
||||
<th mat-header-cell *matHeaderCellDef> Supprimer </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<button mat-icon-button (click)="onDelete(user)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Visualisation Column -->
|
||||
<ng-container matColumnDef="visualisation">
|
||||
<th mat-header-cell *matHeaderCellDef> Visualisation </th>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> Actions </th>
|
||||
<td mat-cell *matCellDef="let user">
|
||||
<button mat-icon-button (click)="onVisualize(user)">
|
||||
<mat-icon>aspect_ratio</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button (click)="onDelete(user)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
|
|
|||
Reference in a new issue