|
|
|
@ -1,4 +1,6 @@ |
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
import { Component } from '@angular/core'; |
|
|
|
|
import { Router } from '@angular/router'; |
|
|
|
|
import { epTypeRecherche } from '@shared/utils/cles'; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Composant qui permet la consultation d'un EP |
|
|
|
@ -7,10 +9,27 @@ import { Component, OnInit } from '@angular/core'; |
|
|
|
|
selector: 'app-ep', |
|
|
|
|
templateUrl: './ep.component.html' |
|
|
|
|
}) |
|
|
|
|
export class EpComponent implements OnInit { |
|
|
|
|
export class EpComponent { |
|
|
|
|
displayedColumns: string[] = ["agence", "collaborateur", "referent", "datearrivee", "statutep", "typeep", "dateentretien", "consultation"]; |
|
|
|
|
|
|
|
|
|
typeRechercheEP : string = epTypeRecherche.EPSignes; |
|
|
|
|
|
|
|
|
|
constructor() {} |
|
|
|
|
constructor(private router: Router){} |
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|
|
|
|
|
|
eventEmitter(event: any) { |
|
|
|
|
switch(event.type) { |
|
|
|
|
case "collaborateur": |
|
|
|
|
if(event.ep.collaborateur != undefined) |
|
|
|
|
this.router.navigate(["/collaborateurs", event.ep.collaborateur.id]) |
|
|
|
|
break; |
|
|
|
|
case "referent": |
|
|
|
|
if(event.ep.referent != undefined) |
|
|
|
|
this.router.navigate(["/referents", event.ep.referent.id]) |
|
|
|
|
break; |
|
|
|
|
case "ep": |
|
|
|
|
this.router.navigate(["/ep", event.ep.id]); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|