component alert pour afficher une alert avec un message
This commit is contained in:
parent
b4ca38d046
commit
3b4e3b2f84
@ -43,6 +43,7 @@ import localeFr from '@angular/common/locales/fr';
|
|||||||
import { CardAvatarComponent } from './components/card-avatar/card-avatar.component';
|
import { CardAvatarComponent } from './components/card-avatar/card-avatar.component';
|
||||||
import { HumeurComponent } from './components/humeur/humeur.component';
|
import { HumeurComponent } from './components/humeur/humeur.component';
|
||||||
import { DeconnexionComponent } from './components/deconnexion/deconnexion.component';
|
import { DeconnexionComponent } from './components/deconnexion/deconnexion.component';
|
||||||
|
import { AlertComponent } from './components/alert/alert.component';
|
||||||
registerLocaleData(localeFr)
|
registerLocaleData(localeFr)
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -82,7 +83,8 @@ registerLocaleData(localeFr)
|
|||||||
PageUpdateAccountComponent,
|
PageUpdateAccountComponent,
|
||||||
CardAvatarComponent,
|
CardAvatarComponent,
|
||||||
DeconnexionComponent,
|
DeconnexionComponent,
|
||||||
HumeurComponent
|
HumeurComponent,
|
||||||
|
AlertComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="alert alert-{{alert.type}} alert-dismissible fade show" role="alert" style="position:absolute;z-index:9999;top:10px;right:10px;">
|
<div class="alert alert-{{alert.type}} alert-dismissible fade show" role="alert" style="position:absolute;z-index:9999;top:10px;right:50%;transform: translateX(50%);width:600px; text-align:center;">
|
||||||
{{alert.content}}
|
{{alert.content}}
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" (click)="onClickCloseAlert()"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" (click)="onClickCloseAlert()"></button>
|
||||||
</div>
|
</div>
|
@ -27,10 +27,11 @@
|
|||||||
<!-- <div *ngIf="errorForm">
|
<!-- <div *ngIf="errorForm">
|
||||||
<p class="text-danger">Il manque des informations dans le formulaire...</p>
|
<p class="text-danger">Il manque des informations dans le formulaire...</p>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div *ngIf="isShow">
|
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||||
|
<!-- <div *ngIf="isShow">
|
||||||
<div class="alert alert-{{alert.type}}" role="alert">
|
<div class="alert alert-{{alert.type}}" role="alert">
|
||||||
{{alert.content}}
|
{{alert.content}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,4 +44,9 @@ export class SigninComponent implements OnInit {
|
|||||||
this.isShow = true;
|
this.isShow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onClickCloseAlert(){
|
||||||
|
console.log('fermeture');
|
||||||
|
this.isShow = ! this.isShow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar></app-side-bar>
|
||||||
|
|
||||||
<div
|
<app-alert *ngIf="isShow" [alert]="alert" (eventClose)="onClickCloseAlert();"></app-alert>
|
||||||
|
|
||||||
|
<!-- <div
|
||||||
class="alert alert-{{ alert.type }}"
|
class="alert alert-{{ alert.type }}"
|
||||||
role="alert"
|
role="alert"
|
||||||
style="position: absolute; z-index: 999; top: 50%; left: 40%; width: 500px"
|
style="position: absolute; z-index: 999; top: 50%; left: 40%; width: 500px"
|
||||||
@ -18,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div style="width: 150px">
|
<div style="width: 150px">
|
||||||
|
@ -58,6 +58,7 @@ export class PageAgendaComponent implements AfterViewInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.userId = this.tokenService.getCurrentMembreId();
|
this.userId = this.tokenService.getCurrentMembreId();
|
||||||
this.teamId = this.tokenService.getCurrentTeamId();
|
this.teamId = this.tokenService.getCurrentTeamId();
|
||||||
|
this.role = this.tokenService.getRole();
|
||||||
}
|
}
|
||||||
|
|
||||||
// petite triche pour eviter la repetition du nom dans le RDV
|
// petite triche pour eviter la repetition du nom dans le RDV
|
||||||
|
Loading…
Reference in New Issue
Block a user