From eac32838d610bcf10919649d9fe6939336dff96a Mon Sep 17 00:00:00 2001 From: Blandine Bajard <83599148+BlandineBajard@users.noreply.github.com> Date: Fri, 25 Feb 2022 12:52:25 +0100 Subject: [PATCH] deconnexion button + nav bar fixed --- src/app/app.module.ts | 2 + .../deconnexion/deconnexion.component.html | 7 + .../deconnexion/deconnexion.component.scss | 10 ++ .../deconnexion/deconnexion.component.spec.ts | 25 +++ .../deconnexion/deconnexion.component.ts | 26 +++ .../components/header/header.component.html | 23 ++- .../components/header/header.component.scss | 9 +- src/app/components/header/header.component.ts | 8 +- .../page-account/page-account.component.html | 63 ++++--- .../page-add-member.component.html | 32 ++-- .../page-agenda/page-agenda.component.html | 103 +++++++---- .../page-ajout-contact.component.html | 170 ++++++++++-------- .../page-creation-team.component.html | 63 ++++--- .../page-dashboard.component.html | 10 +- .../page-delete-member.component.html | 7 +- .../page-menu-semaine.component.html | 1 + .../page-repertoire.component.html | 90 ++++++---- .../page-to-do-list.component.html | 1 + .../page-update-account.component.html | 7 +- .../page-update-member.component.html | 7 +- src/app/services/token.service.ts | 11 ++ 21 files changed, 440 insertions(+), 235 deletions(-) create mode 100644 src/app/components/deconnexion/deconnexion.component.html create mode 100644 src/app/components/deconnexion/deconnexion.component.scss create mode 100644 src/app/components/deconnexion/deconnexion.component.spec.ts create mode 100644 src/app/components/deconnexion/deconnexion.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 26c2d2f..248c45d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -41,6 +41,7 @@ import { PageUpdateAccountComponent } from './pages/page-update-account/page-upd import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular"; import { registerLocaleData } from '@angular/common'; import localeFr from '@angular/common/locales/fr'; +import { DeconnexionComponent } from './components/deconnexion/deconnexion.component'; registerLocaleData(localeFr) @NgModule({ @@ -80,6 +81,7 @@ registerLocaleData(localeFr) FooterComponent, PageDeleteAccountComponent, PageUpdateAccountComponent, + 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 @@ + 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 @@ -