Mise à jour des détails collaborateur et référent pour afficher les EP en cours et les EP passés

develop
Yanaël GRETTE 4 years ago
parent f1bd81022f
commit 8a5398658e
  1. 11
      src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.html
  2. 14
      src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts
  3. 2
      src/app/shared/mat-tables/ep-table/ep-table.html
  4. 50
      src/app/shared/mat-tables/ep-table/ep-table.ts
  5. 6
      src/app/shared/utils/cles.ts

@ -12,20 +12,23 @@
<mat-tab-group mat-align-tabs="start">
<mat-tab *ngIf="!estReferent" label="Liste des EP effectués">
<ep-table [rechercherParBU]="false" [rechercherParDate]="true" [typeRechercheEP]="epTypeRecherche.RechercheEPCollaborateursSignes" [displayedColumns]="displayedColumnsEPCollaborateur" [idCollaborateur]="idCollaborateur"></ep-table>
</mat-tab>
<mat-tab *ngIf="!estReferent" label="Liste des formations">
<participations-formation-table [participations]="participationsFormation" [displayedColumns]="this.displayedColumnsParticipationFormaton"></participations-formation-table>
<!-- <participations-formation-table [participations]="participationsFormation" [displayedColumns]="this.displayedColumnsParticipationFormaton"></participations-formation-table>-->
</mat-tab>
<mat-tab *ngIf="estReferent" label="Liste des collaborateurs">
<collaborateurs-table [rechercherParBU]="rechercherParBU" [rechercherParDate]="rechercherParDate" [displayedColumns]="displayedColumns" [typeRecherche]="typeRecherche" [idReferent]="idCollaborateur" (eventEmitter)="ouvrirDetailsCollaborateur($event)" ></collaborateurs-table>
<collaborateurs-table [rechercherParBU]="rechercherParBU" [rechercherParDate]="rechercherParDate" [displayedColumns]="displayedColumnsCollaborateurs" [typeRecherche]="typeRecherche" [idReferent]="idCollaborateur" (eventEmitter)="ouvrirDetailsCollaborateur($event)" ></collaborateurs-table>
</mat-tab>
<mat-tab *ngIf="estReferent" label="Liste des EP référent">
<mat-tab *ngIf="estReferent" label="Liste des EP en cours">
<ep-table [rechercherParBU]="false" [rechercherParDate]="true" [typeRechercheEP]="epTypeRecherche.RechercheEPReferentEnCours" [displayedColumns]="displayedColumnsEPReferent" [idCollaborateur]="idCollaborateur"></ep-table>
</mat-tab>
<mat-tab *ngIf="estReferent" label="Liste des EP en cours">
<mat-tab *ngIf="estReferent" label="Liste des EP référent">
<ep-table [rechercherParBU]="false" [rechercherParDate]="true" [typeRechercheEP]="epTypeRecherche.RechercheEPReferentSignes" [displayedColumns]="displayedColumnsEPReferent" [idCollaborateur]="idCollaborateur"></ep-table>
</mat-tab>
</mat-tab-group>

