connexion avec back de 'admin/adList'

This commit is contained in:
MiharyR 2021-12-12 13:34:45 +01:00
parent b617af0051
commit fd722f613d
15 changed files with 112 additions and 50 deletions

View file

@ -107,7 +107,7 @@
<!-- Mail Column -->
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Mail </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> Email </th>
<td mat-cell *matCellDef="let user">
{{user.email}}
</td>
@ -171,7 +171,7 @@
<ng-container matColumnDef="isAccepted">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Accepté </th>
<td mat-cell *matCellDef="let user">
<mat-slide-toggle [(ngModel)]="user.isAccepted" (click)="onSlideIsAccepted(user)"></mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="user.role.isAccepted" (click)="onSlideIsAccepted(user)"></mat-slide-toggle>
</td>
</ng-container>

View file

@ -126,12 +126,12 @@
<!-- email -->
<mat-form-field appearance="fill">
<mat-label>Email</mat-label>
<input matInput type="text" [(ngModel)]="user.email">
<input matInput type="text" [(ngModel)]="user.email" required>
</mat-form-field><br>
<!-- login -->
<mat-form-field appearance="fill">
<mat-label>Pseudo</mat-label>
<input matInput type="text" [(ngModel)]="user.login">
<input matInput type="text" [(ngModel)]="user.login" required>
</mat-form-field><br>
<!-- company -->
<mat-form-field appearance="fill" *ngIf="user.role.name === 'advertiser'">
@ -145,12 +145,12 @@
<!-- mot de passe -->
<mat-form-field appearance="fill">
<mat-label>Mot de passe</mat-label>
<input matInput type="password" [(ngModel)]="password">
<input matInput type="password" [(ngModel)]="password" required>
</mat-form-field><br>
<!-- confirmation mot de passe -->
<mat-form-field appearance="fill">
<mat-label>Confirmation nouveau mot de passe</mat-label>
<input matInput type="password" [(ngModel)]="confirmPassword">
<input matInput type="password" [(ngModel)]="confirmPassword" required>
</mat-form-field>
</div>

View file

@ -33,6 +33,7 @@ export class PopupCreateUserComponent implements OnInit
role: {
name: "",
permission: 0,
isAccepted: false,
},
profileImageUrl: "",
dateOfBirth: null,
@ -40,7 +41,6 @@ export class PopupCreateUserComponent implements OnInit
interests: [],
company: "",
isActive: false,
isAccepted: false,
createdAt: new Date(),
updatedAt: new Date(),
lastConnexion: new Date()