diff --git a/src/app/ep/details-ep/details-ep.component.html b/src/app/ep/details-ep/details-ep.component.html index a9ecfef..6102c39 100644 --- a/src/app/ep/details-ep/details-ep.component.html +++ b/src/app/ep/details-ep/details-ep.component.html @@ -49,10 +49,10 @@ - + - + @@ -60,14 +60,15 @@ - + - + - + + diff --git a/src/app/ep/details-ep/details-ep.component.ts b/src/app/ep/details-ep/details-ep.component.ts index a3a0b0d..bc9575c 100644 --- a/src/app/ep/details-ep/details-ep.component.ts +++ b/src/app/ep/details-ep/details-ep.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; -import { affichageStatut, EpDTO, EpService, StatutEp } from "@shared/api-swagger"; +import { affichageStatut, EpDTO, EpService, StatutEp, estEPEnCours, estEPSigne, estEPEnAttenteSignatureCollaborateur, estEPEffectue } from "@shared/api-swagger"; import { AuthService } from "@shared/auth/auth.service"; import { Role } from "@shared/utils/roles"; import { Subscription } from "rxjs"; @@ -38,7 +38,21 @@ export class DetailsEPComponent implements OnInit { ); } + afficherDemandesFormationEtEngagements() { + return estEPSigne(this.ep.statut) || estEPEnAttenteSignatureCollaborateur(this.ep.statut); + } + afficherTypeEP(statutEP: StatutEp) { return affichageStatut(statutEP); } + + + afficherChoixDates() { + return this.ep.statut == StatutEp.DatesProposees; + } + + epNonEffectue() { + return estEPEnCours(this.ep.statut) && !estEPEnAttenteSignatureCollaborateur(this.ep.statut) && !estEPEffectue(this.ep.statut); + } + } \ No newline at end of file diff --git a/src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.html b/src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.html index 7755c66..69bf891 100644 --- a/src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.html +++ b/src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.html @@ -1,2 +1,2 @@

Aucune demande de formation

- \ No newline at end of file + \ No newline at end of file diff --git a/src/app/ep/details-ep/ep-engagements/ep-engagements.component.html b/src/app/ep/details-ep/ep-engagements/ep-engagements.component.html index 9cd3df8..4bca14c 100644 --- a/src/app/ep/details-ep/ep-engagements/ep-engagements.component.html +++ b/src/app/ep/details-ep/ep-engagements/ep-engagements.component.html @@ -1,8 +1,8 @@ - +

Aucun engagements pris

- + diff --git a/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.html b/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.html deleted file mode 100644 index 8aff52c..0000000 --- a/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -

New participant

diff --git a/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.ts b/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.ts deleted file mode 100644 index e8232e3..0000000 --- a/src/app/ep/details-ep/ep-participants/new-participant/new-participant.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -/** - * Composant permettant l'ajout d'un participant à un EP - * Ce composant pourrait être remplacé par un dialog de material angular - */ -@Component({ - selector: 'app-new-participant', - templateUrl: './new-participant.component.html' -}) -export class NewParticipantComponent implements OnInit { - - constructor() {} - - ngOnInit() { - } -} diff --git a/src/app/shared/api-swagger/model/statutEp.ts b/src/app/shared/api-swagger/model/statutEp.ts index e490643..1537c12 100644 --- a/src/app/shared/api-swagger/model/statutEp.ts +++ b/src/app/shared/api-swagger/model/statutEp.ts @@ -40,6 +40,18 @@ export function estEPEnCours (statut:StatutEp) { return statut != StatutEp.Annule && statut != StatutEp.Cree && statut != StatutEp.Rejete && statut != StatutEp.Signe } +export function estEPEffectue(statut: StatutEp) { + return statut == StatutEp.Effectue; +} + +export function estEPEnAttenteSignatureCollaborateur(statut: StatutEp) { + return statut == StatutEp.SignatureReferent; +} + +export function estEPSigne( statut : StatutEp) { + return statut == StatutEp.Signe; +} + export function affichageStatut(statut: StatutEp) { switch(statut) { case StatutEp.Cree: