diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8546b56..8f8e633 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -23,7 +23,6 @@ import { MeteoComponent } from './components/meteo/meteo.component'; import { CalendrierComponent } from './components/calendrier/calendrier.component'; import { CardMemberComponent } from './components/card-member/card-member.component'; import { ToDoListComponent } from './components/to-do-list/to-do-list.component'; -import { TacheComponent } from './components/tache/tache.component'; import { CardMenuComponent } from './components/card-menu/card-menu.component'; import { FicheContactComponent } from './components/fiche-contact/fiche-contact.component'; import { CreneauComponent } from './components/creneau/creneau.component'; @@ -41,6 +40,7 @@ import { HumeurComponent } from './components/humeur/humeur.component'; import { DeconnexionComponent } from './components/deconnexion/deconnexion.component'; import { AlertComponent } from './components/alert/alert.component'; import { PageAjoutEvenementsComponent } from './pages/page-ajout-evenements/page-ajout-evenements.component'; +import { PageSupportComponent } from './pages/page-support/page-support.component'; registerLocaleData(localeFr) @NgModule({ @@ -67,7 +67,6 @@ registerLocaleData(localeFr) CalendrierComponent, CardMemberComponent, ToDoListComponent, - TacheComponent, CardMenuComponent, FicheContactComponent, CreneauComponent, @@ -78,7 +77,8 @@ registerLocaleData(localeFr) DeconnexionComponent, HumeurComponent, AlertComponent, - PageAjoutEvenementsComponent + PageAjoutEvenementsComponent, + PageSupportComponent ], imports: [ BrowserModule, diff --git a/src/app/components/fiche-contact/fiche-contact.component.ts b/src/app/components/fiche-contact/fiche-contact.component.ts index 2c2a1b5..2d99fde 100644 --- a/src/app/components/fiche-contact/fiche-contact.component.ts +++ b/src/app/components/fiche-contact/fiche-contact.component.ts @@ -24,6 +24,7 @@ export class FicheContactComponent implements OnInit { } } + // supprime le contact onClickDelete(numPerson: number){ window.alert("Le contact à bien été supprimé!") this.clickDelete.emit(numPerson); diff --git a/src/app/components/footer/footer.component.html b/src/app/components/footer/footer.component.html index 805a5ca..9cd0f94 100644 --- a/src/app/components/footer/footer.component.html +++ b/src/app/components/footer/footer.component.html @@ -8,5 +8,6 @@ To-Do-List Agenda Menus +Nous contacter + - \ No newline at end of file diff --git a/src/app/components/footer/footer.component.scss b/src/app/components/footer/footer.component.scss index 90d7840..82b82c8 100644 --- a/src/app/components/footer/footer.component.scss +++ b/src/app/components/footer/footer.component.scss @@ -7,4 +7,9 @@ font-size: smaller; .footer { margin-top: 20px; +} + +h3{ + color : blue; + font-size : 16px; } \ No newline at end of file diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index 7749b01..f5b1843 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -1,18 +1,19 @@ - \ No newline at end of file diff --git a/src/app/components/header/header.component.scss b/src/app/components/header/header.component.scss index 0f359a5..36654ad 100644 --- a/src/app/components/header/header.component.scss +++ b/src/app/components/header/header.component.scss @@ -1,7 +1,8 @@ +#img { + height:95px; +} + .navbar-brand { - position: relative; - margin-right: 70%; - font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 3rem; color: #5d5fef; @@ -24,13 +25,6 @@ a:active { color: #5d5fef; } -.navbar-nav { - height: 6rem; -} - -#img { - position: absolute; - max-width: 5%; - margin-left: 5%; - margin-top: 10px; -} +.container-fluid{ + width:90%; +} \ 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 02088d8..1e0ced0 100644 --- a/src/app/components/humeur/humeur.component.html +++ b/src/app/components/humeur/humeur.component.html @@ -2,7 +2,12 @@

Mon humeur :

- + + @@ -19,4 +24,5 @@
-
\ No newline at end of file + + \ No newline at end of file diff --git a/src/app/components/humeur/humeur.component.scss b/src/app/components/humeur/humeur.component.scss index 8b89097..2ddd3eb 100644 --- a/src/app/components/humeur/humeur.component.scss +++ b/src/app/components/humeur/humeur.component.scss @@ -6,6 +6,7 @@ p>img { img { width: 50px; height: 50px; + margin: 8px; } .humeur { @@ -13,6 +14,7 @@ display: inline; } div { - background-color: #87AFC7; +width: 400px; +background-color: #87AFC7; text-align: center; } \ No newline at end of file diff --git a/src/app/components/humeur/humeur.component.ts b/src/app/components/humeur/humeur.component.ts index c4b2cd5..4dc25ec 100644 --- a/src/app/components/humeur/humeur.component.ts +++ b/src/app/components/humeur/humeur.component.ts @@ -1,4 +1,6 @@ import { Component, OnInit } from '@angular/core'; +import { MembreService } from 'src/app/services/membre.service'; +import { TokenService } from 'src/app/services/token.service'; @Component({ selector: 'app-humeur', @@ -6,10 +8,10 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./humeur.component.scss'] }) export class HumeurComponent implements OnInit { - - - monHumeurLien! : string[]; - monHumeurTitle! : string[] ; +monHumeurLien! : string[]; +monHumeurTitle! : string[] ; +isShow: boolean; +alert: any; tabHumeur= [ @@ -19,18 +21,48 @@ export class HumeurComponent implements OnInit { { title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"}, { title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ] - constructor() { } + constructor(private membreService: MembreService, private tokenService: TokenService) { + this.isShow= false; + this.alert=""; + + } - ngOnInit(): void { } + ngOnInit(): void { + const userId = this.tokenService.getCurrentMembreId(); + this.membreService.getMembreId(userId).subscribe({ + next: result => { + this.monHumeurTitle= [this.tabHumeur[result.smiley].title]; + this.monHumeurLien= [this.tabHumeur[result.smiley].lien]; + // console.log("resultat smiley ", result.smiley); + } + }) + } onChoixHumeur(numero: number){ this.monHumeurTitle= [this.tabHumeur[numero].title]; this.monHumeurLien= [this.tabHumeur[numero].lien]; + this.membreService.updateHumeur(numero)?.subscribe( + { + next: result => { + this.alert={"type":"success", "content":"L'humeur a bien été modifiée"}; + this.isShow = true; + }, + error: err => { + this.alert={"type":"danger", "content":"Problème lors de la modification de l'humeur"}; + this.isShow = true; + }, + complete: () => console.log('DONE!') + } +); + console.log("humeur titre est : ", this.monHumeurTitle); console.log("humeur lien est : ", this.monHumeurLien); -console.log("index humeur est : ", numero ); - - +console.log("index humeur est : ", numero); } + +onClickCloseAlert(){ +this.isShow=!this.isShow; } + +} \ No newline at end of file diff --git a/src/app/components/side-bar/side-bar.component.html b/src/app/components/side-bar/side-bar.component.html index 6e3baaf..150764a 100644 --- a/src/app/components/side-bar/side-bar.component.html +++ b/src/app/components/side-bar/side-bar.component.html @@ -1,4 +1,4 @@ -