Merge pull request #107 from AlineRinquin/dev
Dev verssion au 14/03/22 version 1.3
This commit is contained in:
commit
5d4dd47a96
34 changed files with 219 additions and 99 deletions
|
@ -1,7 +1,8 @@
|
||||||
<div class="card m-1 p-1 avatar bg-light">
|
<div class="card m-1 p-1 avatar bg-light">
|
||||||
|
|
||||||
<div class="card-img-top">
|
<div class="card-img-top">
|
||||||
<div class="rounded-circle"id="couleur"[style.background-color]="membre.couleur">
|
<div class="rounded-circle" id="couleur" [style.background-color]="membre.couleur">
|
||||||
|
<img *ngIf="membre.smiley" class="rounded-circle humeur" src="{{membre.smiley}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -14,3 +14,9 @@
|
||||||
height: 170px;
|
height: 170px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.humeur{
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
|
@ -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"><div class="rounded-circle"id="couleur"[style.background-color]="membre.couleur"></div></div>
|
||||||
<div class="text-center mt-3">
|
<div class="text-center mt-3">
|
||||||
<h3 class="mt-2 mb-0">{{membre.prenom }} {{membre.nom }}</h3>
|
<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"
|
<div class="buttons text-center"><button button type="button" class="btn btn-outline-primary px-4"
|
||||||
routerLink="../modifier-membre/{{membre.id}}"
|
routerLink="../modifier-membre/{{membre.id}}"
|
||||||
routerLinkActive="active-custom"
|
routerLinkActive="active-custom"
|
||||||
|
|
|
@ -16,15 +16,13 @@ export class CardMemberComponent implements OnInit {
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
/** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/
|
/** 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();
|
const userRole = this.tokenService.getRole();
|
||||||
if(userRole == "ROLE_PARENT"){
|
if(userRole == "ROLE_PARENT"){
|
||||||
this.parent = true;
|
this.parent = true;
|
||||||
console.log('Rôle : ' + userRole);
|
|
||||||
}
|
}
|
||||||
else if(userRole== "ROLE_ENFANT"){
|
else if(userRole== "ROLE_ENFANT"){
|
||||||
this.parent = false;
|
this.parent = false;
|
||||||
console.log('Rôle : ' + userRole);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ export class FicheContactComponent implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const roleUser = this.tokenService.getRole();
|
const roleUser = this.tokenService.getRole();
|
||||||
|
|
||||||
|
//gestion du role parent ou non pour mettre en "disable" les boutons pour les roles enfants
|
||||||
if(roleUser == "ROLE_PARENT"){
|
if(roleUser == "ROLE_PARENT"){
|
||||||
this.parent = true;
|
this.parent = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<div class="footer text-center" >
|
<div class="footer text-center" >
|
||||||
<h3>Plan du site</h3>
|
<h3>Plan du site</h3>
|
||||||
<div class="liens">
|
<div class="liens">
|
||||||
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Tableau de bord</a>
|
|
||||||
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
||||||
|
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Dashboard</a>
|
||||||
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
||||||
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
||||||
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
|
||||||
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
||||||
|
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
||||||
<a routerLink="../page-support" routerLinkActive="active-custom" class="nav-link">Nous contacter</a>
|
<a routerLink="../page-support" routerLinkActive="active-custom" class="nav-link">Nous contacter</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- juste une suite de liens pour faire un plan du site et un accès direct -->
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
<h2>Mon humeur :</h2>
|
<h2>Mon humeur :</h2>
|
||||||
|
|
||||||
|
<!-- envoie une alerte sur le header au clic du changement d'humeur-->
|
||||||
<app-alert
|
<app-alert
|
||||||
*ngIf="isShow"
|
*ngIf="isShow"
|
||||||
[alert]="alert"
|
[alert]="alert"
|
||||||
|
@ -10,12 +11,13 @@
|
||||||
></app-alert>
|
></app-alert>
|
||||||
|
|
||||||
|
|
||||||
|
<!--affichage de l'humeur sur laquelle on a cliqué-->
|
||||||
<p><img src="{{monHumeurLien}}" alt="{{monHumeurTitle}}" *ngIf="monHumeurLien" ></p>
|
<p><img src="{{monHumeurLien}}" alt="{{monHumeurTitle}}" *ngIf="monHumeurLien" ></p>
|
||||||
|
|
||||||
<p>Je modifie mon avatar :</p>
|
<p>Je modifie mon avatar :</p>
|
||||||
|
|
||||||
|
<!--Directive structurelle *ngFor pour afficher tous les éléments du tableau-->
|
||||||
|
<!-- puis récupération au click de l'indice de l'humeur choisie-->
|
||||||
<div class="humeur" *ngFor="let humor of tabHumeur; let i=index">
|
<div class="humeur" *ngFor="let humor of tabHumeur; let i=index">
|
||||||
<img src="{{humor.lien}}" alt="{{humor.title}}" (click)="onChoixHumeur(i)">
|
<img src="{{humor.lien}}" alt="{{humor.title}}" (click)="onChoixHumeur(i)">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@ monHumeurTitle! : string[] ;
|
||||||
isShow: boolean;
|
isShow: boolean;
|
||||||
alert: any;
|
alert: any;
|
||||||
|
|
||||||
|
// tableau des humeurs, lien vers les images et titre pour meilleure accesibilité
|
||||||
tabHumeur= [
|
tabHumeur= [
|
||||||
{ title : "Je vais bien", lien : "assets/images/emoticon-heureux.png"},
|
{ title : "Je vais bien", lien : "assets/images/emoticon-heureux.png"},
|
||||||
{ title : "Je pleure", lien : "assets/images/emoticon-pleurer.png"},
|
{ title : "Je pleure", lien : "assets/images/emoticon-pleurer.png"},
|
||||||
|
@ -21,27 +21,32 @@ alert: any;
|
||||||
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
||||||
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
||||||
|
|
||||||
|
|
||||||
constructor(private membreService: MembreService, private tokenService: TokenService) {
|
constructor(private membreService: MembreService, private tokenService: TokenService) {
|
||||||
this.isShow= false;
|
this.isShow= false;
|
||||||
this.alert="";
|
this.alert="";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// récupère l'id du membre connecté (stocké dans token.service),
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const userId = this.tokenService.getCurrentMembreId();
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
this.membreService.getMembreId(userId).subscribe({
|
this.membreService.getMembreId(userId).subscribe({
|
||||||
next: result => {
|
next: result => {
|
||||||
//this.monHumeurTitle= [this.tabHumeur[result.smiley].title];
|
|
||||||
this.monHumeurLien= result.smiley;
|
this.monHumeurLien= result.smiley;
|
||||||
// console.log("resultat smiley ", result.smiley);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// méthode pour récupérer l'indice de l'humeur sur laquelle on a cliqué
|
||||||
onChoixHumeur(numero: any){
|
onChoixHumeur(numero: any){
|
||||||
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
||||||
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Permet de faire la mise à jour des caractéristiques du membre
|
||||||
|
// Subscribe exécute l'observable, dont le rôle est de suivre le changement d'humeur
|
||||||
|
// et en deuxième ligne de chaque paramètre, affecte l'alerte du header
|
||||||
this.membreService.updateHumeur(this.tabHumeur[numero].lien)?.subscribe(
|
this.membreService.updateHumeur(this.tabHumeur[numero].lien)?.subscribe(
|
||||||
{
|
{
|
||||||
next: result => {
|
next: result => {
|
||||||
|
@ -56,11 +61,13 @@ onChoixHumeur(numero: any){
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
console.log("humeur titre est : ", this.monHumeurTitle);
|
console.log("humeur titre est : ", this.monHumeurTitle);
|
||||||
console.log("humeur lien est : ", this.monHumeurLien);
|
console.log("humeur lien est : ", this.monHumeurLien);
|
||||||
console.log("index humeur est : ", numero);
|
console.log("index humeur est : ", numero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// méthode pur afficher
|
||||||
onClickCloseAlert(){
|
onClickCloseAlert(){
|
||||||
this.isShow=!this.isShow;
|
this.isShow=!this.isShow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
|
<form (ngSubmit)="onSubmit(signinForm)" #signinForm="ngForm">
|
||||||
<div class="connexion">
|
<div class="connexion">
|
||||||
<div class="form-floating">
|
<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'] != '' ,
|
[ngClass]="{'is-valid': signinForm.form.touched && signinForm.form.value['email'] != '' ,
|
||||||
'is-invalid': signinForm.form.touched && signinForm.form.value['email'] == ''}">
|
'is-invalid': signinForm.form.touched && signinForm.form.value['email'] == ''}">
|
||||||
<label for="floatingInput">Adresse email</label>
|
<label for="floatingInput">Adresse email</label>
|
||||||
|
@ -14,26 +15,14 @@
|
||||||
'is-invalid': signinForm.form.touched && signinForm.form.value['password'] == ''}">
|
'is-invalid': signinForm.form.touched && signinForm.form.value['password'] == ''}">
|
||||||
<label for="floatingPassword">Mot de passe</label>
|
<label for="floatingPassword">Mot de passe</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="w-100 btn btn-lg btn-outline-success" type="submit" [disabled]="signinForm.invalid">Se
|
<button class="w-100 btn btn-lg btn-outline-success" type="submit" [disabled]="signinForm.invalid">Se
|
||||||
connecter</button>
|
connecter
|
||||||
</div>
|
</button>
|
||||||
|
</div>
|
||||||
<button class="w-100 btn btn-lg btn-outline-success" routerLink="../creation-compte"
|
<button class="w-100 btn btn-lg btn-outline-success" routerLink="../creation-compte"
|
||||||
routerLinkActive="active-custom">S'inscrire</button>
|
routerLinkActive="active-custom">S'inscrire</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<a routerLink="/password-oublie" routerLinkActive="active-custom" class="nav-link">password perdu ?</a>
|
<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>
|
<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>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -110,8 +110,6 @@ export class ToDoListComponent implements OnInit {
|
||||||
tache.editing = false;
|
tache.editing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//supprimer la tache
|
//supprimer la tache
|
||||||
deleteTache(id: number) {
|
deleteTache(id: number) {
|
||||||
this.TodoService.deleteTacheById(id).subscribe((resp) => {
|
this.TodoService.deleteTacheById(id).subscribe((resp) => {
|
||||||
|
|
|
@ -157,6 +157,7 @@
|
||||||
Ajouter le membre
|
Ajouter le membre
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,6 +28,7 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
private fb: FormBuilder
|
private fb: FormBuilder
|
||||||
) {
|
) {
|
||||||
this.addMemberForm = new FormGroup({});
|
this.addMemberForm = new FormGroup({});
|
||||||
|
this.isShow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -130,4 +131,10 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fermeture du message d'alerte
|
||||||
|
onClickCloseAlert(){
|
||||||
|
console.log('fermeture');
|
||||||
|
this.isShow = ! this.isShow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,21 +41,21 @@
|
||||||
class="btn btn-sm btn-primary"
|
class="btn btn-sm btn-primary"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
(click)="navigatePrevious($event)"
|
(click)="navigatePrevious($event)"
|
||||||
>Previous</a
|
>Semaine précedente</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="btn btn-sm btn-primary"
|
class="btn btn-sm btn-primary"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
(click)="navigateToday($event)"
|
(click)="navigateToday($event)"
|
||||||
>Today</a
|
>Aujourd'hui</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
class="btn btn-sm btn-primary"
|
class="btn btn-sm btn-primary"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
(click)="navigateNext($event)"
|
(click)="navigateNext($event)"
|
||||||
>Next</a
|
>Semaine suivante</a
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- DEBUT : Pour le debugage -->
|
<!-- DEBUT : Pour le debugage -->
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
.btn {
|
.btn {
|
||||||
background-color: rgb(241,120,182);
|
background-color: rgb(241,120,182);
|
||||||
color : white;
|
color : white;
|
||||||
border-radius: 12px;
|
border-radius: 6px;
|
||||||
border-color: white;
|
border-color: white;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
|
@ -234,16 +234,19 @@ export class PageAgendaComponent implements AfterViewInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bouton pour afficher la semaine precedente
|
||||||
navigatePrevious(event: MouseEvent): void {
|
navigatePrevious(event: MouseEvent): void {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(-7);
|
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(-7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bouton pour afficher la semaine suivante
|
||||||
navigateNext(event: MouseEvent): void {
|
navigateNext(event: MouseEvent): void {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(7);
|
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bouton pour afficher la semaine en cours
|
||||||
navigateToday(event: MouseEvent): void {
|
navigateToday(event: MouseEvent): void {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.config.startDate = DayPilot.Date.today();
|
this.config.startDate = DayPilot.Date.today();
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row d-flex flex-wrap my-2 p-1">
|
<div class="row d-flex flex-wrap my-2 p-1 d-flex">
|
||||||
<ul class="list-inline">
|
<ul class="list-inline">
|
||||||
<li class="list-inline-item" *ngFor="let membreData of listMembres">
|
<li class="list-inline-item" *ngFor="let membreData of listMembres">
|
||||||
<app-card-avatar class="avatar" [membre]="membreData"> </app-card-avatar>
|
<app-card-avatar class="avatar" [membre]="membreData"> </app-card-avatar>
|
||||||
|
|
|
@ -24,5 +24,5 @@ h3{
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar{
|
.avatar{
|
||||||
margin:O;
|
margin:10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
type="submit"
|
type="submit"
|
||||||
[disabled]="forgotForm.invalid">
|
[disabled]="forgotForm.invalid">
|
||||||
Ré-initialiser mon mot de passe
|
Ré-initialiser mon mot de passe
|
||||||
|
<div class="text-center" *ngIf="isLoading">
|
||||||
|
<div class="spinner-border" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<br/> <br/>
|
<br/> <br/>
|
||||||
|
@ -25,11 +30,6 @@
|
||||||
{{alert.content}}
|
{{alert.content}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
|
||||||
<div *ngIf="errorForm">
|
|
||||||
<p class="text-danger">Il manque des informations dans le formulaire...</p>
|
|
||||||
</div> -->
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,12 @@ export class PageForgotPasswordComponent implements OnInit {
|
||||||
|
|
||||||
alert : any;
|
alert : any;
|
||||||
isShow : boolean;
|
isShow : boolean;
|
||||||
|
isLoading : boolean;
|
||||||
|
|
||||||
constructor(private authService: AuthService, private router: Router, private mailService: MailService,) {
|
constructor(private authService: AuthService, private router: Router, private mailService: MailService,) {
|
||||||
this.alert = "";
|
this.alert = "";
|
||||||
this.isShow = false;
|
this.isShow = false;
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
@ -36,26 +38,36 @@ export class PageForgotPasswordComponent implements OnInit {
|
||||||
passwordConfirm: ""
|
passwordConfirm: ""
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(membre);
|
//console.log(membre);
|
||||||
|
|
||||||
|
|
||||||
this.authService.forgotPassword(membre).subscribe(
|
this.authService.forgotPassword(membre).subscribe(
|
||||||
{
|
{
|
||||||
next: result => {
|
next: result => {
|
||||||
this.alert={"type":"success", "content":"Un mail à été envoyé !"};
|
|
||||||
this.isShow = true;
|
|
||||||
const mail: Mail = {
|
const mail: Mail = {
|
||||||
recipient: submittedForm.form.value.email,
|
recipient: submittedForm.form.value.email,
|
||||||
subject: "Votre mot de passe Organizee",
|
subject: "Votre mot de passe Organizee",
|
||||||
//message: 'Votre mot de passe'
|
|
||||||
message: `
|
message: `
|
||||||
Bonjour!\n
|
Bonjour!\n
|
||||||
Vous avez fait une demande de ré-initialisation de mot de passe. \n
|
Vous avez fait une demande de ré-initialisation de mot de passe. \n
|
||||||
Cliquez sur le lien pour définir un nouveau mot de passe: \n
|
Cliquez sur le lien pour définir un nouveau mot de passe: \n
|
||||||
Lien : http://192.168.1.16:4200/reinitialisation-password/${result}`
|
Lien : http://localhost:4200/reinitialisation-password/${result}`
|
||||||
};
|
};
|
||||||
this.mailService.envoiMailText(mail)?.subscribe((respMail) =>{
|
this.isLoading = true;
|
||||||
console.log("Mail envoyé");
|
this.mailService.envoiMailText(mail).subscribe(
|
||||||
|
{
|
||||||
|
next: respMail => {
|
||||||
|
//console.log("Mail envoyé");
|
||||||
|
this.alert={"type":"success", "content":"Le mail à été envoyé !"};
|
||||||
|
this.isShow = true;
|
||||||
|
this.isLoading = false;
|
||||||
|
},
|
||||||
|
error: err => {
|
||||||
|
this.alert={"type":"danger", "content":"Echec lors de l'envoi de mail"};
|
||||||
|
this.isShow = true;
|
||||||
|
this.isLoading = false;
|
||||||
|
},
|
||||||
|
complete: () => console.log('DONE!')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
error: err => {
|
error: err => {
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|
||||||
|
|
||||||
|
<!--App-rooting.ts indique que si aucun url ne correspond, on arrive sur cette page-->
|
||||||
|
<!-- { path: '**', component: PageNotFoundComponent },-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--Lien pour nous renvoyer à la racine du localhost-->
|
||||||
<a routerLink="" routerLinkActive="!active">Je retourne à l'accueil</a>
|
<a routerLink="" routerLinkActive="!active">Je retourne à l'accueil</a>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ p{
|
||||||
|
|
||||||
.min-vh-100 {
|
.min-vh-100 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
//background-image: linear-gradient(to left top, #051937, #004d7a, #008793, #e2ebe7, #f8faf5);
|
|
||||||
//max-width: max-content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {justify-content: center;
|
img {justify-content: center;
|
||||||
|
|
|
@ -33,6 +33,7 @@ export class PageRepertoireComponent implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const roleUser = this.tokenService.getRole();
|
const roleUser = this.tokenService.getRole();
|
||||||
|
|
||||||
|
//gestion du role parent ou non pour mettre en "disable" les boutons pour les roles enfants
|
||||||
if(roleUser == "ROLE_PARENT"){
|
if(roleUser == "ROLE_PARENT"){
|
||||||
this.parent = true;
|
this.parent = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="reset-form text-center">
|
<div class="reset-form text-center">
|
||||||
<main class="form-reset">
|
<main class="form-reset">
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="resetForm">
|
<form (ngSubmit)="onSubmit()" [formGroup]="resetForm">
|
||||||
<h3>Entrez ici votre email et votre nouveau mot de passe</h3>
|
<h3>Entrez ici votre nouveau mot de passe</h3>
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
!signupForm.controls['dateNaissanceFc'].valid
|
!signupForm.controls['dateNaissanceFc'].valid
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<label for="floatingInputdateNaissance">Votr date de naissance</label>
|
<label for="floatingInputdateNaissance">Votre date de naissance</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input
|
<input
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
[disabled]="signupForm.invalid">
|
[disabled]="signupForm.invalid">
|
||||||
CREER MON COMPTE
|
CREER MON COMPTE
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,6 +18,8 @@ import { AuthService } from '../../services/auth.service';
|
||||||
})
|
})
|
||||||
export class PageSignupComponent implements OnInit {
|
export class PageSignupComponent implements OnInit {
|
||||||
public signupForm: FormGroup;
|
public signupForm: FormGroup;
|
||||||
|
alert: any;
|
||||||
|
isShow!: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
|
@ -26,10 +28,11 @@ export class PageSignupComponent implements OnInit {
|
||||||
private fb: FormBuilder
|
private fb: FormBuilder
|
||||||
) {
|
) {
|
||||||
this.signupForm = new FormGroup({});
|
this.signupForm = new FormGroup({});
|
||||||
|
this.isShow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// *********************************pensser a changer group car déprécié********************************
|
// ********************************* Pour V2 : changer group car déprécié********************************
|
||||||
this.signupForm = this.fb.group(
|
this.signupForm = this.fb.group(
|
||||||
{
|
{
|
||||||
teamNameFc: new FormControl('', [Validators.required]),
|
teamNameFc: new FormControl('', [Validators.required]),
|
||||||
|
@ -101,7 +104,8 @@ export class PageSignupComponent implements OnInit {
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} 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 **/
|
/** 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,38 @@
|
||||||
<!-- <div>
|
<div>
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar></app-side-bar>
|
||||||
</div> -->
|
</div>
|
||||||
|
<app-side-bar [backgroundColor]="'rgb(184, 202, 235)'"></app-side-bar>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Demande support</h2>
|
|
||||||
<form action="/demande_support" method="post">
|
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert()"></app-alert>
|
||||||
|
<h2>Nous contacter</h2>
|
||||||
|
<form (ngSubmit)="onSubmit()" [formGroup]="contactForm">
|
||||||
|
|
||||||
|
|
||||||
<label for="name">Nom :</label>
|
<label for="name">Nom :</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" id="name" value="Votre nom" name="user_name">
|
<input type="text" id="floatingInputlastName" [(ngModel)]="expName" placeholder="{{expName}}" name="lastName" formControlName="lastNameFc" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="mail">E-mail :</label>
|
<label for="mail">E-mail :</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="email" id="mail" name="user_mail" value="Votre adresse mail">
|
<input type="email" id="floatingInputemail" placeholder="{{expMail}}" [(ngModel)]="expMail" name="email" formControlName="emailFc" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="msg">Message :</label>
|
<label for="msg">Message :</label>
|
||||||
<div>
|
<textarea formControlName="messageFc" id="msg" name="message" placeholder="Formulez votre demande ici"
|
||||||
|
required></textarea>
|
||||||
|
|
||||||
<textarea id="msg" name="user_message">Formulez votre demande ici</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="button">
|
<div class="button">
|
||||||
|
<button type="submit" [disabled]="contactForm.invalid" class="btn btn-primary">Envoyez votre
|
||||||
<button class="btn btn-primary">Envoyez votre message</button>
|
message</button>
|
||||||
<button type="button" class="btn btn-danger">Effacer</button>
|
<button type="button" class="btn btn-danger" (click)="onDeleteMail()">Effacer</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
|
@ -1,9 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
form {
|
form {
|
||||||
background-color: rgb(184, 202, 235);
|
background-color: rgb(184, 202, 235);
|
||||||
width: 600px;
|
width: 600px;
|
||||||
border: 3px solid blue;
|
border: 1px solid blue;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 1em;
|
border-radius: 2em;
|
||||||
padding:3em;
|
padding:3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,83 @@
|
||||||
|
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { MembreService } from 'src/app/services/membre.service';
|
||||||
|
import { TokenService } from 'src/app/services/token.service';
|
||||||
|
import { MailService } from 'src/app/services/mail.service';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Mail } from 'src/app/models/mail';
|
||||||
|
|
||||||
//DRIVEN FORM
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-support',
|
selector: 'app-page-support',
|
||||||
templateUrl: './page-support.component.html',
|
templateUrl: './page-support.component.html',
|
||||||
styleUrls: ['./page-support.component.scss']
|
styleUrls: ['./page-support.component.scss']
|
||||||
})
|
})
|
||||||
export class PageSupportComponent implements OnInit {
|
export class PageSupportComponent implements OnInit {
|
||||||
|
public contactForm: FormGroup;
|
||||||
|
memberName: any;
|
||||||
|
alert: any;
|
||||||
|
isShow: boolean;
|
||||||
|
expName: any;
|
||||||
|
expMail: any;
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
constructor(private membreService: MembreService,
|
||||||
|
private tokenService: TokenService,
|
||||||
|
private fb: FormBuilder,
|
||||||
|
private mailService: MailService,
|
||||||
|
) {
|
||||||
|
this.contactForm = new FormGroup({});
|
||||||
|
this.alert = "";
|
||||||
|
this.isShow = false;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.contactForm = this.fb.group(
|
||||||
|
{
|
||||||
|
lastNameFc: new FormControl('', [Validators.required]),
|
||||||
|
emailFc: new FormControl('', [Validators.required]),
|
||||||
|
messageFc: new FormControl('', [Validators.required]),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
this.membreService.getMembreId(this.tokenService.getCurrentMembreId()).subscribe((result) => {
|
||||||
|
this.memberName = result;
|
||||||
|
this.expName = this.memberName.nom;
|
||||||
|
this.expMail = this.memberName.email;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public onSubmit(): void {
|
||||||
|
const nomValue = this.contactForm.value['lastNameFc'];
|
||||||
|
const emailValue = this.contactForm.value['emailFc'];
|
||||||
|
const messageValue = this.contactForm.value['messageFc'];
|
||||||
|
console.log(this.contactForm);
|
||||||
|
|
||||||
|
|
||||||
|
const mail: Mail = {
|
||||||
|
recipient: "organizee.contact@gmail.com",
|
||||||
|
subject: "Demande de support",
|
||||||
|
message: `
|
||||||
|
Bonjour!\n
|
||||||
|
Nouveau message d'un utilisateur du site\n
|
||||||
|
Nom : ${nomValue} \n
|
||||||
|
Email : ${emailValue} \n
|
||||||
|
Message : ${messageValue} \n `
|
||||||
|
};
|
||||||
|
this.mailService.envoiMailText(mail)?.subscribe((respMail) => {
|
||||||
|
console.log("Mail envoyé");
|
||||||
|
this.alert = { "type": "success", "content": "Votre message a été envoyé" };
|
||||||
|
this.isShow = true;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onDeleteMail() {
|
||||||
|
console.log("Formulaire effacé");
|
||||||
|
location.reload();
|
||||||
|
this.alert = { "type": "danger", "content": "Réinitialisation en cours" };
|
||||||
|
this.isShow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickCloseAlert() {
|
||||||
|
this.isShow = !this.isShow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar [backgroundColor]="'#4E9E7B'"></app-side-bar>
|
<app-side-bar [backgroundColor]="'#4E9E7B'"></app-side-bar>
|
||||||
<h2 class="titre">To-Do-List</h2>
|
<h2 class="titre">To-Do-List</h2>
|
||||||
<div class="row ">
|
<div class="row">
|
||||||
<div class="col menu text-center">
|
<div class="col menu text-center">
|
||||||
<div class="d-flex align-items-stretch"></div>
|
<div class="d-flex align-items-stretch"></div>
|
||||||
<input
|
<input
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
|
||||||
import { ToDoList } from 'src/app/models/to-do-list';
|
import { ToDoList } from 'src/app/models/to-do-list';
|
||||||
import { TodoService } from 'src/app/services/todo.service';
|
import { TodoService } from 'src/app/services/todo.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-to-do-list',
|
selector: 'app-page-to-do-list',
|
||||||
templateUrl: './page-to-do-list.component.html',
|
templateUrl: './page-to-do-list.component.html',
|
||||||
|
@ -42,7 +41,7 @@ export class PageToDoListComponent implements OnInit {
|
||||||
console.log(todoList);
|
console.log(todoList);
|
||||||
window.location.reload(); //rafraîchit l'aperçu
|
window.location.reload(); //rafraîchit l'aperçu
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
window.alert('Il faut saisir du texte'); // sinon msg d'erreur
|
window.alert('Il faut saisir du texte'); // sinon msg d'erreur
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export class MailService {
|
||||||
this.tokenKey = environment.tokenKey;
|
this.tokenKey = environment.tokenKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
envoiMailText(mail: Mail): Observable<any> | void{
|
envoiMailText(mail: Mail): Observable<any>{
|
||||||
return this.http.post(`${this.apiUrl}/sendmail/text`, mail, {
|
return this.http.post(`${this.apiUrl}/sendmail/text`, mail, {
|
||||||
responseType: "text"
|
responseType: "text"
|
||||||
});
|
});
|
||||||
|
|
|
@ -58,6 +58,8 @@ export class MembreService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//récupère l'identifiant du membre, ainsi que le lien de son humeur
|
||||||
|
//"numero" est l'indice de l'humeur dans le tableau des humeurs
|
||||||
updateHumeur(numero : any) : Observable<any> | void {
|
updateHumeur(numero : any) : Observable<any> | void {
|
||||||
const userId = this.tokenService.getCurrentMembreId();
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
if (userId){
|
if (userId){
|
||||||
|
@ -67,6 +69,10 @@ updateHumeur(numero : any) : Observable<any> | void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ export class TodoService {
|
||||||
return this.http.put(`${this.apiUrl}/taches/update/1`, tache);
|
return this.http.put(`${this.apiUrl}/taches/update/1`, tache);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ajoute ne todoList sur une team (par son id) via le token
|
//ajoute une todoList sur une team (par son id) via le token
|
||||||
addTodoByTeamId(newtodoList: TodoList): Observable<any> {
|
addTodoByTeamId(newtodoList: TodoList): Observable<any> {
|
||||||
const teamId = this.tokenService.getCurrentTeamId();
|
const teamId = this.tokenService.getCurrentTeamId();
|
||||||
console.log(newtodoList + 'newtodoList');
|
console.log(newtodoList);
|
||||||
return this.http.post(`${this.apiUrl}/todolist/add/${teamId}`, newtodoList);
|
return this.http.post(`${this.apiUrl}/todolist/add/${teamId}`, newtodoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue