From c437ee83c479a225ad0b15e42341fd425a777564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Wed, 24 Jun 2020 15:54:46 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20bons=20imports=20et=20d'une=20url?= =?UTF-8?q?=20pour=20la=20liste=20des=20cri=C3=A8tes=20d'une=20formation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/home/home.component.ts | 9 +++++---- src/app/modeles/modele-formation.ts | 2 ++ src/app/service/service-formation.ts | 4 ++-- src/app/utils/path-values-formations.ts | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 8bf9b05..b5097ef 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -31,16 +31,18 @@ export class HomeComponent implements OnInit { private listeCollaborateurs : CollaborateurModel[]; private formationSubscription : Subscription; private addFormationSubscription : Subscription; - */ + private epEnvoieSubscription : Subscription; private epCollaborateurSubscription : Subscription; private epDisponiblesSubscription : Subscription; private epCollaborateurProchain : Subscription; + + //*/ constructor(public keycloakService : KeycloakService, private serviceCollaborateur : ServiceCollaborateur, private serviceFormation : ServiceFormation, private serviceEP : ServiceEP) { //********TEST********// - let ep = new EpModel(); + /*let ep = new EpModel(); ep.id = 10; ep.type ="EPA"; //ep.dateDisponibilite = new Date(2020,0,5,25,30); @@ -117,7 +119,6 @@ export class HomeComponent implements OnInit { if(this.addFormationSubscription != null) { this.addFormationSubscription.unsubscribe(); } - */ if(this.epEnvoieSubscription != null) { this.epEnvoieSubscription.unsubscribe(); } @@ -130,7 +131,7 @@ export class HomeComponent implements OnInit { if(this.epCollaborateurProchain != null) { this.epCollaborateurProchain.unsubscribe(); } - + */ } } diff --git a/src/app/modeles/modele-formation.ts b/src/app/modeles/modele-formation.ts index a5e8c55..58769b8 100644 --- a/src/app/modeles/modele-formation.ts +++ b/src/app/modeles/modele-formation.ts @@ -1,3 +1,5 @@ +import { CollaborateurModel } from "./modele-collaborateur"; + export class FormationModel { idFormation? : number; intitule? : string; diff --git a/src/app/service/service-formation.ts b/src/app/service/service-formation.ts index 5c875a6..c91a3b4 100644 --- a/src/app/service/service-formation.ts +++ b/src/app/service/service-formation.ts @@ -4,7 +4,7 @@ import { Observable } from "rxjs"; import { KeycloakService } from 'keycloak-angular'; -import {FormationModel, DemandeFormationModel, EvaluationFormationModel, ThemeModel } from "../modeles/modele-formation"; +import {FormationModel, DemandeFormationModel, EvaluationFormationModel, ThemeModel, CritereModel, ParticipationFormationModel } from "../modeles/modele-formation"; import { urlsFormation } from "../utils/path-values-formations"; @@ -93,7 +93,7 @@ export class ServiceFormation { listeCritere() : Observable { let token = this.keycloakService.getKeycloakInstance().token; const headers = { Authorization: "Bearer "+token }; - return this.http.get(urlsFormation.urlCritere, {headers}); + return this.http.get(urlsFormation.urlCritere, {headers}); } } diff --git a/src/app/utils/path-values-formations.ts b/src/app/utils/path-values-formations.ts index 68b8954..39b5271 100644 --- a/src/app/utils/path-values-formations.ts +++ b/src/app/utils/path-values-formations.ts @@ -10,6 +10,7 @@ const evaluerFormation = urlFormation+"/evaluer"; const evaluationCollaborateur = urlFormation+"/collaborateur"; const urlDemandesFormation = urlFormation+"/demandesFormation"; const urlTheme = urlFormation+"/themes"; +const urlCritere = urlFormation+"/criteres"; export const urlsFormation = { urlFormation, @@ -19,5 +20,6 @@ export const urlsFormation = { evaluerFormation, evaluationCollaborateur, urlDemandesFormation, - urlTheme + urlTheme, + urlCritere };