Ajout des bons imports et d'une url pour la liste des criètes d'une formation

master
Yanaël GRETTE 5 years ago
parent 38856a04f9
commit c437ee83c4
  1. 9
      src/app/home/home.component.ts
  2. 2
      src/app/modeles/modele-formation.ts
  3. 4
      src/app/service/service-formation.ts
  4. 4
      src/app/utils/path-values-formations.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();
}
*/
}
}

@ -1,3 +1,5 @@
import { CollaborateurModel } from "./modele-collaborateur";
export class FormationModel {
idFormation? : number;
intitule? : string;

@ -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<CritereModel[]> {
let token = this.keycloakService.getKeycloakInstance().token;
const headers = { Authorization: "Bearer "+token };
return this.http.get<ThemeModel[]>(urlsFormation.urlCritere, {headers});
return this.http.get<CritereModel[]>(urlsFormation.urlCritere, {headers});
}
}

@ -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
};

Loading…
Cancel
Save