diff --git a/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.html b/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.html
index ad1c7ad..4085820 100644
--- a/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.html
+++ b/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.html
@@ -13,7 +13,6 @@
Personal Mail |
Apside Mail |
Resignation Date |
- Business Unit ID |
@@ -28,7 +27,6 @@
|
|
|
- |
@@ -37,6 +35,11 @@
+
+
*Tous les champs sont obligatoires
diff --git a/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.ts b/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.ts
index 5cea570..8376764 100644
--- a/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.ts
+++ b/src/app/components/collaborateur/collaborateur-detail/collaborateur-detail.component.ts
@@ -2,6 +2,8 @@ import {Component, Input, OnInit} from '@angular/core';
import {Collaborateur} from "../../../interfaces/collaborateur";
import {HttpClient} from "@angular/common/http";
import {CollaborateurService} from "../../../services/collaborateur.service";
+import {BusinessunitService} from "../../../services/businessunit.service";
+import {Businessunit} from "../../../interfaces/businessunit";
@Component({
selector: 'app-collaborateur-detail',
@@ -10,7 +12,7 @@ import {CollaborateurService} from "../../../services/collaborateur.service";
})
export class CollaborateurDetailComponent implements OnInit {
-
+ businessunits : Businessunit[] = [];
collaborateurs : Collaborateur[] = [];
@Input()
@@ -19,10 +21,12 @@ export class CollaborateurDetailComponent implements OnInit {
constructor(
private http : HttpClient,
private collaborateurService: CollaborateurService,
+ private businessunitService: BusinessunitService
) { }
ngOnInit(): void {
this.getCollaborateurs();
+ this.getBusinessunits();
}
getCollaborateurs():void {
@@ -30,4 +34,9 @@ export class CollaborateurDetailComponent implements OnInit {
.subscribe(collaborateurs => this.collaborateurs = collaborateurs);
}
+ getBusinessunits():void {
+ this.businessunitService.getBusinessunits()
+ .subscribe(businessunits => this.businessunits = businessunits);
+ }
+
}