coms
This commit is contained in:
parent
bcc27e9250
commit
3326b48eab
@ -6,6 +6,7 @@
|
||||
<div class="text-center"><div class="rounded-circle"id="couleur"[style.background-color]="membre.couleur"></div></div>
|
||||
<div class="text-center mt-3">
|
||||
<h3 class="mt-2 mb-0">{{membre.prenom }} {{membre.nom }}</h3>
|
||||
<!-- [hidden] pour cacher le bouton si le membre a un profil enfant-->
|
||||
<div class="buttons text-center"><button button type="button" class="btn btn-outline-primary px-4"
|
||||
routerLink="../modifier-membre/{{membre.id}}"
|
||||
routerLinkActive="active-custom"
|
||||
|
@ -16,15 +16,13 @@ export class CardMemberComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
/** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/
|
||||
/** Il s'agit de cacher les boutons qui permettent de modifier et supprimer les profils (html)**/
|
||||
/** Il s'agit de cacher les boutons qui permettent de modifier et supprimer les profils ([hidden] dans html)**/
|
||||
const userRole = this.tokenService.getRole();
|
||||
if(userRole == "ROLE_PARENT"){
|
||||
this.parent = true;
|
||||
console.log('Rôle : ' + userRole);
|
||||
}
|
||||
else if(userRole== "ROLE_ENFANT"){
|
||||
this.parent = false;
|
||||
console.log('Rôle : ' + userRole);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,8 @@
|
||||
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
|
||||
<div class="connexion">
|
||||
<div class="form-floating">
|
||||
<input type="email" class="form-control" id="floatingInput" placeholder="" name="email" ngModel required
|
||||
<input type="email" class="form-control" id="floatingInput" placeholder=""
|
||||
name="email" ngModel required
|
||||
[ngClass]="{'is-valid': signinForm.form.touched && signinForm.form.value['email'] != '' ,
|
||||
'is-invalid': signinForm.form.touched && signinForm.form.value['email'] == ''}">
|
||||
<label for="floatingInput">Adresse email</label>
|
||||
@ -14,26 +15,14 @@
|
||||
'is-invalid': signinForm.form.touched && signinForm.form.value['password'] == ''}">
|
||||
<label for="floatingPassword">Mot de passe</label>
|
||||
</div>
|
||||
|
||||
<button class="w-100 btn btn-lg btn-outline-success" type="submit" [disabled]="signinForm.invalid">Se
|
||||
connecter</button>
|
||||
connecter
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="w-100 btn btn-lg btn-outline-success" routerLink="../creation-compte"
|
||||
routerLinkActive="active-custom">S'inscrire</button>
|
||||
|
||||
</form>
|
||||
<a routerLink="/password-oublie" routerLinkActive="active-custom" class="nav-link">password perdu ?</a>
|
||||
<!-- <div *ngIf="errorForm">
|
||||
<p class="text-danger">Il manque des informations dans le formulaire...</p>
|
||||
</div> -->
|
||||
|
||||
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||
|
||||
<!-- <div *ngIf="isShow">
|
||||
<div class="alert alert-{{alert.type}}" role="alert">
|
||||
{{alert.content}}
|
||||
</div>
|
||||
</div> -->
|
||||
</main>
|
||||
</div>
|
||||
|
@ -157,6 +157,7 @@
|
||||
Ajouter le membre
|
||||
</button>
|
||||
</form>
|
||||
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,6 +28,7 @@ export class PageAddMemberComponent implements OnInit {
|
||||
private fb: FormBuilder
|
||||
) {
|
||||
this.addMemberForm = new FormGroup({});
|
||||
this.isShow = false;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -130,4 +131,10 @@ export class PageAddMemberComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//fermeture du message d'alerte
|
||||
onClickCloseAlert(){
|
||||
console.log('fermeture');
|
||||
this.isShow = ! this.isShow;
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@
|
||||
[disabled]="signupForm.invalid">
|
||||
CREER MON COMPTE
|
||||
</button>
|
||||
|
||||
</form>
|
||||
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||
</main>
|
||||
</div>
|
||||
|
@ -18,6 +18,8 @@ import { AuthService } from '../../services/auth.service';
|
||||
})
|
||||
export class PageSignupComponent implements OnInit {
|
||||
public signupForm: FormGroup;
|
||||
alert: any;
|
||||
isShow!: boolean;
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
@ -26,10 +28,11 @@ export class PageSignupComponent implements OnInit {
|
||||
private fb: FormBuilder
|
||||
) {
|
||||
this.signupForm = new FormGroup({});
|
||||
this.isShow = false;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
// *********************************pensser a changer group car déprécié********************************
|
||||
// ********************************* Pour V2 : changer group car déprécié********************************
|
||||
this.signupForm = this.fb.group(
|
||||
{
|
||||
teamNameFc: new FormControl('', [Validators.required]),
|
||||
@ -101,7 +104,8 @@ export class PageSignupComponent implements OnInit {
|
||||
|
||||
});
|
||||
} else {
|
||||
// affichage erreur
|
||||
this.alert={"type":"danger", "content":"Votre profil n'a pas été créé"};
|
||||
this.isShow = true;
|
||||
}
|
||||
}
|
||||
/** Méthode pour compare le mot de passe et la confirmation de mot de passe **/
|
||||
@ -122,4 +126,10 @@ export class PageSignupComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//fermeture du message d'alerte
|
||||
onClickCloseAlert(){
|
||||
console.log('fermeture');
|
||||
this.isShow = ! this.isShow;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user