|
|
|
@ -29,7 +29,7 @@ export class HomeRHComponent implements OnInit { |
|
|
|
|
private formationsDisponiblesSubscription : Subscription; |
|
|
|
|
|
|
|
|
|
//displayedColumns: string[] = ["intitule", "participants", "date", "origine", "statut"]
|
|
|
|
|
displayedColumns: string[] = ["intitule", "participants", "date", "statut"] |
|
|
|
|
displayedColumns: string[] = ["intitule", "origine", "participants", "date", "statut"] |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* source pour l'affichage des formations dans le tableau qui est affichée. |
|
|
|
@ -59,14 +59,13 @@ export class HomeRHComponent implements OnInit { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
|
this.formationsDisponiblesSubscription = this.service.getFormations(undefined, 1).subscribe( |
|
|
|
|
this.formationsDisponiblesSubscription = this.service.getProchainesFormation(undefined, 1).subscribe( |
|
|
|
|
formations => this.initFormations(formations) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
initFormations(formations:FormationModel[]) { |
|
|
|
|
this.formationsDisponibles = []; |
|
|
|
|
console.log(formations); |
|
|
|
|
let formationDisplay : DisplayFormation; |
|
|
|
|
for(let formation of formations) { |
|
|
|
|
formationDisplay = new DisplayFormation(); |
|
|
|
@ -87,28 +86,6 @@ export class HomeRHComponent implements OnInit { |
|
|
|
|
this.dataSource.sort = this.sort; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStatut(statut:number) { |
|
|
|
|
|
|
|
|
|
let value =""; |
|
|
|
|
switch(statut) { |
|
|
|
|
case 0: |
|
|
|
|
value = "Plannifiée"; |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
value = "Replannifiée"; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
value = "Réalisée"; |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
value = "Annulée"; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnDestroy() { |
|
|
|
|
if(this.formationsDisponiblesSubscription != undefined) { |
|
|
|
|
this.formationsDisponiblesSubscription.unsubscribe(); |
|
|
|
|