|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|