['dateOfBirth' non obligatoire] + [popup forgotten password]
This commit is contained in:
parent
a70574a8e2
commit
7a0d1136a9
30 changed files with 262 additions and 454 deletions
|
|
@ -84,6 +84,8 @@ export class PageAdListAdvertiserComponent implements AfterViewInit
|
|||
{
|
||||
const config = {
|
||||
width: '75%',
|
||||
height: '80%',
|
||||
panelClass: 'custom-dialog-container',
|
||||
data: { action: "add", advert: null }
|
||||
};
|
||||
this.dialog
|
||||
|
|
@ -111,6 +113,8 @@ export class PageAdListAdvertiserComponent implements AfterViewInit
|
|||
{
|
||||
const config = {
|
||||
width: '75%',
|
||||
height: '80%',
|
||||
panelClass: 'custom-dialog-container',
|
||||
data: { action: "update", advert: advertToUpdate }
|
||||
};
|
||||
this.dialog
|
||||
|
|
|
|||
|
|
@ -1,76 +1,79 @@
|
|||
<div [class]="themeService.getClassTheme()">
|
||||
<div class="myContainer1">
|
||||
<div class="myContainer2">
|
||||
|
||||
<!-- titre popup -->
|
||||
<h1 mat-dialog-title>{{title}}</h1>
|
||||
<!-- titre popup -->
|
||||
<h1 mat-dialog-title>{{title}}</h1>
|
||||
|
||||
|
||||
<mat-divider></mat-divider><br>
|
||||
<mat-divider></mat-divider><br>
|
||||
|
||||
|
||||
<!-- tous les champs -->
|
||||
<div class="row">
|
||||
<!-- tous les champs -->
|
||||
<div class="row">
|
||||
|
||||
<!-- title + interests + comments + isVisible -->
|
||||
<div class="col-6">
|
||||
<!-- title + interests + comments + isVisible -->
|
||||
<div class="col-6">
|
||||
|
||||
<!-- Title -->
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label> Titre annonce </mat-label>
|
||||
<input matInput type="text" [(ngModel)]="advert.title">
|
||||
</mat-form-field>
|
||||
<!-- Title -->
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label> Titre annonce </mat-label>
|
||||
<input matInput type="text" [(ngModel)]="advert.title">
|
||||
</mat-form-field>
|
||||
|
||||
<!-- Interests -->
|
||||
<app-input-interests-ad [myTags]="advert.interests" (eventEmitter)="onEventInputTags($event)"></app-input-interests-ad>
|
||||
<!-- Interests -->
|
||||
<app-input-interests-ad [myTags]="advert.interests" (eventEmitter)="onEventInputTags($event)"></app-input-interests-ad>
|
||||
|
||||
<!-- Comments -->
|
||||
<mat-form-field class="commentContainer" appearance="fill">
|
||||
<mat-label> Commentaire </mat-label>
|
||||
<textarea matInput [(ngModel)]="advert.comment"></textarea>
|
||||
</mat-form-field><br>
|
||||
<!-- Comments -->
|
||||
<mat-form-field class="commentContainer" appearance="fill">
|
||||
<mat-label> Commentaire </mat-label>
|
||||
<textarea matInput [(ngModel)]="advert.comment"></textarea>
|
||||
</mat-form-field><br>
|
||||
|
||||
<!-- url -->
|
||||
<mat-form-field class="commentContainer" appearance="fill">
|
||||
<mat-label> URL </mat-label>
|
||||
<textarea matInput [(ngModel)]="advert.url"></textarea>
|
||||
</mat-form-field><br>
|
||||
<!-- url -->
|
||||
<mat-form-field class="commentContainer" appearance="fill">
|
||||
<mat-label> URL </mat-label>
|
||||
<textarea matInput [(ngModel)]="advert.url"></textarea>
|
||||
</mat-form-field><br>
|
||||
|
||||
<!-- IsVisible -->
|
||||
<mat-checkbox [(ngModel)]="advert.isVisible"> Visible </mat-checkbox><br><br>
|
||||
<!-- IsVisible -->
|
||||
<mat-checkbox [(ngModel)]="advert.isVisible"> Visible </mat-checkbox><br><br>
|
||||
|
||||
<!-- Images déjà présentes -->
|
||||
<div *ngIf="advert.images.length !== 0">
|
||||
<div style="font-weight: bold; margin-bottom: 5px;">
|
||||
Images déjà associées:
|
||||
</div>
|
||||
<div style="margin-left: 20px; padding-left: 2px; border-left: solid 1px #a4a4a4">
|
||||
<div *ngFor="let image of advert.images" style="padding: 2px 0px 2px 0px;">
|
||||
<mat-chip [selectable]="true" [removable]="true" style="font-size: small;">
|
||||
{{image.description}}
|
||||
<button matChipRemove (click)="onRemoveImgAlreadyPresent(image)">
|
||||
<mat-icon>cancel</mat-icon>
|
||||
</button>
|
||||
</mat-chip>
|
||||
<!-- Images déjà présentes -->
|
||||
<div *ngIf="advert.images.length !== 0">
|
||||
<div style="font-weight: bold; margin-bottom: 5px;">
|
||||
Images déjà associées:
|
||||
</div>
|
||||
<div style="margin-left: 20px; padding-left: 2px; border-left: solid 1px #a4a4a4">
|
||||
<div *ngFor="let image of advert.images" style="padding: 2px 0px 2px 0px;">
|
||||
<mat-chip [selectable]="true" [removable]="true" style="font-size: small;">
|
||||
{{image.description}}
|
||||
<button matChipRemove (click)="onRemoveImgAlreadyPresent(image)">
|
||||
<mat-icon>cancel</mat-icon>
|
||||
</button>
|
||||
</mat-chip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- nouvelles images -->
|
||||
<div class="col-6" style="overflow-x: hidden; overflow-y: scroll; max-height: 70vh;">
|
||||
<app-drag-and-drop></app-drag-and-drop>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- nouvelles images -->
|
||||
<div class="col-6" style="overflow-x: hidden; overflow-y: scroll; max-height: 70vh;">
|
||||
<app-drag-and-drop></app-drag-and-drop>
|
||||
</div>
|
||||
|
||||
<br><mat-divider></mat-divider>
|
||||
|
||||
|
||||
<!-- Actions -->
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button (click)="dialogRef.close()">Annuler</button>
|
||||
<button mat-button (click)="onValidate()">Valider</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<br><mat-divider></mat-divider>
|
||||
|
||||
|
||||
<!-- Actions -->
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button (click)="dialogRef.close()">Annuler</button>
|
||||
<button mat-button (click)="onValidate()" cdkFocusInitial>Valider</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
.lightTheme, .darkTheme {
|
||||
background-image: none;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
.myContainer1 {
|
||||
padding: 10px 10px 0px 25px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
|
||||
.myContainer2 {
|
||||
padding: 0px 0px 0px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
overflow-y: hidden;
|
||||
overflow-x: hidden;
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.myContainer2::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: large;
|
||||
|
|
@ -26,6 +40,10 @@ h1 {
|
|||
border: solid 1px grey;
|
||||
}
|
||||
|
||||
mat-dialog-actions {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
button {
|
||||
font-size: small;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export class PopupUpdateAdvertiserComponent implements OnInit
|
|||
_id: advertiser0._id,
|
||||
login: advertiser0.login,
|
||||
hashPass: advertiser0.hashPass,
|
||||
email: advertiser0.mail,
|
||||
email: advertiser0.email,
|
||||
role: {
|
||||
name: advertiser0.role.name,
|
||||
permission: advertiser0.role.permission,
|
||||
|
|
@ -79,14 +79,13 @@ export class PopupUpdateAdvertiserComponent implements OnInit
|
|||
this.errorMessage = "Email invalide" ;
|
||||
this.hasError = true;
|
||||
}
|
||||
else if(this.changePassword) {
|
||||
if (this.newPassword.length === 0) {
|
||||
this.errorMessage = "Veuillez remplir le champ 'mot de passe'" ;
|
||||
this.hasError = true;
|
||||
} else if (this.newPassword !== this.confirmNewPassword) {
|
||||
this.errorMessage = "Le mot de passe est différent de sa confirmation" ;
|
||||
this.hasError = true;
|
||||
}
|
||||
else if((this.changePassword) && (this.newPassword.length === 0)) {
|
||||
this.errorMessage = "Veuillez remplir le champ 'mot de passe'" ;
|
||||
this.hasError = true;
|
||||
}
|
||||
else if((this.changePassword) && (this.newPassword !== this.confirmNewPassword)) {
|
||||
this.errorMessage = "Le mot de passe est différent de sa confirmation" ;
|
||||
this.hasError = true;
|
||||
}
|
||||
else {
|
||||
this.errorMessage = "" ;
|
||||
|
|
|
|||
Reference in a new issue