|
|
@ -9,7 +9,6 @@ import {MatSort} from '@angular/material/sort'; |
|
|
|
|
|
|
|
|
|
|
|
import { FormationsService } from '@shared/api-swagger/api/api'; |
|
|
|
import { FormationsService } from '@shared/api-swagger/api/api'; |
|
|
|
import { FormationModel } from "@shared/api-swagger/model/models"; |
|
|
|
import { FormationModel } from "@shared/api-swagger/model/models"; |
|
|
|
|
|
|
|
|
|
|
|
import { DisplayParticipation } from "@shared/displayInfo/displays"; |
|
|
|
import { DisplayParticipation } from "@shared/displayInfo/displays"; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -19,6 +18,7 @@ import { DisplayParticipation } from "@shared/displayInfo/displays"; |
|
|
|
templateUrl: './formation.component.html' |
|
|
|
templateUrl: './formation.component.html' |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class FormationComponent implements OnInit { |
|
|
|
export class FormationComponent implements OnInit { |
|
|
|
|
|
|
|
statutEnum = FormationModel.StatutEnum; |
|
|
|
formation:FormationModel; |
|
|
|
formation:FormationModel; |
|
|
|
dateTexte:string = "Prévue le"; |
|
|
|
dateTexte:string = "Prévue le"; |
|
|
|
formationSubscription: Subscription; |
|
|
|
formationSubscription: Subscription; |
|
|
@ -39,11 +39,11 @@ export class FormationComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
initFormation(formation:FormationModel) { |
|
|
|
initFormation(formation:FormationModel) { |
|
|
|
this.formation = formation; |
|
|
|
this.formation = formation; |
|
|
|
if(this.formation.statut == 2) { |
|
|
|
if(this.formation.statut == FormationModel.StatutEnum.Realise) { |
|
|
|
this.dateTexte = "Effecutée le"; |
|
|
|
this.dateTexte = "Effecutée le"; |
|
|
|
this.displayedColumns.push("evaluation"); |
|
|
|
this.displayedColumns.push("evaluation"); |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.formation.statut == 3) { |
|
|
|
if(this.formation.statut == FormationModel.StatutEnum.Annule) { |
|
|
|
this.dateTexte = "Initialement prévue le"; |
|
|
|
this.dateTexte = "Initialement prévue le"; |
|
|
|
} |
|
|
|
} |
|
|
|
if(formation.participantsFormation != undefined && formation.participantsFormation.length != 0 ) { |
|
|
|
if(formation.participantsFormation != undefined && formation.participantsFormation.length != 0 ) { |
|
|
@ -72,6 +72,7 @@ export class FormationComponent implements OnInit { |
|
|
|
this.dataSource = new MatTableDataSource(this.participationsDisplay); |
|
|
|
this.dataSource = new MatTableDataSource(this.participationsDisplay); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
getStatut(statut:number) { |
|
|
|
getStatut(statut:number) { |
|
|
|
let value =""; |
|
|
|
let value =""; |
|
|
|
switch(statut) { |
|
|
|
switch(statut) { |
|
|
@ -90,7 +91,7 @@ export class FormationComponent implements OnInit { |
|
|
|
} |
|
|
|
} |
|
|
|
return value; |
|
|
|
return value; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
ngOnDestroy() { |
|
|
|
ngOnDestroy() { |
|
|
|
if(this.formationSubscription != undefined) { |
|
|
|
if(this.formationSubscription != undefined) { |
|
|
|
this.formationSubscription.unsubscribe(); |
|
|
|
this.formationSubscription.unsubscribe(); |
|
|
|