@ -1,7 +1,7 @@
import { Component, Input, OnInit } from "@angular/core";
import { CollaborateurDTO, CollaborateursService, ParticipationFormationDTO, ParticipationsFormationsService } from "@shared/api-swagger";
import { Subscription } from "rxjs";
import { collaborateurTypeRecherche } from "@shared/utils/cles";
import { collaborateurTypeRecherche, epTypeRecherche } from "@shared/utils/cles";
import { MatDialog } from "@angular/material/dialog";
import { DialogAssignationRapideReferentComponent, DialogAssignationRapideCollaborateursComponent } from "./dialog-assignation-rapide/dialog-assignation-rapide.component";
import { Router } from "@angular/router";
@ -18,9 +18,19 @@ export class AffichageDetailsCollaborateurComponent implements OnInit{
typeRecherche : string = collaborateurTypeRecherche.collaborateursEP;
displayedColumns : string[] = ["businessunit", "collaborateur", "datearrivee"];
epTypeRecherche : any = epTypeRecherche;
displayedColumnsCollaborateurs : string[] = ["businessunit", "collaborateur", "datearrivee"];
displayedColumnsEPReferent : string[] = ["agence", "collaborateur", "datearrivee", "typeep", "statutep", "dateentretien" ];
displayedColumnsParticipationFormaton: string[]= ["intitule", "statut", "dateCreation", "ep", "evaluation"];
displayedColumnsEPCollaborateur: string[] = ["agence", "referent", "typeep", "statutep", "dateentretien" ];
rechercherParBU: boolean = false;
rechercherParDate: boolean= false;
collaborateur: CollaborateurDTO = undefined;

@ -93,7 +93,7 @@
</ng-container>
<ng-container matColumnDef="dateentretien">
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Date prévisionnelle</mat-header-cell>
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Date entretien</mat-header-cell>
<mat-cell *matCellDef="let row"> {{ row.datePrevisionnelle | date : 'dd/MM/yyyy'}} </mat-cell>
</ng-container>

@ -63,6 +63,8 @@ export class EpTableComponent implements OnInit{
dataSource : MatTableDataSource<EpInformationDTO>;
@Input() idCollaborateur : string;
@Input() typeRechercheEP : string;
@Input() displayedColumns: string[];
@ -98,10 +100,52 @@ export class EpTableComponent implements OnInit{
this.getEPEnCours();
break;
case epTypeRecherche.EPSignes:
this.getEPEnSignes();
this.getEPSignes();
break;
case epTypeRecherche.RechercheEPReferentEnCours:
this.getEPEnCoursReferent();
break;
case epTypeRecherche.RechercheEPReferentSignes:
this.getEPSignesReferent();
break;
case epTypeRecherche.RechercheEPCollaborateursSignes:
this.getEpsignesCollaborateur();
break;
}
}
getEpsignesCollaborateur() {
this.epSubscription = this.epService.getEPSignesCollaborateur(this.idCollaborateur).subscribe(
eps => this.dataSource = new MatTableDataSource(eps),
err => console.log(err),
);
}
getEPSignesReferent() {
this.epSubscription = this.epService.getEPSignesReferent(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri, this.dateDebut, this.dateFin).subscribe(
eps => {
this.dataSource = new MatTableDataSource(eps);
this.epCountSubscription = this.epService.getEPSignesReferentCount(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri, this.dateDebut, this.dateFin).subscribe(
count => this.taille = count,
err => console.log(err)
);
},
err => console.log(err)
);
}
getEPEnCoursReferent() {
this.epSubscription = this.epService.getEPEnCoursReferent(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri, true, this.dateDebut, this.dateFin ).subscribe(
eps => {
this.dataSource = new MatTableDataSource(eps);
this.epCountSubscription = this.epService.getEPSignesReferentCount(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri, this.dateDebut, this.dateFin ).subscribe(
count => this.taille = count,
err => console.log(err)
);
},
err => console.log(err)
);
}
getEPEnCours() {
@ -128,7 +172,7 @@ export class EpTableComponent implements OnInit{
return estEnAttente(statut);
}
getEPEnSignes() {
getEPSignes() {
this.epSubscription = this.epService.getEPSignes(this.busIds, this.asc, this.numPage, this.parPage, this.search, this.tri, this.dateDebut, this.dateFin).subscribe(
eps => {
console.log(eps);

@ -16,5 +16,9 @@ export const engagementTypeRecherche = {
export const epTypeRecherche = {
EPEnCours: "EPEnCours",
EPSignes: "EPSignes"
EPSignes: "EPSignes",
RechercheEPReferentEnCours : "RechercheEPReferentEnCours",
RechercheEPReferentSignes : "RechercheEPReferentEnSignes",
RechercheEPCollaborateursSignes : "RechercheEPCollaborateursSignes"
}
Loading…
Cancel
Save