diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8f8e633..f7a2acf 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -77,7 +77,7 @@ registerLocaleData(localeFr) DeconnexionComponent, HumeurComponent, AlertComponent, - PageAjoutEvenementsComponent, + PageAjoutEvenementsComponent, PageSupportComponent ], imports: [ diff --git a/src/app/components/card-avatar/card-avatar.component.html b/src/app/components/card-avatar/card-avatar.component.html index d6969cb..3d0749a 100644 --- a/src/app/components/card-avatar/card-avatar.component.html +++ b/src/app/components/card-avatar/card-avatar.component.html @@ -1,7 +1,8 @@
-
+
+
diff --git a/src/app/components/card-avatar/card-avatar.component.scss b/src/app/components/card-avatar/card-avatar.component.scss index 86d9570..8024a71 100644 --- a/src/app/components/card-avatar/card-avatar.component.scss +++ b/src/app/components/card-avatar/card-avatar.component.scss @@ -13,4 +13,10 @@ width: 150px; height: 170px; border-radius: 20px; +} + +.humeur{ + width: 60px; + height: 60px; + margin: 0 auto; } \ No newline at end of file diff --git a/src/app/components/card-member/card-member.component.html b/src/app/components/card-member/card-member.component.html index 0cf60b5..5da641b 100644 --- a/src/app/components/card-member/card-member.component.html +++ b/src/app/components/card-member/card-member.component.html @@ -6,6 +6,7 @@

{{membre.prenom }} {{membre.nom }}

+ + \ No newline at end of file diff --git a/src/app/components/humeur/humeur.component.html b/src/app/components/humeur/humeur.component.html index 1e0ced0..f9d9820 100644 --- a/src/app/components/humeur/humeur.component.html +++ b/src/app/components/humeur/humeur.component.html @@ -3,6 +3,7 @@

Mon humeur :

+ - +

{{monHumeurTitle}}

Je modifie mon avatar :

