diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7ded354..7dca7ae 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -42,6 +42,7 @@ import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular"; import { registerLocaleData } from '@angular/common'; import localeFr from '@angular/common/locales/fr'; import { CardAvatarComponent } from './components/card-avatar/card-avatar.component'; +import { DeconnexionComponent } from './components/deconnexion/deconnexion.component'; registerLocaleData(localeFr) @NgModule({ @@ -82,6 +83,7 @@ registerLocaleData(localeFr) PageDeleteAccountComponent, PageUpdateAccountComponent, CardAvatarComponent, + DeconnexionComponent, ], imports: [ diff --git a/src/app/components/deconnexion/deconnexion.component.html b/src/app/components/deconnexion/deconnexion.component.html new file mode 100644 index 0000000..a6d16bd --- /dev/null +++ b/src/app/components/deconnexion/deconnexion.component.html @@ -0,0 +1,7 @@ + + Se déconnecter + diff --git a/src/app/components/deconnexion/deconnexion.component.scss b/src/app/components/deconnexion/deconnexion.component.scss new file mode 100644 index 0000000..58c6ef8 --- /dev/null +++ b/src/app/components/deconnexion/deconnexion.component.scss @@ -0,0 +1,10 @@ +.btn-circle.btn-xl { + width: 80px; + height: 80px; + padding: 10px 16px; + border-radius: 40px; + font-size: 10px; + text-align: center; + float: right; + margin-right: 20px; +} diff --git a/src/app/components/deconnexion/deconnexion.component.spec.ts b/src/app/components/deconnexion/deconnexion.component.spec.ts new file mode 100644 index 0000000..a27c036 --- /dev/null +++ b/src/app/components/deconnexion/deconnexion.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DeconnexionComponent } from './deconnexion.component'; + +describe('DeconnexionComponent', () => { + let component: DeconnexionComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ DeconnexionComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(DeconnexionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/deconnexion/deconnexion.component.ts b/src/app/components/deconnexion/deconnexion.component.ts new file mode 100644 index 0000000..aebfebf --- /dev/null +++ b/src/app/components/deconnexion/deconnexion.component.ts @@ -0,0 +1,26 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { TokenService } from 'src/app/services/token.service'; + +@Component({ + selector: 'app-deconnexion', + templateUrl: './deconnexion.component.html', + styleUrls: ['./deconnexion.component.scss'] +}) +export class DeconnexionComponent implements OnInit { + + constructor(private tokenService: TokenService, + private router: Router, + private route: ActivatedRoute) { } + + ngOnInit(): void { + } + + + onClickDeco(){ + this.tokenService.eraseToken(); + this.router.navigate(['accueil']); + + } + +} diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index 7e79e47..09c2a30 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -1,10 +1,17 @@ - - - - - - - - Organizee + + + + + + + Organizee + diff --git a/src/app/components/header/header.component.scss b/src/app/components/header/header.component.scss index 61ed3ff..0f359a5 100644 --- a/src/app/components/header/header.component.scss +++ b/src/app/components/header/header.component.scss @@ -1,6 +1,6 @@ .navbar-brand { - position: absolute; - margin-left: 12%; + position: relative; + margin-right: 70%; font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 3rem; @@ -29,5 +29,8 @@ a:active { } #img { - margin-left: 50%; + position: absolute; + max-width: 5%; + margin-left: 5%; + margin-top: 10px; } diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts index 7ab4cf7..ce674e1 100644 --- a/src/app/components/header/header.component.ts +++ b/src/app/components/header/header.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; + @Component({ selector: 'app-header', templateUrl: './header.component.html', @@ -7,9 +8,12 @@ import { Component, OnInit } from '@angular/core'; }) export class HeaderComponent implements OnInit { - constructor() { } + constructor(){ + + } ngOnInit(): void { } -} + } + diff --git a/src/app/pages/page-account/page-account.component.html b/src/app/pages/page-account/page-account.component.html index b381a45..9b8fa86 100644 --- a/src/app/pages/page-account/page-account.component.html +++ b/src/app/pages/page-account/page-account.component.html @@ -1,31 +1,48 @@ + - Ma team - - Modifier mon compte - - - Supprimer mon compte - - - Ajouter un membre - - - - - - - + Ma team + + + Modifier mon compte + + + + Supprimer mon compte + + + + + Ajouter un membre + + + + + + + + - 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 b098c43..c7d87a6 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 @@ -1,4 +1,5 @@ + @@ -6,12 +7,14 @@ - + - VOTRE DATE DE NAISSANCE + VOTRE DATE DE NAISSANCE - Adulte - Enfant + Adulte + Enfant Sélectionner un profil @@ -138,17 +143,20 @@ !addMemberForm.controls['passwordConfirmFc'].valid }" /> - CONFIRMEZ VOTRE MOT DE PASSE + CONFIRMEZ VOTRE MOT DE PASSE Ajouter le membre + > + Ajouter le membre + - diff --git a/src/app/pages/page-agenda/page-agenda.component.html b/src/app/pages/page-agenda/page-agenda.component.html index bd993c8..295dd85 100644 --- a/src/app/pages/page-agenda/page-agenda.component.html +++ b/src/app/pages/page-agenda/page-agenda.component.html @@ -1,37 +1,80 @@ - - {{alert.content}} - - × - + + {{ alert.content }} + + × + - - - - - - - - - - - - - Previous - Today - Next - team : {{teamId}} - user: {{userId}} - role: {{role}} - Ajouter un évènement - - - - - - + + + + + + + + + + + + + Previous + Today + Next + team : {{ teamId }} - user: {{ userId }} - role: {{ role }} + Ajouter un évènement + + + - - \ No newline at end of file + + diff --git a/src/app/pages/page-ajout-contact/page-ajout-contact.component.html b/src/app/pages/page-ajout-contact/page-ajout-contact.component.html index 0c550b7..6b01e6d 100644 --- a/src/app/pages/page-ajout-contact/page-ajout-contact.component.html +++ b/src/app/pages/page-ajout-contact/page-ajout-contact.component.html @@ -13,25 +13,74 @@ formControlName="couleurFc"> - - - Nom + + + Nom + + + + Prénom + + + + Téléphone + + + + Adresse email + + + + Date de naissance + - - - - Prénom + + + Adresse + @@ -85,4 +134,5 @@ - \ No newline at end of file + + diff --git a/src/app/pages/page-creation-team/page-creation-team.component.html b/src/app/pages/page-creation-team/page-creation-team.component.html index e0fcb61..6184b8b 100644 --- a/src/app/pages/page-creation-team/page-creation-team.component.html +++ b/src/app/pages/page-creation-team/page-creation-team.component.html @@ -1,27 +1,40 @@ - - - - - - Créer votre team - - - - - Nom - - Je crée ma team - - - + + + + + + Créer votre team + + + + + Nom + + + Je crée ma team + + + + + diff --git a/src/app/pages/page-dashboard/page-dashboard.component.html b/src/app/pages/page-dashboard/page-dashboard.component.html index 25bc9f8..6306794 100644 --- a/src/app/pages/page-dashboard/page-dashboard.component.html +++ b/src/app/pages/page-dashboard/page-dashboard.component.html @@ -1,11 +1,10 @@ - - + - Bienvenue {{conectedUser.prenom}}!! + Bienvenue {{ conectedUser.prenom }}!! @@ -36,4 +35,5 @@ - \ No newline at end of file + + diff --git a/src/app/pages/page-delete-member/page-delete-member.component.html b/src/app/pages/page-delete-member/page-delete-member.component.html index d6ce21b..eca4658 100644 --- a/src/app/pages/page-delete-member/page-delete-member.component.html +++ b/src/app/pages/page-delete-member/page-delete-member.component.html @@ -1,12 +1,11 @@ + - + Supprimer ce membre - - - + diff --git a/src/app/pages/page-menu-semaine/page-menu-semaine.component.html b/src/app/pages/page-menu-semaine/page-menu-semaine.component.html index bfb3f29..d5690f8 100644 --- a/src/app/pages/page-menu-semaine/page-menu-semaine.component.html +++ b/src/app/pages/page-menu-semaine/page-menu-semaine.component.html @@ -1,4 +1,5 @@ + diff --git a/src/app/pages/page-repertoire/page-repertoire.component.html b/src/app/pages/page-repertoire/page-repertoire.component.html index ce0173b..298c97e 100644 --- a/src/app/pages/page-repertoire/page-repertoire.component.html +++ b/src/app/pages/page-repertoire/page-repertoire.component.html @@ -1,41 +1,63 @@ + - - - + + + - - - Tous les contacts - - - Ajouter un contact - + + + + Tous les contacts + + + Ajouter un contact + - - + + - - - - Liste des Contacts - - - - - - {{ personne.prenom }} {{ personne.nom }} - - - - - - - - + + + + Liste des Contacts + + + + + + {{ personne.prenom }} {{ personne.nom }} + + + + + + + - \ 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 f58dc34..ae8adfd 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,5 +1,6 @@ + diff --git a/src/app/pages/page-update-account/page-update-account.component.html b/src/app/pages/page-update-account/page-update-account.component.html index 0210d99..2c307c2 100644 --- a/src/app/pages/page-update-account/page-update-account.component.html +++ b/src/app/pages/page-update-account/page-update-account.component.html @@ -1,12 +1,11 @@ + - + Modifier votre compte - - - + diff --git a/src/app/pages/page-update-member/page-update-member.component.html b/src/app/pages/page-update-member/page-update-member.component.html index 31fb62e..764bae0 100644 --- a/src/app/pages/page-update-member/page-update-member.component.html +++ b/src/app/pages/page-update-member/page-update-member.component.html @@ -1,12 +1,11 @@ + - + Modifier ce membre - - - + diff --git a/src/app/services/token.service.ts b/src/app/services/token.service.ts index 25e4cb6..0ef68bd 100644 --- a/src/app/services/token.service.ts +++ b/src/app/services/token.service.ts @@ -20,6 +20,17 @@ tokenKey = environment.tokenKey; } } + public eraseToken(): string | null { + const token = localStorage.getItem(this.tokenKey); + if(token) { + this.tokenKey = ''; + return token; + }else { + return null; + } + } + + public getCurrentMembreId(): number | null { const token = this.getToken(); if(token) {