From 122cbc81164a8a275a1be2310cbe1e1c59488ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Fri, 12 Feb 2021 09:31:07 +0100 Subject: [PATCH] =?UTF-8?q?Affichage=20de=20la=20liste=20des=20collaborate?= =?UTF-8?q?urs=20d'un=20r=C3=A9f=C3=A9rent=20depuis=20ses=20d=C3=A9tails?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../affichage-details-collaborateur.html | 26 ++++++++++++++----- .../affichage-details-collaborateur.module.ts | 5 ++-- .../affichage-details-collaborateur.ts | 9 +++++++ .../collaborateurs.table.ts | 7 +++-- 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.html b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.html index 726fd6f..70a3966 100644 --- a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.html +++ b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.html @@ -9,12 +9,26 @@

Date départ : {{ collaborateur.dateDepart | date: 'dd MMMM yyyy'}}

-

Liste des EP

-

Liste des futurs formations

-

Liste des formations effectuées

-

Liste des collaborateurs

-

Liste des EP effectués

-

Liste des EP en cours

+ +

Liste des EP

+
+ + +

Liste des formations

+
+ + +

Liste des collaborateurs

+ +
+ + +

Liste des EP effectués

+
+ + +

Liste des EP en cours

+
diff --git a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.module.ts b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.module.ts index 78d0690..e6f49ac 100644 --- a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.module.ts +++ b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.module.ts @@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms'; import { MaterialModule } from "../angular-material/angular-material.module"; import { AffichageDetailsCollaborateurComponent } from "@shared/affichage-details-collaboarteur/affichage-details-collaborateur"; - +import { MatTablesModule } from '@shared/mat-tables/mat-tables.module'; @NgModule({ declarations: [ @@ -13,7 +13,8 @@ import { AffichageDetailsCollaborateurComponent } from "@shared/affichage-detail imports: [ MaterialModule, CommonModule, - FormsModule + FormsModule, + MatTablesModule ], exports: [AffichageDetailsCollaborateurComponent] }) diff --git a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts index 74d00cd..137bca8 100644 --- a/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts +++ b/src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts @@ -1,6 +1,7 @@ import { Component, Input, OnInit } from "@angular/core"; import { CollaborateurDTO, CollaborateursService } from "@shared/api-swagger"; import { Subscription } from "rxjs"; +import { collaborateurTypeRecherche } from "@shared/utils/cles"; @Component({ selector: "affichage-details-collaborateur", @@ -10,6 +11,14 @@ export class AffichageDetailsCollaborateurComponent implements OnInit{ @Input() idCollaborateur: string; @Input() estReferent: boolean=false; + + typeRecherche : string = collaborateurTypeRecherche.collaborateursEP; + + displayedColumns : string[] = ["businessunit", "collaborateur", "datearrivee"]; + + rechercherParBU: boolean = true; + + collaborateur: CollaborateurDTO = undefined; private collaborateurSubscription: Subscription; diff --git a/src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.ts b/src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.ts index 63dedcd..dd34cb6 100644 --- a/src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.ts +++ b/src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.ts @@ -70,7 +70,7 @@ export class CollaborateursTableComponent implements OnInit { /** * Nombre total d'élément du tableau */ - taille: number; + taille: number = 0; /** @@ -93,6 +93,9 @@ export class CollaborateursTableComponent implements OnInit { */ dateFin: Date = undefined; + + @Input() idReferent: string; + /** * Indiquer si il s'agit d'une recherche collaborateur, d'un recherche référentEP ou d'une recherche collaborateurEP d'un référent */ @@ -193,7 +196,7 @@ export class CollaborateursTableComponent implements OnInit { * Afficher les informations des collaborateursEP d'un référent */ updateCollaborateursEP() { - this.collaborateursDisponiblesSubscription = this.service.getCollaborateursByReferent(this.collaborateurConnecte.id, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe( + this.collaborateursDisponiblesSubscription = this.service.getCollaborateursByReferent(this.idReferent, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe( collaborateurs => { console.log(collaborateurs); this.dataSource = new MatTableDataSource(collaborateurs);}, err => console.log(err) );