From 38856a04f9f951b86b26bf0c9420b5450bc32734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Wed, 24 Jun 2020 15:41:21 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20mod=C3=A8les=20et?= =?UTF-8?q?=20du=20service=20formation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/modeles/modele-collaborateur.ts | 7 +++-- src/app/modeles/modele-ep.ts | 38 ++++++++++++++++--------- src/app/modeles/modele-formation.ts | 27 +++++++++++++++--- src/app/service/service-ep.ts | 7 +++++ src/app/service/service-formation.ts | 16 +++++++++-- 5 files changed, 72 insertions(+), 23 deletions(-) diff --git a/src/app/modeles/modele-collaborateur.ts b/src/app/modeles/modele-collaborateur.ts index 75ac52b..1ed522f 100644 --- a/src/app/modeles/modele-collaborateur.ts +++ b/src/app/modeles/modele-collaborateur.ts @@ -1,9 +1,10 @@ -export class CollaborateurModel { - id? : number; +export interface CollaborateurModel { + idCollaborateur? : number; nom? : string; prenom? : string; mail? : string; agence? : string; - dateEmbauche? : Date; fonction? : string; + dateEmbauche? : Date; + dateDepart? : Date; }; diff --git a/src/app/modeles/modele-ep.ts b/src/app/modeles/modele-ep.ts index 02c78aa..8bcfaea 100644 --- a/src/app/modeles/modele-ep.ts +++ b/src/app/modeles/modele-ep.ts @@ -1,8 +1,9 @@ import { CollaborateurModel } from "./modele-collaborateur"; - +//PLUSIEURS REFERENT AVEC LE DROIT D'ECRITURE ?! export class EpModel { - id? : number; + idEp? : number; type? : string; + dateCreation? : Date; dateDisponibilite? : Date; dateSaisie? : Date; etat? : string; @@ -10,36 +11,47 @@ export class EpModel { dateEntretien? : Date; typeEntretien? : string; commentaireCommercial? : string; - rdvEntretien? : RDVEntretienModel; + rdvEntretien? : RDVEntretienModel[]; augmentationSalaire? : AugmentationSalaireModel; participants? : ParticipantModel[]; - engagement? : EngagementModel; collaborateur?: CollaborateurModel; - //TODO : ajouter contenu de base et contenu EPA quand il s'agit d'un EPA + referent?: CollaborateurModel; + engagement? : EngagementModel; + nbRappelSignature?: number; + notifications?: Notification[]; }; -export interface AugmentationSalaireModel { - idAugmentationSalaire? : number; +export class AugmentationSalaireModel { + idAugmentation? : number; nouveauSalaire? : number; - dateDemande? : number; + dateDemande? : Date; }; -export interface RDVEntretienModel { - idRDV? : number; +export class RDVEntretienModel { + idTypeEntretien? : number; typeEntretien? :string; dateEntretien? : Date; }; -export interface EngagementModel { +export class EngagementModel { idEngagement? : number; engagement? : string; dateLimie? : Date; accomplie? : boolean; }; -export interface ParticipantModel { - collaborateur : CollaborateurModel; +export class ParticipantModel { + idParticipant? : number; + collaborateur? : CollaborateurModel; role? : string; }; + +export class Notification { + idNotification? : number; + type? : string; + titre?: string; + description?: string; + lu?: boolean; +} diff --git a/src/app/modeles/modele-formation.ts b/src/app/modeles/modele-formation.ts index a716a6c..a5e8c55 100644 --- a/src/app/modeles/modele-formation.ts +++ b/src/app/modeles/modele-formation.ts @@ -1,5 +1,5 @@ export class FormationModel { - id? : number; + idFormation? : number; intitule? : string; dateDebut? : Date; dateFin? : Date; @@ -7,7 +7,7 @@ export class FormationModel { lieu? : string; duree? : number; organisme? : string; - nomFormateur : string; + nomFormateur? : string; }; @@ -17,7 +17,7 @@ export class DemandeFormationModel { statut? : string; libelle? : string; description? : string; - theme : ThemeModel; + theme? : ThemeModel; }; @@ -26,6 +26,25 @@ export interface ThemeModel { nom : string; }; + +export interface ParticipationFormationModel { + idParticipation : number; + formation : FormationModel; + collaborateur : CollaborateurModel; + evaluation : EvaluationFormationModel[]; +} + export class EvaluationFormationModel { - //TODO + note? : number; + commentaire?: string; + critere? : CritereModel; +} + + +export interface CritereModel { + idCritere?: number; + texte?: string; + type?: string; + ordre?: string; + section?: string; } diff --git a/src/app/service/service-ep.ts b/src/app/service/service-ep.ts index 5db0f56..48c7207 100644 --- a/src/app/service/service-ep.ts +++ b/src/app/service/service-ep.ts @@ -80,5 +80,12 @@ export class ServiceEP { return this.http.post(urlsEP.epi, null, { params, headers}); } + ajouterParticipant(idParticipant, idEp) { + //TODO + } + + deleguerEP(idNewRef, idEp){ + //TODO + } } diff --git a/src/app/service/service-formation.ts b/src/app/service/service-formation.ts index 96ac4ab..5c875a6 100644 --- a/src/app/service/service-formation.ts +++ b/src/app/service/service-formation.ts @@ -7,12 +7,16 @@ import { KeycloakService } from 'keycloak-angular'; import {FormationModel, DemandeFormationModel, EvaluationFormationModel, ThemeModel } from "../modeles/modele-formation"; import { urlsFormation } from "../utils/path-values-formations"; + + @Injectable({ providedIn : 'root' }) export class ServiceFormation { constructor(private http: HttpClient, private keycloakService : KeycloakService) {} + + listeFormations() : Observable { let token = this.keycloakService.getKeycloakInstance().token; const headers = { Authorization: "Bearer "+token }; @@ -20,11 +24,11 @@ export class ServiceFormation { } - listeFormationsCollaborateur(id) : Observable { + listeFormationsCollaborateur(id) : Observable { let token = this.keycloakService.getKeycloakInstance().token; const headers = { Authorization: "Bearer "+token }; let params = { idCollab : id }; - return this.http.get(urlsFormation.urlFormation, { params, headers }); + return this.http.get(urlsFormation.urlFormation, { params, headers }); } nouvelleFormation(formation) : Observable { @@ -36,7 +40,7 @@ export class ServiceFormation { return this.http.post(urlsFormation.newFormation, formation, {headers}); } - updateFormation(formation) : Observable { + updateFormation(formation) { let token = this.keycloakService.getKeycloakInstance().token; const headers = { Authorization: "Bearer "+token, @@ -86,4 +90,10 @@ export class ServiceFormation { return this.http.get(urlsFormation.urlTheme, {headers}); } + listeCritere() : Observable { + let token = this.keycloakService.getKeycloakInstance().token; + const headers = { Authorization: "Bearer "+token }; + return this.http.get(urlsFormation.urlCritere, {headers}); + } + }