diff --git a/src/app/referents/assignation-referent/assignation-referent.component.html b/src/app/referents/assignation-referent/assignation-referent.component.html
index 293a6e8..b20fd91 100644
--- a/src/app/referents/assignation-referent/assignation-referent.component.html
+++ b/src/app/referents/assignation-referent/assignation-referent.component.html
@@ -1,15 +1,14 @@
Assignation référent
+Référent sélectionné : {{referentChoisi.nom}} {{referentChoisi.prenom}}
+
-
-
-
+
+
-
-
diff --git a/src/app/referents/assignation-referent/assignation-referent.component.ts b/src/app/referents/assignation-referent/assignation-referent.component.ts
index 9b27e63..0bff504 100644
--- a/src/app/referents/assignation-referent/assignation-referent.component.ts
+++ b/src/app/referents/assignation-referent/assignation-referent.component.ts
@@ -1,4 +1,7 @@
import { Component, OnInit } from "@angular/core";
+import { CollaborateurDTO, CollaborateursService } from "@shared/api-swagger";
+import { collaborateurTypeRecherche } from "@shared/utils/cles";
+import { Subscription } from "rxjs";
@Component({
selector: 'assignation-referent',
@@ -6,9 +9,52 @@ import { Component, OnInit } from "@angular/core";
})
export class AssignationReferentComponent implements OnInit {
- constructor() {}
+ rechercherParDate: boolean = false;
+
+ rechercherParBu: boolean = true;
+
+ referentChoisi : CollaborateurDTO = undefined;
+
+ rolesReferents : string[] = ["Manager", "RA", "CP", "TL"];
+
+ rolesCollaborateurs : ["Collaborateur"];
+
+ typeRechercheReferent: string = collaborateurTypeRecherche.referents;
+
+ collaborateursEP: CollaborateurDTO[] = [];
+
+ /**
+ * Liste des colonnes du tableau à afficher pour les référents.
+ */
+ displayedColumnsReferent : string[] = ["businessunit", "collaborateur"];
+
+ /**
+ * Liste des colonnes du tableau à afficher.
+ */
+ displayedColumns : string[] = ["businessunit", "collaborateur"];
+
+ collaborateurSubscription: Subscription;
+
+ constructor(private collaborateurService: CollaborateursService) {}
ngOnInit() {
}
+
+ choixReferent(event) {
+ this.referentChoisi = event.collaborateur;
+ this.setCollaborateurEP();
+ }
+
+ setCollaborateurEP() {
+ this.collaborateurSubscription = this.collaborateurService.getCollaborateursByReferent(this.referentChoisi.id).subscribe(
+ collaborateurs => {
+ this.collaborateursEP = collaborateurs;
+
+ },
+ error => console.log(error)
+ );
+ }
+
+
}
\ No newline at end of file
diff --git a/src/app/referents/referents.module.ts b/src/app/referents/referents.module.ts
index aef104e..4aa108e 100644
--- a/src/app/referents/referents.module.ts
+++ b/src/app/referents/referents.module.ts
@@ -11,12 +11,10 @@ import { ReferentsComponent } from './referents.component';
import { DetailsReferentComponent } from './details-referent/details-referent.component';
import { ReferentsRoutingModule } from './referents.routing.module';
import { AssignationReferentComponent } from "./assignation-referent/assignation-referent.component";
-import { StepChoixReferentComponent } from "./assignation-referent/step-choix-referent/step-choix-referent.component";
@NgModule({
declarations: [ DetailsReferentComponent,
- ReferentsComponent, AssignationReferentComponent,
- StepChoixReferentComponent
+ ReferentsComponent, AssignationReferentComponent
],
exports: [ ReferentsComponent
],