- + +
{{humor.title}}
diff --git a/src/app/components/humeur/humeur.component.ts b/src/app/components/humeur/humeur.component.ts index ac109a7..64cc0a6 100644 --- a/src/app/components/humeur/humeur.component.ts +++ b/src/app/components/humeur/humeur.component.ts @@ -13,7 +13,7 @@ monHumeurTitle! : string[] ; isShow: boolean; alert: any; - +// tableau des humeurs, lien vers les images et titre pour meilleure accesibilité tabHumeur= [ { title : "Je vais bien", lien : "assets/images/emoticon-heureux.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 joie", lien : "assets/images/emoticon-feter.png"} ] + constructor(private membreService: MembreService, private tokenService: TokenService) { this.isShow= false; this.alert=""; - } +// récupère l'id du membre connecté (stocké dans token.service), ngOnInit(): void { const userId = this.tokenService.getCurrentMembreId(); this.membreService.getMembreId(userId).subscribe({ next: result => { - //this.monHumeurTitle= [this.tabHumeur[result.smiley].title]; 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){ this.monHumeurTitle= [this.tabHumeur[numero].title]; 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( { next: result => { @@ -56,11 +61,13 @@ onChoixHumeur(numero: any){ } ); + console.log("humeur titre est : ", this.monHumeurTitle); console.log("humeur lien est : ", this.monHumeurLien); console.log("index humeur est : ", numero); } +// méthode pur afficher onClickCloseAlert(){ this.isShow=!this.isShow; } diff --git a/src/app/components/signin/signin.component.html b/src/app/components/signin/signin.component.html index 7c782da..7ea8c8a 100644 --- a/src/app/components/signin/signin.component.html +++ b/src/app/components/signin/signin.component.html @@ -2,38 +2,27 @@
-
- - +
+ + +
+
+ + +
+
-
- - -
- - -
- - + routerLinkActive="active-custom">S'inscrire
password perdu ? - - - -
diff --git a/src/app/components/to-do-list/to-do-list.component.ts b/src/app/components/to-do-list/to-do-list.component.ts index cb110f7..0d0c216 100644 --- a/src/app/components/to-do-list/to-do-list.component.ts +++ b/src/app/components/to-do-list/to-do-list.component.ts @@ -110,8 +110,6 @@ export class ToDoListComponent implements OnInit { tache.editing = false; } - - //supprimer la tache deleteTache(id: number) { this.TodoService.deleteTacheById(id).subscribe((resp) => { diff --git a/src/app/pages/page-add-member/page-add-member.component.html b/src/app/pages/page-add-member/page-add-member.component.html index c7f3c72..77b3960 100644 --- a/src/app/pages/page-add-member/page-add-member.component.html +++ b/src/app/pages/page-add-member/page-add-member.component.html @@ -157,6 +157,7 @@ Ajouter le membre +
diff --git a/src/app/pages/page-add-member/page-add-member.component.ts b/src/app/pages/page-add-member/page-add-member.component.ts index c9209e1..1bd4cf5 100644 --- a/src/app/pages/page-add-member/page-add-member.component.ts +++ b/src/app/pages/page-add-member/page-add-member.component.ts @@ -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; + } } diff --git a/src/app/pages/page-agenda/page-agenda.component.html b/src/app/pages/page-agenda/page-agenda.component.html index 216730d..aa55f26 100644 --- a/src/app/pages/page-agenda/page-agenda.component.html +++ b/src/app/pages/page-agenda/page-agenda.component.html @@ -41,21 +41,21 @@ class="btn btn-sm btn-primary" style="margin-right: 5px" (click)="navigatePrevious($event)" - >PreviousSemaine précedente TodayAujourd'hui NextSemaine suivante diff --git a/src/app/pages/page-agenda/page-agenda.component.scss b/src/app/pages/page-agenda/page-agenda.component.scss index 4a3ef6b..ca8b529 100644 --- a/src/app/pages/page-agenda/page-agenda.component.scss +++ b/src/app/pages/page-agenda/page-agenda.component.scss @@ -55,6 +55,7 @@ .btn { background-color: rgb(241,120,182); color : white; - border-radius: 12px; + border-radius: 6px; border-color: white; + font-weight: bold; } \ No newline at end of file diff --git a/src/app/pages/page-agenda/page-agenda.component.ts b/src/app/pages/page-agenda/page-agenda.component.ts index b4b7065..88f5143 100644 --- a/src/app/pages/page-agenda/page-agenda.component.ts +++ b/src/app/pages/page-agenda/page-agenda.component.ts @@ -234,16 +234,19 @@ export class PageAgendaComponent implements AfterViewInit { }); } + // bouton pour afficher la semaine precedente navigatePrevious(event: MouseEvent): void { event.preventDefault(); this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(-7); } + // bouton pour afficher la semaine suivante navigateNext(event: MouseEvent): void { event.preventDefault(); this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(7); } + // bouton pour afficher la semaine en cours navigateToday(event: MouseEvent): void { event.preventDefault(); this.config.startDate = DayPilot.Date.today(); diff --git a/src/app/pages/page-dashboard/page-dashboard.component.html b/src/app/pages/page-dashboard/page-dashboard.component.html index 969f997..3f3016a 100644 --- a/src/app/pages/page-dashboard/page-dashboard.component.html +++ b/src/app/pages/page-dashboard/page-dashboard.component.html @@ -24,7 +24,7 @@ -
+
- - diff --git a/src/app/pages/page-forgot-password/page-forgot-password.component.ts b/src/app/pages/page-forgot-password/page-forgot-password.component.ts index 821250f..afaa398 100644 --- a/src/app/pages/page-forgot-password/page-forgot-password.component.ts +++ b/src/app/pages/page-forgot-password/page-forgot-password.component.ts @@ -15,10 +15,12 @@ export class PageForgotPasswordComponent implements OnInit { alert : any; isShow : boolean; + isLoading : boolean; constructor(private authService: AuthService, private router: Router, private mailService: MailService,) { this.alert = ""; this.isShow = false; + this.isLoading = false; } ngOnInit(): void {} @@ -36,26 +38,36 @@ export class PageForgotPasswordComponent implements OnInit { passwordConfirm: "" }; - console.log(membre); + //console.log(membre); this.authService.forgotPassword(membre).subscribe( { next: result => { - this.alert={"type":"success", "content":"Un mail à été envoyé !"}; - this.isShow = true; const mail: Mail = { recipient: submittedForm.form.value.email, subject: "Votre mot de passe Organizee", - //message: 'Votre mot de passe' message: ` Bonjour!\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 - Lien : http://192.168.1.16:4200/reinitialisation-password/${result}` + Lien : http://localhost:4200/reinitialisation-password/${result}` }; - this.mailService.envoiMailText(mail)?.subscribe((respMail) =>{ - console.log("Mail envoyé"); + this.isLoading = true; + 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 => { diff --git a/src/app/pages/page-not-found/page-not-found.component.html b/src/app/pages/page-not-found/page-not-found.component.html index cdcb221..fcd3086 100644 --- a/src/app/pages/page-not-found/page-not-found.component.html +++ b/src/app/pages/page-not-found/page-not-found.component.html @@ -6,7 +6,11 @@
+ + + + Je retourne à l'accueil

diff --git a/src/app/pages/page-not-found/page-not-found.component.scss b/src/app/pages/page-not-found/page-not-found.component.scss index 3e84bf3..59316c5 100644 --- a/src/app/pages/page-not-found/page-not-found.component.scss +++ b/src/app/pages/page-not-found/page-not-found.component.scss @@ -11,8 +11,6 @@ p{ .min-vh-100 { font-weight: bold; - //background-image: linear-gradient(to left top, #051937, #004d7a, #008793, #e2ebe7, #f8faf5); - //max-width: max-content; } img {justify-content: center; diff --git a/src/app/pages/page-repertoire/page-repertoire.component.ts b/src/app/pages/page-repertoire/page-repertoire.component.ts index c387247..9efaeb9 100644 --- a/src/app/pages/page-repertoire/page-repertoire.component.ts +++ b/src/app/pages/page-repertoire/page-repertoire.component.ts @@ -33,6 +33,7 @@ export class PageRepertoireComponent implements OnInit { ngOnInit(): void { 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"){ this.parent = true; } diff --git a/src/app/pages/page-reset-password/page-reset-password.component.html b/src/app/pages/page-reset-password/page-reset-password.component.html index 07e0fa4..2a13ecd 100644 --- a/src/app/pages/page-reset-password/page-reset-password.component.html +++ b/src/app/pages/page-reset-password/page-reset-password.component.html @@ -2,7 +2,7 @@
-

Entrez ici votre email et votre nouveau mot de passe

+

Entrez ici votre nouveau mot de passe

- +
CREER MON COMPTE - +
diff --git a/src/app/pages/page-signup/page-signup.component.ts b/src/app/pages/page-signup/page-signup.component.ts index 288acfd..01562e1 100644 --- a/src/app/pages/page-signup/page-signup.component.ts +++ b/src/app/pages/page-signup/page-signup.component.ts @@ -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; + } } diff --git a/src/app/pages/page-support/page-support.component.html b/src/app/pages/page-support/page-support.component.html index adbbb66..f3bfe60 100644 --- a/src/app/pages/page-support/page-support.component.html +++ b/src/app/pages/page-support/page-support.component.html @@ -1,32 +1,38 @@ - +
+ + +
+
-

Demande support

-
+ + +

Nous contacter

+ +
- +
- +
- -
- -
+ + +
- - - + +
+
+ \ No newline at end of file diff --git a/src/app/pages/page-support/page-support.component.scss b/src/app/pages/page-support/page-support.component.scss index d8428e7..d3a4905 100644 --- a/src/app/pages/page-support/page-support.component.scss +++ b/src/app/pages/page-support/page-support.component.scss @@ -1,9 +1,12 @@ + + + form { background-color: rgb(184, 202, 235); width: 600px; - border: 3px solid blue; + border: 1px solid blue; margin: 0 auto; - border-radius: 1em; + border-radius: 2em; padding:3em; } diff --git a/src/app/pages/page-support/page-support.component.ts b/src/app/pages/page-support/page-support.component.ts index f9cc830..929fabe 100644 --- a/src/app/pages/page-support/page-support.component.ts +++ b/src/app/pages/page-support/page-support.component.ts @@ -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 { Mail } from 'src/app/models/mail'; -//DRIVEN FORM @Component({ selector: 'app-page-support', templateUrl: './page-support.component.html', styleUrls: ['./page-support.component.scss'] }) 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 { + 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; } -} - - +} \ No newline at end of file diff --git a/src/app/pages/page-to-do-list/page-to-do-list.component.html b/src/app/pages/page-to-do-list/page-to-do-list.component.html index 3034ec7..1c57ca9 100644 --- a/src/app/pages/page-to-do-list/page-to-do-list.component.html +++ b/src/app/pages/page-to-do-list/page-to-do-list.component.html @@ -1,7 +1,7 @@

To-Do-List

-
+