diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index f21a67d..daeb8d2 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,6 +1,6 @@

Bonjour

- - - - + + + + diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index c2efddb..0392348 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -4,6 +4,8 @@ import { KeycloakService } from 'keycloak-angular'; import { Role } from '../utils/roles'; +import { environment } from '../../environments/' + @Component({ selector: 'app-home', templateUrl: './home.component.html' @@ -11,10 +13,12 @@ import { Role } from '../utils/roles'; export class HomeComponent implements OnInit { role = Role; - constructor(public keycloakService : KeycloakService) { + userRole : string; + constructor(private keycloakService : KeycloakService) { + let clientId = environment.keycloakConfig.clientId; + this.userRole = this.keycloakService.getKeycloakInstance().resourceAccess[clientId]["roles"][0]; } ngOnInit() { } - } diff --git a/src/app/modeles/modele-formation.ts b/src/app/modeles/modele-formation.ts index 58769b8..be4bd3d 100644 --- a/src/app/modeles/modele-formation.ts +++ b/src/app/modeles/modele-formation.ts @@ -10,6 +10,7 @@ export class FormationModel { duree? : number; organisme? : string; nomFormateur? : string; + participantsFormation : ParticipationFormationModel[]; }; diff --git a/src/app/nav-menu/nav-menu.component.html b/src/app/nav-menu/nav-menu.component.html index 751d3b0..6160379 100644 --- a/src/app/nav-menu/nav-menu.component.html +++ b/src/app/nav-menu/nav-menu.component.html @@ -5,14 +5,14 @@ - - - - + + + + diff --git a/src/app/nav-menu/nav-menu.component.ts b/src/app/nav-menu/nav-menu.component.ts index aa90af7..7829525 100644 --- a/src/app/nav-menu/nav-menu.component.ts +++ b/src/app/nav-menu/nav-menu.component.ts @@ -3,6 +3,8 @@ import { KeycloakService } from 'keycloak-angular'; import { Role } from '../utils/roles'; +import { environment } from '../../environments/' + @Component({ selector: 'app-nav-menu', templateUrl: './nav-menu.component.html', @@ -10,7 +12,14 @@ import { Role } from '../utils/roles'; export class NavMenuComponent { role = Role; - constructor(public keycloakService : KeycloakService){} + userRole : string; + userInfo : string; + constructor(private keycloakService : KeycloakService){ + let clientId = environment.keycloakConfig.clientId; + this.userRole = this.keycloakService.getKeycloakInstance().resourceAccess[clientId]["roles"][0]; + let profil = keycloakService.getKeycloakInstance().profile; + this.userInfo = profil.firstName+" "+profil.lastName; + } isExpanded = false; diff --git a/src/assets/img/logo.png b/src/assets/img/logo.png index db8c1d0..ed94fa8 100644 Binary files a/src/assets/img/logo.png and b/src/assets/img/logo.png differ