diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 62aab10..2ea2f43 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -43,6 +43,7 @@ import localeFr from '@angular/common/locales/fr'; import { CardAvatarComponent } from './components/card-avatar/card-avatar.component'; import { HumeurComponent } from './components/humeur/humeur.component'; import { DeconnexionComponent } from './components/deconnexion/deconnexion.component'; +import { AlertComponent } from './components/alert/alert.component'; registerLocaleData(localeFr) @NgModule({ @@ -82,7 +83,8 @@ registerLocaleData(localeFr) PageUpdateAccountComponent, CardAvatarComponent, DeconnexionComponent, - HumeurComponent + HumeurComponent, + AlertComponent ], imports: [ BrowserModule, diff --git a/src/app/components/alert/alert.component.html b/src/app/components/alert/alert.component.html new file mode 100644 index 0000000..32e0ec5 --- /dev/null +++ b/src/app/components/alert/alert.component.html @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/src/app/components/alert/alert.component.scss b/src/app/components/alert/alert.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/alert/alert.component.spec.ts b/src/app/components/alert/alert.component.spec.ts new file mode 100644 index 0000000..8e3decb --- /dev/null +++ b/src/app/components/alert/alert.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AlertComponent } from './alert.component'; + +describe('AlertComponent', () => { + let component: AlertComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ AlertComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(AlertComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/alert/alert.component.ts b/src/app/components/alert/alert.component.ts new file mode 100644 index 0000000..84c50f0 --- /dev/null +++ b/src/app/components/alert/alert.component.ts @@ -0,0 +1,20 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; + +@Component({ + selector: 'app-alert', + templateUrl: './alert.component.html', + styleUrls: ['./alert.component.scss'] +}) +export class AlertComponent implements OnInit { + @Input() alert:any; + @Output() eventClose = new EventEmitter(); + constructor() { } + + ngOnInit(): void { + } + + onClickCloseAlert(){ + //console.log('fermeture from component'); + this.eventClose.emit('true'); + } +} diff --git a/src/app/components/signin/signin.component.html b/src/app/components/signin/signin.component.html index 83e4a52..7c782da 100644 --- a/src/app/components/signin/signin.component.html +++ b/src/app/components/signin/signin.component.html @@ -27,10 +27,13 @@ -
+ + + +
diff --git a/src/app/components/signin/signin.component.ts b/src/app/components/signin/signin.component.ts index ff6c04d..cb092a3 100644 --- a/src/app/components/signin/signin.component.ts +++ b/src/app/components/signin/signin.component.ts @@ -44,4 +44,9 @@ export class SigninComponent implements OnInit { this.isShow = true; } } + + 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 f667068..f71faf6 100644 --- a/src/app/pages/page-agenda/page-agenda.component.html +++ b/src/app/pages/page-agenda/page-agenda.component.html @@ -1,7 +1,9 @@ -
+ +