|
1 | 1 | <h1 class="h3 mb-2 text-gray-800">Utilisateurs</h1>
|
2 | 2 | <p class="mb-4">
|
3 |
| - Depuis cette liste vous pouvez gérer les différents comptes qui existent pour la FunixProduction.<br/> |
4 |
| - Que ce soit pour Pacifista ou les autres projets. |
| 3 | + Depuis cette liste vous pouvez gérer les différents comptes qui existent pour la FunixProduction.<br/> |
| 4 | + Que ce soit pour Pacifista ou les autres projets. |
5 | 5 | </p>
|
6 | 6 |
|
7 | 7 | <div class="card shadow mb-4">
|
8 |
| - <div class="card-header py-3"> |
9 |
| - <h4 class="m-0 font-weight-bold text-primary">Utilisateurs de la FunixProduction</h4> |
10 |
| - </div> |
11 |
| - |
12 |
| - <div class="card-body"> |
13 |
| - <div class="col-md-12"> |
14 |
| - <p>Nombre de comptes : {{ entities.totalElementsDatabase }}</p> |
| 8 | + <div class="card-header py-3"> |
| 9 | + <h4 class="m-0 font-weight-bold text-primary">Utilisateurs de la FunixProduction</h4> |
15 | 10 | </div>
|
16 | 11 |
|
17 |
| - <div class="table-responsive"> |
18 |
| - <table mat-table [dataSource]="entities.content" class="table table-bordered" id="dataTable"> |
| 12 | + <div class="card-body"> |
| 13 | + <div class="col-md-12"> |
| 14 | + <p>Nombre de comptes : {{ entities.totalElementsDatabase }}</p> |
| 15 | + </div> |
| 16 | + |
| 17 | + <div class="table-responsive"> |
| 18 | + <table mat-table [dataSource]="entities.content" class="table table-bordered" id="dataTable"> |
| 19 | + |
| 20 | + <ng-container matColumnDef="username"> |
| 21 | + <th mat-header-cell *matHeaderCellDef> |
| 22 | + Username |
| 23 | + <div class="input-group"> |
| 24 | + <input #searchUser (keyup)="onSearchChange('username', searchUser.value)" type="text" class="form-control bg-light border-0 small" placeholder="Recherche username"> |
| 25 | + </div> |
| 26 | + </th> |
| 27 | + <td mat-cell *matCellDef="let user">{{ user.username }}</td> |
| 28 | + <th mat-footer-cell *matFooterCellDef>Username</th> |
| 29 | + </ng-container> |
| 30 | + |
| 31 | + <ng-container matColumnDef="email"> |
| 32 | + <th mat-header-cell *matHeaderCellDef> |
| 33 | + Email |
| 34 | + <div class="input-group"> |
| 35 | + <input #searchEmail (keyup)="onSearchChange('email', searchEmail.value)" type="text" class="form-control bg-light border-0 small" placeholder="Recherche email"> |
| 36 | + </div> |
| 37 | + </th> |
| 38 | + <td mat-cell *matCellDef="let user">{{ user.email }}</td> |
| 39 | + <th mat-footer-cell *matFooterCellDef>Email</th> |
| 40 | + </ng-container> |
19 | 41 |
|
20 |
| - <ng-container matColumnDef="username"> |
21 |
| - <th mat-header-cell *matHeaderCellDef> |
22 |
| - Username |
23 |
| - <div class="input-group"> |
24 |
| - <input #searchUser (keyup)="onSearchChange('username', searchUser.value)" type="text" class="form-control bg-light border-0 small" placeholder="Recherche username"> |
25 |
| - </div> |
26 |
| - </th> |
27 |
| - <td mat-cell *matCellDef="let user">{{ user.username }}</td> |
28 |
| - <th mat-footer-cell *matFooterCellDef>Username</th> |
29 |
| - </ng-container> |
| 42 | + <ng-container matColumnDef="role"> |
| 43 | + <th mat-header-cell *matHeaderCellDef> |
| 44 | + Role |
| 45 | + <div class="custom-control custom-checkbox small"> |
| 46 | + <input #checkStaff (click)="switchRoleList(checkStaff.checked)" type="checkbox" class="custom-control-input" id="checkStaff"> |
| 47 | + <label class="custom-control-label" for="checkStaff">Uniquement le staff</label> |
| 48 | + </div> |
| 49 | + </th> |
| 50 | + <td mat-cell *matCellDef="let user">{{ user.role }}</td> |
| 51 | + <th mat-footer-cell *matFooterCellDef>Role</th> |
| 52 | + </ng-container> |
30 | 53 |
|
31 |
| - <ng-container matColumnDef="email"> |
32 |
| - <th mat-header-cell *matHeaderCellDef> |
33 |
| - Email |
34 |
| - <div class="input-group"> |
35 |
| - <input #searchEmail (keyup)="onSearchChange('email', searchEmail.value)" type="text" class="form-control bg-light border-0 small" placeholder="Recherche email"> |
36 |
| - </div> |
37 |
| - </th> |
38 |
| - <td mat-cell *matCellDef="let user">{{ user.email }}</td> |
39 |
| - <th mat-footer-cell *matFooterCellDef>Email</th> |
40 |
| - </ng-container> |
| 54 | + <ng-container matColumnDef="valid"> |
| 55 | + <th mat-header-cell *matHeaderCellDef> |
| 56 | + Validé<br/> |
| 57 | + <select class="form-control" [(ngModel)]="valid" (ngModelChange)="switchValidList()"> |
| 58 | + <option [ngValue]="''">Tous</option> |
| 59 | + <option [ngValue]="'true'">Oui</option> |
| 60 | + <option [ngValue]="'false'">Non</option> |
| 61 | + </select> |
| 62 | + </th> |
| 63 | + <td mat-cell *matCellDef="let user">{{ user.valid ? 'Oui' : 'Non' }}</td> |
| 64 | + <th mat-footer-cell *matFooterCellDef>Validé</th> |
| 65 | + </ng-container> |
41 | 66 |
|
42 |
| - <ng-container matColumnDef="role"> |
43 |
| - <th mat-header-cell *matHeaderCellDef> |
44 |
| - Role |
45 |
| - <div class="custom-control custom-checkbox small"> |
46 |
| - <input #checkStaff (click)="switchRoleList(checkStaff.checked)" type="checkbox" class="custom-control-input" id="checkStaff"> |
47 |
| - <label class="custom-control-label" for="checkStaff">Uniquement le staff</label> |
48 |
| - </div> |
49 |
| - </th> |
50 |
| - <td mat-cell *matCellDef="let user">{{ user.role }}</td> |
51 |
| - <th mat-footer-cell *matFooterCellDef>Role</th> |
52 |
| - </ng-container> |
| 67 | + <ng-container matColumnDef="country"> |
| 68 | + <th mat-header-cell *matHeaderCellDef> |
| 69 | + Pays |
| 70 | + </th> |
| 71 | + <td mat-cell *matCellDef="let user">{{ user.country.name }}</td> |
| 72 | + <th mat-footer-cell *matFooterCellDef>Pays</th> |
| 73 | + </ng-container> |
53 | 74 |
|
54 |
| - <ng-container matColumnDef="createdAt"> |
55 |
| - <th mat-header-cell *matHeaderCellDef> Date de création </th> |
56 |
| - <td mat-cell *matCellDef="let user">{{ user.createdAt ? (user.createdAt | date : 'dd/MM/YY - HH:mm') : '-' }}</td> |
57 |
| - <th mat-footer-cell *matFooterCellDef> Date de création </th> |
58 |
| - </ng-container> |
| 75 | + <ng-container matColumnDef="createdAt"> |
| 76 | + <th mat-header-cell *matHeaderCellDef> Date de création </th> |
| 77 | + <td mat-cell *matCellDef="let user">{{ user.createdAt ? (user.createdAt | date : 'dd/MM/YY - HH:mm') : '-' }}</td> |
| 78 | + <th mat-footer-cell *matFooterCellDef> Date de création </th> |
| 79 | + </ng-container> |
59 | 80 |
|
60 |
| - <ng-container matColumnDef="updatedAt"> |
61 |
| - <th mat-header-cell *matHeaderCellDef> Date de mise à jour </th> |
62 |
| - <td mat-cell *matCellDef="let user">{{ user.updatedAt ? (user.updatedAt | date : 'dd/MM/YY - HH:mm') : '-' }}</td> |
63 |
| - <th mat-footer-cell *matFooterCellDef> Date de mise à jour </th> |
64 |
| - </ng-container> |
| 81 | + <ng-container matColumnDef="updatedAt"> |
| 82 | + <th mat-header-cell *matHeaderCellDef> Date de mise à jour </th> |
| 83 | + <td mat-cell *matCellDef="let user">{{ user.updatedAt ? (user.updatedAt | date : 'dd/MM/YY - HH:mm') : '-' }}</td> |
| 84 | + <th mat-footer-cell *matFooterCellDef> Date de mise à jour </th> |
| 85 | + </ng-container> |
65 | 86 |
|
66 |
| - <ng-container matColumnDef="actions"> |
67 |
| - <th mat-header-cell *matHeaderCellDef> Actions </th> |
68 |
| - <td mat-cell *matCellDef="let user"> |
69 |
| - <div class="container-fluid"> |
70 |
| - <a href="{{ getEditUrl(user) }}" class="btn btn-info btn-circle btn-sm"> |
71 |
| - <i class="fas fa-pen"></i> |
72 |
| - </a> |
| 87 | + <ng-container matColumnDef="actions"> |
| 88 | + <th mat-header-cell *matHeaderCellDef> Actions </th> |
| 89 | + <td mat-cell *matCellDef="let user"> |
| 90 | + <div class="container-fluid"> |
| 91 | + <a href="{{ getEditUrl(user) }}" class="btn btn-info btn-circle btn-sm"> |
| 92 | + <i class="fas fa-pen"></i> |
| 93 | + </a> |
73 | 94 |
|
74 |
| - <button (click)="openRemoveDialog(user)" class="btn btn-danger btn-circle btn-sm"> |
75 |
| - <i class="fas fa-trash"></i> |
76 |
| - </button> |
77 |
| - </div> |
78 |
| - </td> |
79 |
| - <th mat-footer-cell *matFooterCellDef> Actions </th> |
80 |
| - </ng-container> |
| 95 | + <button (click)="openRemoveDialog(user)" class="btn btn-danger btn-circle btn-sm"> |
| 96 | + <i class="fas fa-trash"></i> |
| 97 | + </button> |
| 98 | + </div> |
| 99 | + </td> |
| 100 | + <th mat-footer-cell *matFooterCellDef> Actions </th> |
| 101 | + </ng-container> |
81 | 102 |
|
82 |
| - <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr> |
83 |
| - <tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr> |
84 |
| - <tr mat-footer-row *matFooterRowDef="columnsToDisplay"></tr> |
85 |
| - </table> |
| 103 | + <tr mat-header-row *matHeaderRowDef="columnsToDisplay"></tr> |
| 104 | + <tr mat-row *matRowDef="let row; columns: columnsToDisplay"></tr> |
| 105 | + <tr mat-footer-row *matFooterRowDef="columnsToDisplay"></tr> |
| 106 | + </table> |
86 | 107 |
|
87 |
| - <mat-paginator [length]="entities.totalElementsDatabase" |
88 |
| - (page)="onPaginateChange($event.pageIndex)" |
89 |
| - [pageIndex]="page" |
90 |
| - [pageSize]="elemsPerPage" |
91 |
| - [hidePageSize]="true" |
92 |
| - aria-label="Pages" |
93 |
| - showFirstLastButtons> |
94 |
| - </mat-paginator> |
| 108 | + <mat-paginator [length]="entities.totalElementsDatabase" |
| 109 | + (page)="onPaginateChange($event.pageIndex)" |
| 110 | + [pageIndex]="page" |
| 111 | + [pageSize]="elemsPerPage" |
| 112 | + [hidePageSize]="true" |
| 113 | + aria-label="Pages" |
| 114 | + showFirstLastButtons> |
| 115 | + </mat-paginator> |
| 116 | + </div> |
95 | 117 | </div>
|
96 |
| - </div> |
97 | 118 | </div>
|
0 commit comments