From 44419110263bb1cf5fa7ce1693d6b02efa4d7c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yana=C3=ABl=20GRETTE?= Date: Tue, 8 Dec 2020 12:27:04 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20services=20de=20l'?= =?UTF-8?q?api=20swagger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collaborateurs.component.ts | 2 +- .../details-collaborateur.component.ts | 2 +- .../formation.component.html | 4 +- src/app/formations/formations.component.ts | 28 +- .../new-formation/new-formation.component.ts | 2 +- .../home-assistante.component.ts | 4 +- src/app/home/home-rh/home-rh.component.ts | 4 +- .../details-referent.component.ts | 6 +- src/app/referents/referents.component.ts | 8 +- src/app/shared/api-swagger/api.module.ts | 8 +- src/app/shared/api-swagger/api/api.ts | 6 +- .../api-swagger/api/collaborateurs.service.ts | 334 +++++-- .../api/demandesDelegation.service.ts | 146 +-- .../api-swagger/api/demandesEPI.service.ts | 320 ++++--- .../api/demandesformation.service.ts | 292 +++--- .../api-swagger/api/engagements.service.ts | 208 ++-- src/app/shared/api-swagger/api/ep.service.ts | 896 +++++++++++++----- .../api-swagger/api/formations.service.ts | 358 ++----- .../shared/api-swagger/api/notes.service.ts | 255 ++--- .../api/participationsFormations.service.ts | 166 +--- .../api-swagger/api/referents.service.ts | 337 ------- .../api-swagger/api/referentsEP.service.ts | 177 ++++ 22 files changed, 1723 insertions(+), 1840 deletions(-) delete mode 100644 src/app/shared/api-swagger/api/referents.service.ts create mode 100644 src/app/shared/api-swagger/api/referentsEP.service.ts diff --git a/src/app/collaborateurs/collaborateurs.component.ts b/src/app/collaborateurs/collaborateurs.component.ts index c1b4a1b..35e79e1 100644 --- a/src/app/collaborateurs/collaborateurs.component.ts +++ b/src/app/collaborateurs/collaborateurs.component.ts @@ -93,7 +93,7 @@ export class CollaborateursComponent implements OnInit { */ updateDataSource() { //récupérer la liste des collaborateur et mettre à jour le tableau - this.collaborateursDisponiblesSubscription = this.service.getCollaborateurs(this.asc, this.numPage, this.parPage, this.roles, undefined, undefined, this.search, this.tri).subscribe( + this.collaborateursDisponiblesSubscription = this.service.getCollaborateurs(this.roles,[1],this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe( collaborateurs => { console.log(collaborateurs); this.dataSource = new MatTableDataSource(collaborateurs);}, err => console.log(err) ); diff --git a/src/app/collaborateurs/details-collaborateur/details-collaborateur.component.ts b/src/app/collaborateurs/details-collaborateur/details-collaborateur.component.ts index cf7dc30..440919c 100644 --- a/src/app/collaborateurs/details-collaborateur/details-collaborateur.component.ts +++ b/src/app/collaborateurs/details-collaborateur/details-collaborateur.component.ts @@ -110,7 +110,7 @@ export class DetailsCollaborateurComponent implements OnInit { * La fonction est aussi appelé au début du chargement et à l'utilisation de la barre de recherche. */ updateEP() { - this.epSubscription = this.epService.getEPByCollaborateur(this.asc, this.idCollaborateur, this.numPage, this.parPage, undefined, this.search, this.tri).subscribe( + this.epSubscription = this.epService.getEPSignesCollaborateur(this.idCollaborateur).subscribe( ep => { console.log(ep); diff --git a/src/app/formations/details-formation/formation.component.html b/src/app/formations/details-formation/formation.component.html index 8587b2e..efda79c 100644 --- a/src/app/formations/details-formation/formation.component.html +++ b/src/app/formations/details-formation/formation.component.html @@ -16,13 +16,13 @@

Type formation : {{ formation.type.libelle}}

- +

Aucun participant

- +

Liste des participants

diff --git a/src/app/formations/formations.component.ts b/src/app/formations/formations.component.ts index 3959b83..6635e80 100644 --- a/src/app/formations/formations.component.ts +++ b/src/app/formations/formations.component.ts @@ -85,30 +85,10 @@ export class FormationsComponent implements OnInit { } updateDataSource() { - switch ((this.etat)) { - case 0: - this.formationsDisponiblesSubscription = this.service.getFormations(this.asc,this.numPage, this.parPage, 1, undefined, this.search, this.tri).subscribe( - formations => this.dataSource = new MatTableDataSource(formations), - err => console.log(err) - ); - break; - - case 1: - this.formationsDisponiblesSubscription = this.service.getFormationRealisee(this.asc,this.numPage, this.parPage, 1, this.search, this.tri).subscribe( - formations => this.dataSource = new MatTableDataSource(formations), - err => console.log(err) - ); - break; - case 2: - this.formationsDisponiblesSubscription = this.service.getFormationAnnulees(this.asc,this.numPage, this.parPage, 1, this.search, this.tri).subscribe( - formations => this.dataSource = new MatTableDataSource(formations), - err => console.log(err) - ); - break; - default: - break; - } - + this.formationsDisponiblesSubscription = this.service.getFormations(1,[1,2,3,4], this.asc,this.numPage, this.parPage, this.search, this.tri).subscribe( + formations => this.dataSource = new MatTableDataSource(formations), + err => console.log(err) + ); //this.dataSource.paginator = this.paginator; //this.dataSource.sort = this.sort; } diff --git a/src/app/formations/new-formation/new-formation.component.ts b/src/app/formations/new-formation/new-formation.component.ts index 39a1553..2a6393d 100644 --- a/src/app/formations/new-formation/new-formation.component.ts +++ b/src/app/formations/new-formation/new-formation.component.ts @@ -103,7 +103,7 @@ export class NewFormationComponent implements OnInit { } ajouterFormation() { - this.formationSubscription = this.service.ajouterFormation(this.formationForm.value).subscribe( + this.formationSubscription = this.service.addFormation(this.formationForm.value).subscribe( response => { console.log(response); this.router.navigate(['/formations',response["id"]]); diff --git a/src/app/home/home-assistante/home-assistante.component.ts b/src/app/home/home-assistante/home-assistante.component.ts index c2c57b2..bad3792 100644 --- a/src/app/home/home-assistante/home-assistante.component.ts +++ b/src/app/home/home-assistante/home-assistante.component.ts @@ -51,7 +51,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit { * * En fonction de son utilisation, pourrait remplacer "choixBU". */ - idsBU : number[] = []; + idsBU : number[] = [1]; taille = 100; @@ -110,7 +110,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit { ngAfterViewInit(){} updateDataSource() { - this.epDisponiblesSubscription = this.service.getEPEnCours(this.asc, this.numPage, this.parPage, 1, this.choixBU, this.search, this.tri). + this.epDisponiblesSubscription = this.service.getEPEnCours(this.idsBU, this.asc, this.numPage, this.parPage, this.search, this.tri). subscribe(eps => { this.dataSource = new MatTableDataSource(eps); diff --git a/src/app/home/home-rh/home-rh.component.ts b/src/app/home/home-rh/home-rh.component.ts index e5f2f53..6cf56ec 100644 --- a/src/app/home/home-rh/home-rh.component.ts +++ b/src/app/home/home-rh/home-rh.component.ts @@ -93,13 +93,13 @@ export class HomeRHComponent implements OnInit { updateFormations() { console.log(this.numPage); console.log(this.parPage); - this.formationsDisponiblesSubscription = this.service.getProchainesFormation(this.asc, this.numPage, this.parPage, 1, this.search, this.tri).subscribe( + this.formationsDisponiblesSubscription = this.service.getFormations(1,[1,2],this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe( formations => this.dataSource = new MatTableDataSource(formations), err => console.log(err) ) } - estCertifiee(certifiee) { + estCertifiee(certifiee: boolean) { if(certifiee) return "Oui"; return "Non"; diff --git a/src/app/referents/details-referent/details-referent.component.ts b/src/app/referents/details-referent/details-referent.component.ts index 500c587..8fd3761 100644 --- a/src/app/referents/details-referent/details-referent.component.ts +++ b/src/app/referents/details-referent/details-referent.component.ts @@ -7,7 +7,7 @@ import {MatTableDataSource} from '@angular/material/table'; import {MatPaginator} from '@angular/material/paginator'; import {MatSort} from '@angular/material/sort'; -import { ReferentsService, EpService } from "@shared/api-swagger/api/api"; +import { CollaborateursService, EpService } from "@shared/api-swagger/api/api"; import { CollaborateurDTO, EpDTO } from "@shared/api-swagger/model/models"; @@ -23,12 +23,12 @@ export class DetailsReferentComponent implements OnInit { idReferent : any; - constructor(private service:ReferentsService, private route: ActivatedRoute) {} + constructor(private service:CollaborateursService, private route: ActivatedRoute) {} ngOnInit() { this.idReferent = this.route.snapshot.paramMap.get("id"); - this.referentSubscription = this.service.getReferentById(this.idReferent).subscribe( + this.referentSubscription = this.service.getCollaborateurById(this.idReferent).subscribe( referent => this.initReferent(referent[0]), err => console.log(err) ) diff --git a/src/app/referents/referents.component.ts b/src/app/referents/referents.component.ts index a61ed05..8b8f268 100644 --- a/src/app/referents/referents.component.ts +++ b/src/app/referents/referents.component.ts @@ -6,7 +6,7 @@ import {MatTableDataSource} from '@angular/material/table'; import {MatPaginator} from '@angular/material/paginator'; import {MatSort} from '@angular/material/sort'; -import { ReferentsService } from "@shared/api-swagger/api/api"; +import { CollaborateursService } from "@shared/api-swagger/api/api"; import { CollaborateurDTO } from "@shared/api-swagger/model/models"; @@ -52,7 +52,7 @@ export class ReferentsComponent implements OnInit { /** * Liste des rôles pour préciser que l'on souhaite récupérer les commerciaux */ - roles : string[] = ["Commercial"]; + roles : string[] = ["referent"]; /** * contenu de la recherche. */ @@ -76,7 +76,7 @@ export class ReferentsComponent implements OnInit { */ chargement = true; - constructor(private service: ReferentsService) {} + constructor(private service: CollaborateursService) {} ngOnInit() { this.updateDataSource(); @@ -87,7 +87,7 @@ export class ReferentsComponent implements OnInit { * Devra se faire à l'ouverture de la page, au changement de page ou du nombre d'éléments à afficher, au moment d'un tri ou encore lors de l'utilisation de la barre de recherche. */ updateDataSource() { - this.referentsDisponiblesSubscription = this.service.getReferents(this.asc, this.numPage, this.parPage, this.roles, 1, undefined, this.search, this.tri).subscribe( + this.referentsDisponiblesSubscription = this.service.getCollaborateurs(this.roles,[1],this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe( referents => this.dataSource = new MatTableDataSource(referents), err => console.log(err) ); diff --git a/src/app/shared/api-swagger/api.module.ts b/src/app/shared/api-swagger/api.module.ts index 7ab974c..ecba8cd 100644 --- a/src/app/shared/api-swagger/api.module.ts +++ b/src/app/shared/api-swagger/api.module.ts @@ -12,12 +12,8 @@ import { EpService } from './api/ep.service'; import { FormationsService } from './api/formations.service'; import { NotesService } from './api/notes.service'; import { ParticipationsFormationsService } from './api/participationsFormations.service'; -import { ReferentsService } from './api/referents.service'; +import { ReferentsEPService } from './api/referentsEP.service'; -/** - * Module généré par SwaggerHub à partir de la spécification OpenAPI. - * Lien spécification : https://app.swaggerhub.com/apis/ygrette/api-du_serveur_de_lapplication_de_digitalisation_des_ep/1.3.5 - */ @NgModule({ imports: [], declarations: [], @@ -32,7 +28,7 @@ import { ReferentsService } from './api/referents.service'; FormationsService, NotesService, ParticipationsFormationsService, - ReferentsService ] + ReferentsEPService ] }) export class ApiModule { public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { diff --git a/src/app/shared/api-swagger/api/api.ts b/src/app/shared/api-swagger/api/api.ts index e4225b0..1b6a79b 100644 --- a/src/app/shared/api-swagger/api/api.ts +++ b/src/app/shared/api-swagger/api/api.ts @@ -16,6 +16,6 @@ export * from './notes.service'; import { NotesService } from './notes.service'; export * from './participationsFormations.service'; import { ParticipationsFormationsService } from './participationsFormations.service'; -export * from './referents.service'; -import { ReferentsService } from './referents.service'; -export const APIS = [CollaborateursService, DemandesDelegationService, DemandesEPIService, DemandesFormationService, EngagementsService, EpService, FormationsService, NotesService, ParticipationsFormationsService, ReferentsService]; +export * from './referentsEP.service'; +import { ReferentsEPService } from './referentsEP.service'; +export const APIS = [CollaborateursService, DemandesDelegationService, DemandesEPIService, DemandesFormationService, EngagementsService, EpService, FormationsService, NotesService, ParticipationsFormationsService, ReferentsEPService]; diff --git a/src/app/shared/api-swagger/api/collaborateurs.service.ts b/src/app/shared/api-swagger/api/collaborateurs.service.ts index e1205c7..a10f9a9 100644 --- a/src/app/shared/api-swagger/api/collaborateurs.service.ts +++ b/src/app/shared/api-swagger/api/collaborateurs.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -27,7 +27,7 @@ import { Configuration } from '../configurat @Injectable() export class CollaborateursService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -57,9 +57,9 @@ export class CollaborateursService { /** - * - * Récupérer un collaboratuer par son id - * @param idCollaborateur id collaborateur + * + * Récupérer un collaborateur par son id. + * @param idCollaborateur Id du collaborateur * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -105,9 +105,9 @@ export class CollaborateursService { } /** - * - * Récupérer un collaborateur par son mail - * @param mail mail de l'utilisateur connecté (mail obtenu via le token Keycloak) + * + * Récupérer un collaborateur par son mail. + * @param mail Mail de l'utilisateur connecté (mail obtenu via le token Keycloak) * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -142,7 +142,7 @@ export class CollaborateursService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/collaborateurs/mail/${encodeURIComponent(String(mail))}`, + return this.httpClient.request('get',`${this.basePath}/collaborateurs/${encodeURIComponent(String(mail))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -153,35 +153,28 @@ export class CollaborateursService { } /** - * - * Récupérer la liste des collaborateurs - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param fonctions Liste des fonctions des collaborateurs que l'on veut récupérer - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param idBU id de la business unit à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer une liste de collaborateurs. + * @param roles Liste des rôles auquels appartiennent les collaborateurs (e.g [”CP”, ”Commerciaux”,”RA”]) + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getCollaborateurs(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getCollaborateurs(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCollaborateurs(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCollaborateurs(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getCollaborateurs(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getCollaborateurs(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCollaborateurs(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCollaborateurs(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getCollaborateurs.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getCollaborateurs.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getCollaborateurs.'); - } @@ -189,19 +182,18 @@ export class CollaborateursService { let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (fonctions) { - fonctions.forEach((element) => { - queryParameters = queryParameters.append('fonctions', element); + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles', element); }) } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) } - if (idBU !== undefined && idBU !== null) { - queryParameters = queryParameters.set('idBU', idBU); + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); @@ -215,6 +207,12 @@ export class CollaborateursService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -250,41 +248,197 @@ export class CollaborateursService { } /** - * - * Récupérer la liste des collaborateurs dont le référent à la charge - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des collaborateurs d’un référent. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getCollaborateursByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getCollaborateursByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getCollaborateursByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getCollaborateursByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getCollaborateursByReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getCollaborateursByReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getCollaborateursByReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getCollaborateursByReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling getCollaborateursByReferent.'); + } + + + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } + if (numPage !== undefined && numPage !== null) { + queryParameters = queryParameters.set('numPage', numPage); + } + if (parPAge !== undefined && parPAge !== null) { + queryParameters = queryParameters.set('parPAge', parPAge); + } + if (texte !== undefined && texte !== null) { + queryParameters = queryParameters.set('texte', texte); + } + if (tri !== undefined && tri !== null) { + queryParameters = queryParameters.set('tri', tri); + } + + let headers = this.defaultHeaders; - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getCollaborateursByReferent.'); + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request>('get',`${this.basePath}/collaborateurs/referent/${encodeURIComponent(String(idReferent))}`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total de collaborateurs d’un référent. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborateursByReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable; + public getCollaborateursByReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getCollaborateursByReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getCollaborateursByReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getCollaborateursByReferent.'); + throw new Error('Required parameter idReferent was null or undefined when calling getCollaborateursByReferentCount.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getCollaborateursByReferent.'); + + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } + if (numPage !== undefined && numPage !== null) { + queryParameters = queryParameters.set('numPage', numPage); + } + if (parPAge !== undefined && parPAge !== null) { + queryParameters = queryParameters.set('parPAge', parPAge); + } + if (texte !== undefined && texte !== null) { + queryParameters = queryParameters.set('texte', texte); + } + if (tri !== undefined && tri !== null) { + queryParameters = queryParameters.set('tri', tri); } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getCollaborateursByReferent.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('get',`${this.basePath}/collaborateurs/referent/${encodeURIComponent(String(idReferent))}/count`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total de collaborateurs. + * @param roles Liste des rôles auquels appartiennent les collaborateurs (e.g [”CP”, ”Commerciaux”,”RA”]) + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborateursCount(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getCollaborateursCount(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getCollaborateursCount(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getCollaborateursCount(roles?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (roles) { + roles.forEach((element) => { + queryParameters = queryParameters.append('roles', element); + }) + } + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } @@ -300,6 +454,12 @@ export class CollaborateursService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -323,7 +483,7 @@ export class CollaborateursService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/collaborateurs/referent/${encodeURIComponent(String(idReferent))}`, + return this.httpClient.request('get',`${this.basePath}/collaborateurs/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -334,4 +494,52 @@ export class CollaborateursService { ); } + /** + * + * Récupérer la liste des référents des précédents EP du collaborateur. + * @param idCollaborateur Id du collaborateur + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getReferentsPrecedentEPCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getReferentsPrecedentEPCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getReferentsPrecedentEPCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getReferentsPrecedentEPCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getReferentsPrecedentEPCollaborateur.'); + } + + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request>('get',`${this.basePath}/collaborateurs/${encodeURIComponent(String(idCollaborateur))}/ep/referents`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + } diff --git a/src/app/shared/api-swagger/api/demandesDelegation.service.ts b/src/app/shared/api-swagger/api/demandesDelegation.service.ts index c73a8de..c62c2d4 100644 --- a/src/app/shared/api-swagger/api/demandesDelegation.service.ts +++ b/src/app/shared/api-swagger/api/demandesDelegation.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,6 @@ import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; -import { CreationDemandeDelegationDTO } from '../model/creationDemandeDelegationDTO'; import { DemandeDelegationDTO } from '../model/demandeDelegationDTO'; import { ErreurDTO } from '../model/erreurDTO'; @@ -28,7 +27,7 @@ import { Configuration } from '../configurat @Injectable() export class DemandesDelegationService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -58,115 +57,19 @@ export class DemandesDelegationService { /** - * - * Faire une demande de délégation à une autre personne - * @param idCollaborateur id collaborateur - * @param idEP id EP + * + * Récupérer la liste des demandes de délégation d’un référent. + * @param idReferent Id d'un référent * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public faireDemandeDelegation(idCollaborateur: string, idEP: number, observe?: 'body', reportProgress?: boolean): Observable; - public faireDemandeDelegation(idCollaborateur: string, idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; - public faireDemandeDelegation(idCollaborateur: string, idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; - public faireDemandeDelegation(idCollaborateur: string, idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling faireDemandeDelegation.'); - } - - if (idEP === null || idEP === undefined) { - throw new Error('Required parameter idEP was null or undefined when calling faireDemandeDelegation.'); - } - - let headers = this.defaultHeaders; + public getDemandesDelegationReferent(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getDemandesDelegationReferent(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getDemandesDelegationReferent(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getDemandesDelegationReferent(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request('get',`${this.basePath}/demandesdelegation/ep/${encodeURIComponent(String(idEP))}/${encodeURIComponent(String(idCollaborateur))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupération de la liste des demandes de délégation - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param fonctions Liste des fonctions des collaborateurs que l'on veut récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDemandesDelegation(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandesDelegation(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandesDelegation(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandesDelegation(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandesDelegation.'); - } - - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getDemandesDelegation.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandesDelegation.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandesDelegation.'); - } - - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (fonctions) { - fonctions.forEach((element) => { - queryParameters = queryParameters.append('fonctions', element); - }) - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling getDemandesDelegationReferent.'); } let headers = this.defaultHeaders; @@ -191,9 +94,8 @@ export class DemandesDelegationService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/demandesdelegation/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request>('get',`${this.basePath}/demandesdelegation/referent/${encodeURIComponent(String(idReferent))}`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -203,24 +105,24 @@ export class DemandesDelegationService { } /** - * - * Faire une demande de délégation à une autre personne - * @param body - * @param idDemandeDelegation id demande delegation + * + * Répondre à une demande de délégation. + * @param body + * @param idDemandeDelegation Id d'une demande delegation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public repondreDemandeDelegation(body: CreationDemandeDelegationDTO, idDemandeDelegation: number, observe?: 'body', reportProgress?: boolean): Observable; - public repondreDemandeDelegation(body: CreationDemandeDelegationDTO, idDemandeDelegation: number, observe?: 'response', reportProgress?: boolean): Observable>; - public repondreDemandeDelegation(body: CreationDemandeDelegationDTO, idDemandeDelegation: number, observe?: 'events', reportProgress?: boolean): Observable>; - public repondreDemandeDelegation(body: CreationDemandeDelegationDTO, idDemandeDelegation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public updateDemandeDelegation(body: DemandeDelegationDTO, idDemandeDelegation: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateDemandeDelegation(body: DemandeDelegationDTO, idDemandeDelegation: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateDemandeDelegation(body: DemandeDelegationDTO, idDemandeDelegation: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateDemandeDelegation(body: DemandeDelegationDTO, idDemandeDelegation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling repondreDemandeDelegation.'); + throw new Error('Required parameter body was null or undefined when calling updateDemandeDelegation.'); } if (idDemandeDelegation === null || idDemandeDelegation === undefined) { - throw new Error('Required parameter idDemandeDelegation was null or undefined when calling repondreDemandeDelegation.'); + throw new Error('Required parameter idDemandeDelegation was null or undefined when calling updateDemandeDelegation.'); } let headers = this.defaultHeaders; @@ -250,7 +152,7 @@ export class DemandesDelegationService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/demandesdelegation/${encodeURIComponent(String(idDemandeDelegation))}/repondre`, + return this.httpClient.request('put',`${this.basePath}/demandesdelegation/${encodeURIComponent(String(idDemandeDelegation))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/demandesEPI.service.ts b/src/app/shared/api-swagger/api/demandesEPI.service.ts index e9feaeb..f1c96b6 100644 --- a/src/app/shared/api-swagger/api/demandesEPI.service.ts +++ b/src/app/shared/api-swagger/api/demandesEPI.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,6 +19,7 @@ import { Observable } from 'rxjs'; import { DemandeEPIDTO } from '../model/demandeEPIDTO'; import { ErreurDTO } from '../model/erreurDTO'; +import { EtatDemande } from '../model/etatDemande'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @@ -27,7 +28,7 @@ import { Configuration } from '../configurat @Injectable() export class DemandesEPIService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -57,19 +58,19 @@ export class DemandesEPIService { /** - * - * Annuler la demande d'EPI - * @param idDemandeEPI id demande EPI + * + * Effectuer la création d’une demande d’EPI par l'assistant ou bien un responsable d'agence. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public annulerDemandeEPI(idDemandeEPI: number, observe?: 'body', reportProgress?: boolean): Observable; - public annulerDemandeEPI(idDemandeEPI: number, observe?: 'response', reportProgress?: boolean): Observable>; - public annulerDemandeEPI(idDemandeEPI: number, observe?: 'events', reportProgress?: boolean): Observable>; - public annulerDemandeEPI(idDemandeEPI: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public addDemandeEpiAssistant(body: DemandeEPIDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addDemandeEpiAssistant(body: DemandeEPIDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addDemandeEpiAssistant(body: DemandeEPIDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addDemandeEpiAssistant(body: DemandeEPIDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idDemandeEPI === null || idDemandeEPI === undefined) { - throw new Error('Required parameter idDemandeEPI was null or undefined when calling annulerDemandeEPI.'); + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addDemandeEpiAssistant.'); } let headers = this.defaultHeaders; @@ -92,10 +93,16 @@ export class DemandesEPIService { // to determine the Content-Type header const consumes: string[] = [ + 'application/json' ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } - return this.httpClient.request('get',`${this.basePath}/demandesepi/${encodeURIComponent(String(idDemandeEPI))}/annuler`, + return this.httpClient.request('post',`${this.basePath}/demandesepi/demande/assistant`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -105,24 +112,19 @@ export class DemandesEPIService { } /** - * - * Lancer la procedure pour un entretien professionnel intermediaire, une demande d'EPI validée est créé par la même occasion - * @param idCollaborateur id collaborateur - * @param idReferent id referent + * + * Effectuer la création d’une demande d’EPI par le collaborateur. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createEPI(idCollaborateur: string, idReferent: string, observe?: 'body', reportProgress?: boolean): Observable; - public createEPI(idCollaborateur: string, idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>; - public createEPI(idCollaborateur: string, idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>; - public createEPI(idCollaborateur: string, idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling createEPI.'); - } + public addDemandeEpiCollaborateur(body: DemandeEPIDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addDemandeEpiCollaborateur(body: DemandeEPIDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addDemandeEpiCollaborateur(body: DemandeEPIDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addDemandeEpiCollaborateur(body: DemandeEPIDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling createEPI.'); + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addDemandeEpiCollaborateur.'); } let headers = this.defaultHeaders; @@ -145,10 +147,16 @@ export class DemandesEPIService { // to determine the Content-Type header const consumes: string[] = [ + 'application/json' ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } - return this.httpClient.request('get',`${this.basePath}/demandesepi/referent/${encodeURIComponent(String(idReferent))}/demande/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request('post',`${this.basePath}/demandesepi/demande/collaborateur`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -158,19 +166,19 @@ export class DemandesEPIService { } /** - * - * Demande d'EPI par un collaborateur - * @param idCollaborateur id collaborateur + * + * Effectuer la création d’une demande d’EPI par le référent. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public demandeEPI(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public demandeEPI(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public demandeEPI(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public demandeEPI(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public addDemandeEpiReferent(body: DemandeEPIDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addDemandeEpiReferent(body: DemandeEPIDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addDemandeEpiReferent(body: DemandeEPIDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addDemandeEpiReferent(body: DemandeEPIDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling demandeEPI.'); + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addDemandeEpiReferent.'); } let headers = this.defaultHeaders; @@ -193,10 +201,16 @@ export class DemandesEPIService { // to determine the Content-Type header const consumes: string[] = [ + 'application/json' ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } - return this.httpClient.request('get',`${this.basePath}/demandesepi/collaborateur/${encodeURIComponent(String(idCollaborateur))}/demande`, + return this.httpClient.request('post',`${this.basePath}/demandesepi/demande/referent`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -206,19 +220,19 @@ export class DemandesEPIService { } /** - * - * Demande d'EPI et par l'assistant et création automatique de l'EPI - * @param idCollaborateur id collaborateur + * + * Annuler une demande d’EPI. + * @param idDemandeEPI Id d'une demande d'EPI * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public demandeEPIAssistante(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public demandeEPIAssistante(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public demandeEPIAssistante(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public demandeEPIAssistante(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public deleteDemandeEPI(idDemandeEPI: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteDemandeEPI(idDemandeEPI: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteDemandeEPI(idDemandeEPI: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteDemandeEPI(idDemandeEPI: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling demandeEPIAssistante.'); + if (idDemandeEPI === null || idDemandeEPI === undefined) { + throw new Error('Required parameter idDemandeEPI was null or undefined when calling deleteDemandeEPI.'); } let headers = this.defaultHeaders; @@ -243,7 +257,7 @@ export class DemandesEPIService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/demandesepi/demandeassistante/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request('delete',`${this.basePath}/demandesepi/${encodeURIComponent(String(idDemandeEPI))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -254,63 +268,29 @@ export class DemandesEPIService { } /** - * - * Récupération de la liste des demandes EPI d'un collaborateur - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param fonctions Liste des fonctions des collaborateurs que l'on veut récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des demandes d’EPI d’un collaborateur. + * @param idCollaborateur Id du collaborateur + * @param etatsDemande Liste des états des demandes à afficher * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandeEPICollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandeEPICollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandeEPICollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandeEPICollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandeEPICollaborateur.'); - } + public getDemandeEPICollaborateur(idCollaborateur: string, etatsDemande?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getDemandeEPICollaborateur(idCollaborateur: string, etatsDemande?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getDemandeEPICollaborateur(idCollaborateur: string, etatsDemande?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getDemandeEPICollaborateur(idCollaborateur: string, etatsDemande?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idCollaborateur === null || idCollaborateur === undefined) { throw new Error('Required parameter idCollaborateur was null or undefined when calling getDemandeEPICollaborateur.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandeEPICollaborateur.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandeEPICollaborateur.'); - } - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (fonctions) { - fonctions.forEach((element) => { - queryParameters = queryParameters.append('fonctions', element); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); }) } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } let headers = this.defaultHeaders; @@ -346,19 +326,28 @@ export class DemandesEPIService { } /** - * - * Récupération de l'EPI en cours d'un collaborateur - * @param idCollaborateur id collaborateur + * + * Récupérer le nombre total de demandes d’EPI d’un collaborateur. + * @param idCollaborateur Id du collaborateur + * @param etatsDemande Liste des états des demandes à afficher * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandeEPIEnCours(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public getDemandeEPIEnCours(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getDemandeEPIEnCours(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getDemandeEPIEnCours(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getDemandeEPICollaborateurCount(idCollaborateur: string, etatsDemande?: Array, observe?: 'body', reportProgress?: boolean): Observable; + public getDemandeEPICollaborateurCount(idCollaborateur: string, etatsDemande?: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public getDemandeEPICollaborateurCount(idCollaborateur: string, etatsDemande?: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public getDemandeEPICollaborateurCount(idCollaborateur: string, etatsDemande?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getDemandeEPIEnCours.'); + throw new Error('Required parameter idCollaborateur was null or undefined when calling getDemandeEPICollaborateurCount.'); + } + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); + }) } let headers = this.defaultHeaders; @@ -383,8 +372,9 @@ export class DemandesEPIService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/demandesepi/collaborateur/${encodeURIComponent(String(idCollaborateur))}/enCours`, + return this.httpClient.request('get',`${this.basePath}/demandesepi/collaborateur/${encodeURIComponent(String(idCollaborateur))}/count`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -394,63 +384,87 @@ export class DemandesEPIService { } /** - * - * Récupération de la liste des demandes EPI d'un referent - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param fonctions Liste des fonctions des collaborateurs que l'on veut récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des demandes d’EPI qu’un référent a reçu. + * @param idReferent Id d'un référent + * @param etatsDemande Liste des états des demandes à afficher * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandeEPIReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandeEPIReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandeEPIReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandeEPIReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, fonctions?: Array, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandeEPIReferent.'); - } + public getDemandeEPIReferent(idReferent: string, etatsDemande?: Array, observe?: 'body', reportProgress?: boolean): Observable>; + public getDemandeEPIReferent(idReferent: string, etatsDemande?: Array, observe?: 'response', reportProgress?: boolean): Observable>>; + public getDemandeEPIReferent(idReferent: string, etatsDemande?: Array, observe?: 'events', reportProgress?: boolean): Observable>>; + public getDemandeEPIReferent(idReferent: string, etatsDemande?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idReferent === null || idReferent === undefined) { throw new Error('Required parameter idReferent was null or undefined when calling getDemandeEPIReferent.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandeEPIReferent.'); + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); + }) } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandeEPIReferent.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request>('get',`${this.basePath}/demandesepi/referent/${encodeURIComponent(String(idReferent))}`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total de demandes d’EPI qu’un référent a reçu. + * @param idReferent Id d'un référent + * @param etatsDemande Liste des états des demandes à afficher + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDemandeEPIReferentCount(idReferent: string, etatsDemande?: Array, observe?: 'body', reportProgress?: boolean): Observable; + public getDemandeEPIReferentCount(idReferent: string, etatsDemande?: Array, observe?: 'response', reportProgress?: boolean): Observable>; + public getDemandeEPIReferentCount(idReferent: string, etatsDemande?: Array, observe?: 'events', reportProgress?: boolean): Observable>; + public getDemandeEPIReferentCount(idReferent: string, etatsDemande?: Array, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling getDemandeEPIReferentCount.'); + } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (fonctions) { - fonctions.forEach((element) => { - queryParameters = queryParameters.append('fonctions', element); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); }) } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } let headers = this.defaultHeaders; @@ -474,7 +488,7 @@ export class DemandesEPIService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/demandesepi/referent/${encodeURIComponent(String(idReferent))}`, + return this.httpClient.request('get',`${this.basePath}/demandesepi/referent/${encodeURIComponent(String(idReferent))}/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -486,24 +500,24 @@ export class DemandesEPIService { } /** - * - * Répondre à une demande EPI en attente - * @param body - * @param idDemandeEPI id demande EPI + * + * Répondre à une demande d’EPI. + * @param body + * @param idDemandeEPI Id d'une demande d'EPI * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public repondreDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'body', reportProgress?: boolean): Observable; - public repondreDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'response', reportProgress?: boolean): Observable>; - public repondreDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'events', reportProgress?: boolean): Observable>; - public repondreDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public updateDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateDemandeEPI(body: DemandeEPIDTO, idDemandeEPI: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling repondreDemandeEPI.'); + throw new Error('Required parameter body was null or undefined when calling updateDemandeEPI.'); } if (idDemandeEPI === null || idDemandeEPI === undefined) { - throw new Error('Required parameter idDemandeEPI was null or undefined when calling repondreDemandeEPI.'); + throw new Error('Required parameter idDemandeEPI was null or undefined when calling updateDemandeEPI.'); } let headers = this.defaultHeaders; @@ -533,7 +547,7 @@ export class DemandesEPIService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/demandesepi/${encodeURIComponent(String(idDemandeEPI))}/repondre`, + return this.httpClient.request('put',`${this.basePath}/demandesepi/${encodeURIComponent(String(idDemandeEPI))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/demandesformation.service.ts b/src/app/shared/api-swagger/api/demandesformation.service.ts index 37394ed..62fc2a9 100644 --- a/src/app/shared/api-swagger/api/demandesformation.service.ts +++ b/src/app/shared/api-swagger/api/demandesformation.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,11 +17,10 @@ import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; -import { CreationDemandeFormationDTO } from '../model/creationDemandeFormationDTO'; import { DemandeFormationDTO } from '../model/demandeFormationDTO'; import { ErreurDTO } from '../model/erreurDTO'; +import { EtatDemande } from '../model/etatDemande'; import { OrigineDemandeFormationDTO } from '../model/origineDemandeFormationDTO'; -import { ThemeDTO } from '../model/themeDTO'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @@ -30,7 +29,7 @@ import { Configuration } from '../configurat @Injectable() export class DemandesFormationService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -60,19 +59,19 @@ export class DemandesFormationService { /** - * - * Créer une demande de formation pour un collaborateur - * @param body + * + * Créer demande de formation pour un collaborateur. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public creerDemandeFormation(body: CreationDemandeFormationDTO, observe?: 'body', reportProgress?: boolean): Observable; - public creerDemandeFormation(body: CreationDemandeFormationDTO, observe?: 'response', reportProgress?: boolean): Observable>; - public creerDemandeFormation(body: CreationDemandeFormationDTO, observe?: 'events', reportProgress?: boolean): Observable>; - public creerDemandeFormation(body: CreationDemandeFormationDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { + public addDemandeFormation(body: DemandeFormationDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addDemandeFormation(body: DemandeFormationDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addDemandeFormation(body: DemandeFormationDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addDemandeFormation(body: DemandeFormationDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling creerDemandeFormation.'); + throw new Error('Required parameter body was null or undefined when calling addDemandeFormation.'); } let headers = this.defaultHeaders; @@ -102,7 +101,7 @@ export class DemandesFormationService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post',`${this.basePath}/demandeformation`, + return this.httpClient.request('post',`${this.basePath}/demandesformation`, { body: body, withCredentials: this.configuration.withCredentials, @@ -114,60 +113,19 @@ export class DemandesFormationService { } /** - * - * Récupérer la liste des demandes de formations - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param theme Thème des demandes de formation à récupérer - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Supprimer une demande de formation. + * @param idDemandeFormation Id d'une demande de formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandesFormation.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandesFormation.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandesFormation.'); - } - - - - + public deleteDemandeFormation(idDemandeFormation: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteDemandeFormation(idDemandeFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteDemandeFormation(idDemandeFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteDemandeFormation(idDemandeFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (theme !== undefined && theme !== null) { - queryParameters = queryParameters.set('theme', theme); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); + if (idDemandeFormation === null || idDemandeFormation === undefined) { + throw new Error('Required parameter idDemandeFormation was null or undefined when calling deleteDemandeFormation.'); } let headers = this.defaultHeaders; @@ -192,9 +150,8 @@ export class DemandesFormationService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/demandeformation`, + return this.httpClient.request('delete',`${this.basePath}/demandesformation/${encodeURIComponent(String(idDemandeFormation))}`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -204,46 +161,48 @@ export class DemandesFormationService { } /** - * - * Récupérer la liste des demandes de formations en attente d'une réponse - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param theme Thème des demandes de formation à récupérer - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des demandes de formation. + * @param etatsDemande Liste des états des demandes à afficher + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandesFormationEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandesFormationEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandesFormationEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandesFormationEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getDemandesFormation(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getDemandesFormation(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getDemandesFormation(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getDemandesFormation(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandesFormationEnAttente.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandesFormationEnAttente.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandesFormationEnAttente.'); - } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); + }) + } + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -253,12 +212,15 @@ export class DemandesFormationService { if (texte !== undefined && texte !== null) { queryParameters = queryParameters.set('texte', texte); } - if (theme !== undefined && theme !== null) { - queryParameters = queryParameters.set('theme', theme); - } if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -282,7 +244,7 @@ export class DemandesFormationService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/demandeformation/enattente`, + return this.httpClient.request>('get',`${this.basePath}/demandesformation`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -294,46 +256,48 @@ export class DemandesFormationService { } /** - * - * Récupérer la liste des demandes de formations ayant reçu une réponse - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param theme Thème des demandes de formation à récupérer - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer le nombre total de demandes de formation. + * @param etatsDemande Liste des états des demandes à afficher + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getDemandesFormationRepondues(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getDemandesFormationRepondues(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getDemandesFormationRepondues(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getDemandesFormationRepondues(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, theme?: number, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getDemandesFormationCount(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getDemandesFormationCount(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getDemandesFormationCount(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getDemandesFormationCount(etatsDemande?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getDemandesFormationRepondues.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getDemandesFormationRepondues.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getDemandesFormationRepondues.'); - } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsDemande) { + etatsDemande.forEach((element) => { + queryParameters = queryParameters.append('etatsDemande', element); + }) + } + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -343,57 +307,16 @@ export class DemandesFormationService { if (texte !== undefined && texte !== null) { queryParameters = queryParameters.set('texte', texte); } - if (theme !== undefined && theme !== null) { - queryParameters = queryParameters.set('theme', theme); - } if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); } - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/demandeformation/repondus`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer la liste des origines des demandes de formation - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOriginesDemandesFormation(observe?: 'body', reportProgress?: boolean): Observable>; - public getOriginesDemandesFormation(observe?: 'response', reportProgress?: boolean): Observable>>; - public getOriginesDemandesFormation(observe?: 'events', reportProgress?: boolean): Observable>>; - public getOriginesDemandesFormation(observe: any = 'body', reportProgress: boolean = false ): Observable { - let headers = this.defaultHeaders; // authentication (bearerAuth) required @@ -416,8 +339,9 @@ export class DemandesFormationService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/originesdemandesformation`, + return this.httpClient.request('get',`${this.basePath}/demandesformation/count`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -427,15 +351,15 @@ export class DemandesFormationService { } /** - * - * Récupérer la liste des thèmes des demandes de formation + * + * Récupérer la liste des origines des demandes de formation. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getThemes(observe?: 'body', reportProgress?: boolean): Observable>; - public getThemes(observe?: 'response', reportProgress?: boolean): Observable>>; - public getThemes(observe?: 'events', reportProgress?: boolean): Observable>>; - public getThemes(observe: any = 'body', reportProgress: boolean = false ): Observable { + public getOriginesDemandeFormation(observe?: 'body', reportProgress?: boolean): Observable>; + public getOriginesDemandeFormation(observe?: 'response', reportProgress?: boolean): Observable>>; + public getOriginesDemandeFormation(observe?: 'events', reportProgress?: boolean): Observable>>; + public getOriginesDemandeFormation(observe: any = 'body', reportProgress: boolean = false ): Observable { let headers = this.defaultHeaders; @@ -459,7 +383,7 @@ export class DemandesFormationService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/themes`, + return this.httpClient.request>('get',`${this.basePath}/originesdemandeformation`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -470,24 +394,24 @@ export class DemandesFormationService { } /** - * - * Répondre a une demande de formation et la mettre à jour - * @param body - * @param idDemandeFormation id demande formation + * + * Répondre à une demande de formation. + * @param body + * @param idDemandeFormation Id d'une demande de formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public repondreDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'body', reportProgress?: boolean): Observable; - public repondreDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; - public repondreDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; - public repondreDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public updateDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateDemandeFormation(body: DemandeFormationDTO, idDemandeFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling repondreDemandeFormation.'); + throw new Error('Required parameter body was null or undefined when calling updateDemandeFormation.'); } if (idDemandeFormation === null || idDemandeFormation === undefined) { - throw new Error('Required parameter idDemandeFormation was null or undefined when calling repondreDemandeFormation.'); + throw new Error('Required parameter idDemandeFormation was null or undefined when calling updateDemandeFormation.'); } let headers = this.defaultHeaders; @@ -517,7 +441,7 @@ export class DemandesFormationService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/demandeformation/${encodeURIComponent(String(idDemandeFormation))}/repondre`, + return this.httpClient.request('put',`${this.basePath}/demandesformation/${encodeURIComponent(String(idDemandeFormation))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/engagements.service.ts b/src/app/shared/api-swagger/api/engagements.service.ts index 6622a44..cdad4e1 100644 --- a/src/app/shared/api-swagger/api/engagements.service.ts +++ b/src/app/shared/api-swagger/api/engagements.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,6 +19,7 @@ import { Observable } from 'rxjs'; import { EngagementDTO } from '../model/engagementDTO'; import { ErreurDTO } from '../model/erreurDTO'; +import { EtatEngagement } from '../model/etatEngagement'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @@ -27,7 +28,7 @@ import { Configuration } from '../configurat @Injectable() export class EngagementsService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -57,44 +58,44 @@ export class EngagementsService { /** - * - * Récupérer la liste des engagements - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des engagements. + * @param etatsEngagement Etats de l'engagement + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEngagements(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEngagements(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEngagements(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEngagements(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEngagements(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getEngagements(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEngagements(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEngagements(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEngagements.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEngagements.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEngagements.'); - } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsEngagement) { + etatsEngagement.forEach((element) => { + queryParameters = queryParameters.append('etatsEngagement', element); + }) + } + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -142,129 +143,44 @@ export class EngagementsService { } /** - * - * Récupérer la liste des engagements en attente - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer le nombre total d’engagements. + * @param etatsEngagement Etats de l'engagement + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEngagementsEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEngagementsEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEngagementsEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEngagementsEnAttente(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEngagementsCount(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable; + public getEngagementsCount(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getEngagementsCount(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getEngagementsCount(etatsEngagement?: Array, idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEngagementsEnAttente.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEngagementsEnAttente.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEngagementsEnAttente.'); - } - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } - let headers = this.defaultHeaders; - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/engagements/enattente`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer la liste des engagements ayant reçu une réponse - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEngagementsRepondus(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEngagementsRepondus(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEngagementsRepondus(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEngagementsRepondus(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEngagementsRepondus.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEngagementsRepondus.'); + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (etatsEngagement) { + etatsEngagement.forEach((element) => { + queryParameters = queryParameters.append('etatsEngagement', element); + }) } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEngagementsRepondus.'); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) } - - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -300,7 +216,7 @@ export class EngagementsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/engagements/repondus`, + return this.httpClient.request('get',`${this.basePath}/engagements/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -312,24 +228,24 @@ export class EngagementsService { } /** - * - * Donnez une réponse à un engagement - * @param body - * @param idEngagement id engagement + * + * Répondre à un engagement. + * @param body + * @param idEngagement Id d'un engagement * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public repondreEngagement(body: EngagementDTO, idEngagement: number, observe?: 'body', reportProgress?: boolean): Observable; - public repondreEngagement(body: EngagementDTO, idEngagement: number, observe?: 'response', reportProgress?: boolean): Observable>; - public repondreEngagement(body: EngagementDTO, idEngagement: number, observe?: 'events', reportProgress?: boolean): Observable>; - public repondreEngagement(body: EngagementDTO, idEngagement: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public updateEngagement(body: EngagementDTO, idEngagement: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateEngagement(body: EngagementDTO, idEngagement: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateEngagement(body: EngagementDTO, idEngagement: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateEngagement(body: EngagementDTO, idEngagement: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling repondreEngagement.'); + throw new Error('Required parameter body was null or undefined when calling updateEngagement.'); } if (idEngagement === null || idEngagement === undefined) { - throw new Error('Required parameter idEngagement was null or undefined when calling repondreEngagement.'); + throw new Error('Required parameter idEngagement was null or undefined when calling updateEngagement.'); } let headers = this.defaultHeaders; @@ -359,7 +275,7 @@ export class EngagementsService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/engagements/${encodeURIComponent(String(idEngagement))}/repondre`, + return this.httpClient.request('put',`${this.basePath}/engagements/${encodeURIComponent(String(idEngagement))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/ep.service.ts b/src/app/shared/api-swagger/api/ep.service.ts index f42503c..9578418 100644 --- a/src/app/shared/api-swagger/api/ep.service.ts +++ b/src/app/shared/api-swagger/api/ep.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -21,7 +21,6 @@ import { EpDTO } from '../model/epDTO'; import { EpInformationDTO } from '../model/epInformationDTO'; import { EpSaisieDTO } from '../model/epSaisieDTO'; import { ErreurDTO } from '../model/erreurDTO'; -import { ProchainEPDTO } from '../model/prochainEPDTO'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @@ -30,7 +29,7 @@ import { Configuration } from '../configurat @Injectable() export class EpService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -60,66 +59,203 @@ export class EpService { /** - * - * Récupérer la liste de tous les EP collaborateurs - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param idBU id de la business unit à laquelle sont rattachées les données à récupérer - * @param statutEP Statut de l'EP - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Annuler/Supprimer un EP d’un collaborateur. + * @param idEP Id d'un EP * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEP(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, statutEP?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEP(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, statutEP?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEP(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, statutEP?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEP(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, statutEP?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public deleteEP(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteEP(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteEP(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteEP(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEP.'); + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling deleteEP.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEP.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEP.'); + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('delete',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Supprimer les EP d’un collaborateur. + * @param idCollaborateur Id du collaborateur + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteEPCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; + public deleteEPCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteEPCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteEPCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling deleteEPCollaborateur.'); + } + + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('delete',`${this.basePath}/ep/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer un EP par son id. + * @param idEP Id d'un EP + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPById(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public getEPById(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPById(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPById(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling getEPById.'); + } + + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer la liste des EP en cours. + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPEnCours(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPEnCours(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPEnCours(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPEnCours(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (idBU !== undefined && idBU !== null) { - queryParameters = queryParameters.set('idBU', idBU); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } if (parPAge !== undefined && parPAge !== null) { queryParameters = queryParameters.set('parPAge', parPAge); } - if (statutEP !== undefined && statutEP !== null) { - queryParameters = queryParameters.set('statutEP', statutEP); - } if (texte !== undefined && texte !== null) { queryParameters = queryParameters.set('texte', texte); } if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -143,7 +279,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep`, + return this.httpClient.request>('get',`${this.basePath}/ep/encours`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -155,43 +291,134 @@ export class EpService { } /** - * - * Récupérer la liste des EP d'un collaborateur - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param statutEP Statut de l'EP - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer les informations des EP en cours auxquels le collaborateur est participant. + * @param idCollaborateur Id du collaborateur * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEPByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, statutEP?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEPByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, statutEP?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEPByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, statutEP?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEPByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, statutEP?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEPEnCoursCollaborateurParticipant(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPEnCoursCollaborateurParticipant(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPEnCoursCollaborateurParticipant(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPEnCoursCollaborateurParticipant(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEPByCollaborateur.'); + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPEnCoursCollaborateurParticipant.'); } - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPByCollaborateur.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEPByCollaborateur.'); + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request>('get',`${this.basePath}/ep/participation/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total d’informations des EP en cours auxquels le collaborateur est participant. + * @param idCollaborateur Id du collaborateur + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPEnCoursCollaborateurParticipantCount(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; + public getEPEnCoursCollaborateurParticipantCount(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPEnCoursCollaborateurParticipantCount(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPEnCoursCollaborateurParticipantCount(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPEnCoursCollaborateurParticipantCount.'); } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEPByCollaborateur.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('get',`${this.basePath}/ep/participation/${encodeURIComponent(String(idCollaborateur))}/count`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total d’EP en cours. + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPEnCoursCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getEPEnCoursCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPEnCoursCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPEnCoursCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } @@ -201,15 +428,18 @@ export class EpService { if (parPAge !== undefined && parPAge !== null) { queryParameters = queryParameters.set('parPAge', parPAge); } - if (statutEP !== undefined && statutEP !== null) { - queryParameters = queryParameters.set('statutEP', statutEP); - } if (texte !== undefined && texte !== null) { queryParameters = queryParameters.set('texte', texte); } if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -233,7 +463,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request('get',`${this.basePath}/ep/encours/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -245,19 +475,61 @@ export class EpService { } /** - * - * Récupérer un EP par son id - * @param idEP id EP + * + * Récupérer la liste des prochains EP d’un référent. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param epObligatoire Récupérer la liste des EP obligatoires + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEPById(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; - public getEPById(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getEPById(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getEPById(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEPEnCoursReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPEnCoursReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPEnCoursReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPEnCoursReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idEP === null || idEP === undefined) { - throw new Error('Required parameter idEP was null or undefined when calling getEPById.'); + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling getEPEnCoursReferent.'); + } + + + + + + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } + if (numPage !== undefined && numPage !== null) { + queryParameters = queryParameters.set('numPage', numPage); + } + if (parPAge !== undefined && parPAge !== null) { + queryParameters = queryParameters.set('parPAge', parPAge); + } + if (texte !== undefined && texte !== null) { + queryParameters = queryParameters.set('texte', texte); + } + if (tri !== undefined && tri !== null) { + queryParameters = queryParameters.set('tri', tri); + } + if (epObligatoire !== undefined && epObligatoire !== null) { + queryParameters = queryParameters.set('epObligatoire', epObligatoire); + } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); } let headers = this.defaultHeaders; @@ -282,8 +554,9 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, + return this.httpClient.request>('get',`${this.basePath}/ep/encours/referent/${encodeURIComponent(String(idReferent))}`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -293,37 +566,34 @@ export class EpService { } /** - * - * Récupérer la liste de tous les EP fait passer par le référent - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer le nombre total de prochains EP d’un référent. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param epObligatoire Récupérer la liste des EP obligatoires + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEPByReferent.'); - } + public getEPEnCoursReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getEPEnCoursReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPEnCoursReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPEnCoursReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, epObligatoire?: boolean, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getEPByReferent.'); + throw new Error('Required parameter idReferent was null or undefined when calling getEPEnCoursReferentCount.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEPByReferent.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEPByReferent.'); - } + + + + @@ -343,6 +613,15 @@ export class EpService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (epObligatoire !== undefined && epObligatoire !== null) { + queryParameters = queryParameters.set('epObligatoire', epObligatoire); + } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -366,7 +645,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}`, + return this.httpClient.request('get',`${this.basePath}/ep/encours/referent/${encodeURIComponent(String(idReferent))}/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -378,49 +657,137 @@ export class EpService { } /** - * - * Récupérer la liste de tous les prochaines EP collaborateurs - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param idBU id de la business unit à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer l’EP à saisir d’un collaborateur. + * @param idCollaborateur Id du collaborateur * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEPEnCours(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEPEnCours(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEPEnCours(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEPEnCours(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEPSaisieCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; + public getEPSaisieCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPSaisieCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPSaisieCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPSaisieCollaborateur.'); + } - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEPEnCours.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEPEnCours.'); + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('get',`${this.basePath}/ep/saisie/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer l’EP à saisir d’un référent. + * @param idEP Id d'un EP + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPSaisieReferent(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public getEPSaisieReferent(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPSaisieReferent(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPSaisieReferent(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling getEPSaisieReferent.'); } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEPEnCours.'); + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request('get',`${this.basePath}/ep/saisie/referent/${encodeURIComponent(String(idEP))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer la liste des EP signés. + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPSignes(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPSignes(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPSignes(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPSignes(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (idBU !== undefined && idBU !== null) { - queryParameters = queryParameters.set('idBU', idBU); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -433,6 +800,12 @@ export class EpService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -456,7 +829,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep/enCours`, + return this.httpClient.request>('get',`${this.basePath}/ep/signes`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -468,49 +841,89 @@ export class EpService { } /** - * - * Récupérer la liste de tous les EP collaborateur signés - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param idBU id de la business unit à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des EP signés d’un collaborateur. + * @param idCollaborateur Id du collaborateur * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getEPSignes(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getEPSignes(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getEPSignes(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getEPSignes(asc: boolean, numPage: number, parPAge: number, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEPSignesCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPSignesCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPSignesCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPSignesCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getEPSignes.'); + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getEPSignesCollaborateur.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getEPSignes.'); - } + let headers = this.defaultHeaders; - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getEPSignes.'); + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); } + // to determine the Content-Type header + const consumes: string[] = [ + ]; + + return this.httpClient.request>('get',`${this.basePath}/ep/signes/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Récupérer le nombre total d’EP signés. + * @param idBUs liste des ids des BU auxquelles les données sont rattachées + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEPSignesCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getEPSignesCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPSignesCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPSignesCount(idBUs?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (idBUs) { + idBUs.forEach((element) => { + queryParameters = queryParameters.append('idBUs', element); + }) + } if (asc !== undefined && asc !== null) { queryParameters = queryParameters.set('asc', asc); } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (idBU !== undefined && idBU !== null) { - queryParameters = queryParameters.set('idBU', idBU); - } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -523,6 +936,12 @@ export class EpService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -546,7 +965,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep/signes`, + return this.httpClient.request('get',`${this.basePath}/ep/signes/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -558,19 +977,56 @@ export class EpService { } /** - * - * Récupérer les détails sur quand aura lieu le prochain EP du collaborateur - * @param idCollaborateur id collaborateur + * + * Récupérer la liste des EP signés qu’un référent à fait passer. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getProchainEPCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getEPSignesReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getEPSignesReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getEPSignesReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getEPSignesReferent(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getProchainEPCollaborateur.'); + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling getEPSignesReferent.'); + } + + + + + + + + + let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } + if (numPage !== undefined && numPage !== null) { + queryParameters = queryParameters.set('numPage', numPage); + } + if (parPAge !== undefined && parPAge !== null) { + queryParameters = queryParameters.set('parPAge', parPAge); + } + if (texte !== undefined && texte !== null) { + queryParameters = queryParameters.set('texte', texte); + } + if (tri !== undefined && tri !== null) { + queryParameters = queryParameters.set('tri', tri); + } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); } let headers = this.defaultHeaders; @@ -595,8 +1051,9 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}/prochain`, + return this.httpClient.request>('get',`${this.basePath}/ep/signes/referent/${encodeURIComponent(String(idReferent))}`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -606,37 +1063,32 @@ export class EpService { } /** - * - * Récupérer la liste de tous les prochaines EP que fera passer le référent - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer le nombre total d’EP signés qu’un référent à fait passer. + * @param idReferent Id d'un référent + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getProchainsEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getProchainsEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getProchainsEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getProchainsEPByReferent(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getProchainsEPByReferent.'); - } + public getEPSignesReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getEPSignesReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getEPSignesReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getEPSignesReferentCount(idReferent: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getProchainsEPByReferent.'); + throw new Error('Required parameter idReferent was null or undefined when calling getEPSignesReferentCount.'); } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getProchainsEPByReferent.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getProchainsEPByReferent.'); - } + + + @@ -656,6 +1108,12 @@ export class EpService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -679,7 +1137,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/ep/referent/${encodeURIComponent(String(idReferent))}/prochains`, + return this.httpClient.request('get',`${this.basePath}/ep/signes/referent/${encodeURIComponent(String(idReferent))}/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -691,19 +1149,19 @@ export class EpService { } /** - * - * Faire un rappel de signature EP - * @param idEP id EP + * + * Récupérer le prochain EP du collaborateur. + * @param idCollaborateur Id du collaborateur * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public rappelSignature(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; - public rappelSignature(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; - public rappelSignature(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; - public rappelSignature(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; + public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getProchainEPCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getProchainEPCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idEP === null || idEP === undefined) { - throw new Error('Required parameter idEP was null or undefined when calling rappelSignature.'); + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getProchainEPCollaborateur.'); } let headers = this.defaultHeaders; @@ -728,7 +1186,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/rappelSignature`, + return this.httpClient.request('get',`${this.basePath}/ep/encours/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -739,19 +1197,19 @@ export class EpService { } /** - * - * Récupérer le prochain EP du collaborateur dans le but de le saisir - * @param idCollaborateur id collaborateur + * + * Effectuer un rappel de signature. + * @param idEP Id d'un EP * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public saisieProchainEP(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public saisieProchainEP(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public saisieProchainEP(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public saisieProchainEP(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public rappelSignature(idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public rappelSignature(idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public rappelSignature(idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public rappelSignature(idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling saisieProchainEP.'); + if (idEP === null || idEP === undefined) { + throw new Error('Required parameter idEP was null or undefined when calling rappelSignature.'); } let headers = this.defaultHeaders; @@ -776,7 +1234,7 @@ export class EpService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/ep/collaborateur/${encodeURIComponent(String(idCollaborateur))}/prochain/saisir`, + return this.httpClient.request('get',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/rappelsignature`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -787,16 +1245,16 @@ export class EpService { } /** - * - * Mettre à jour l'EP déjà saisie - * @param body - * @param idEP id EP + * + * Mettre à jour les informations d’un EP. + * @param body + * @param idEP Id d'un EP * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateEP(body: EpDTO, idEP: number, observe?: 'body', reportProgress?: boolean): Observable; - public updateEP(body: EpDTO, idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; - public updateEP(body: EpDTO, idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateEP(body: EpDTO, idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateEP(body: EpDTO, idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateEP(body: EpDTO, idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; public updateEP(body: EpDTO, idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { @@ -834,7 +1292,7 @@ export class EpService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/updateep`, + return this.httpClient.request('put',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -846,24 +1304,24 @@ export class EpService { } /** - * - * Poursuivre le processus de l'EP ou bien seulement sauvegarder les modifications - * @param body - * @param idEP id EP + * + * Sauvegarder une saisie EP. + * @param body + * @param idEP Id d'un EP * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateSaisieEP(body: EpSaisieDTO, idEP: number, observe?: 'body', reportProgress?: boolean): Observable; - public updateSaisieEP(body: EpSaisieDTO, idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; - public updateSaisieEP(body: EpSaisieDTO, idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; - public updateSaisieEP(body: EpSaisieDTO, idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public updateEPSaisie(body: EpSaisieDTO, idEP: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateEPSaisie(body: EpSaisieDTO, idEP: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateEPSaisie(body: EpSaisieDTO, idEP: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateEPSaisie(body: EpSaisieDTO, idEP: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling updateSaisieEP.'); + throw new Error('Required parameter body was null or undefined when calling updateEPSaisie.'); } if (idEP === null || idEP === undefined) { - throw new Error('Required parameter idEP was null or undefined when calling updateSaisieEP.'); + throw new Error('Required parameter idEP was null or undefined when calling updateEPSaisie.'); } let headers = this.defaultHeaders; @@ -893,7 +1351,7 @@ export class EpService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/ep/${encodeURIComponent(String(idEP))}/updatesaisie`, + return this.httpClient.request('put',`${this.basePath}/ep/saisie/${encodeURIComponent(String(idEP))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/formations.service.ts b/src/app/shared/api-swagger/api/formations.service.ts index 89f6a6f..63493b1 100644 --- a/src/app/shared/api-swagger/api/formations.service.ts +++ b/src/app/shared/api-swagger/api/formations.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -32,7 +32,7 @@ import { Configuration } from '../configurat @Injectable() export class FormationsService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -62,19 +62,19 @@ export class FormationsService { /** - * - * Ajouter une nouvelle formation - * @param body + * + * Créer une nouvelle formation. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public ajouterFormation(body: FormationDTO, observe?: 'body', reportProgress?: boolean): Observable; - public ajouterFormation(body: FormationDTO, observe?: 'response', reportProgress?: boolean): Observable>; - public ajouterFormation(body: FormationDTO, observe?: 'events', reportProgress?: boolean): Observable>; - public ajouterFormation(body: FormationDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { + public addFormation(body: FormationDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addFormation(body: FormationDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addFormation(body: FormationDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addFormation(body: FormationDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling ajouterFormation.'); + throw new Error('Required parameter body was null or undefined when calling addFormation.'); } let headers = this.defaultHeaders; @@ -103,7 +103,8 @@ export class FormationsService { if (httpContentTypeSelected != undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post',`${this.basePath}/formations`, + + return this.httpClient.request('post',`${this.basePath}/formations`, { body: body, withCredentials: this.configuration.withCredentials, @@ -115,9 +116,9 @@ export class FormationsService { } /** - * - * Supprimer une formation - * @param idFormation id formation + * + * Supprimer une formation par son id. + * @param idFormation Id d'une formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -152,93 +153,8 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request('delete',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}/supprimer`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer les formations annulées - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFormationAnnulees(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormationAnnulees(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormationAnnulees(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormationAnnulees(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getFormationAnnulees.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getFormationAnnulees.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getFormationAnnulees.'); - } - - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/formations/annulees`, + return this.httpClient.request('delete',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -248,9 +164,9 @@ export class FormationsService { } /** - * - * Récupérer une formation par son id - * @param idFormation id formation + * + * Récupérer une formation par son id. + * @param idFormation Id d'une formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -296,44 +212,46 @@ export class FormationsService { } /** - * - * Récupérer les formations réalisées - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau + * + * Récupérer la liste des formations. * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * @param idStatuts liste des ids des statuts des formations à récupérer + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getFormationRealisee(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormationRealisee(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormationRealisee(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormationRealisee(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getFormations(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable>; + public getFormations(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>>; + public getFormations(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>>; + public getFormations(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getFormationRealisee.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getFormationRealisee.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getFormationRealisee.'); - } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } if (idAgence !== undefined && idAgence !== null) { queryParameters = queryParameters.set('idAgence', idAgence); } + if (idStatuts) { + idStatuts.forEach((element) => { + queryParameters = queryParameters.append('idStatuts', element); + }) + } + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } @@ -346,6 +264,12 @@ export class FormationsService { if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -369,7 +293,7 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/formations/realisees`, + return this.httpClient.request>('get',`${this.basePath}/formations`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -381,61 +305,64 @@ export class FormationsService { } /** - * - * Récupérer la liste des formations - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau + * + * Récupérer le nombre total de formations. * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param statutFormation Statut de la formation - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * @param idStatuts liste des ids des statuts des formations à récupérer + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué + * @param dateDebut Date à partir de laquelle les données son récupérées + * @param dateFin Date jusqu'à laquelle les données sont récupérées * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getFormations(asc: boolean, numPage: number, parPAge: number, idAgence?: number, statutFormation?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getFormations(asc: boolean, numPage: number, parPAge: number, idAgence?: number, statutFormation?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getFormations(asc: boolean, numPage: number, parPAge: number, idAgence?: number, statutFormation?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getFormations(asc: boolean, numPage: number, parPAge: number, idAgence?: number, statutFormation?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getFormationsCount(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'body', reportProgress?: boolean): Observable; + public getFormationsCount(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'response', reportProgress?: boolean): Observable>; + public getFormationsCount(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe?: 'events', reportProgress?: boolean): Observable>; + public getFormationsCount(idAgence?: number, idStatuts?: Array, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, dateDebut?: Date, dateFin?: Date, observe: any = 'body', reportProgress: boolean = false ): Observable { + + - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getFormations.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getFormations.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getFormations.'); - } let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } if (idAgence !== undefined && idAgence !== null) { queryParameters = queryParameters.set('idAgence', idAgence); } + if (idStatuts) { + idStatuts.forEach((element) => { + queryParameters = queryParameters.append('idStatuts', element); + }) + } + if (asc !== undefined && asc !== null) { + queryParameters = queryParameters.set('asc', asc); + } if (numPage !== undefined && numPage !== null) { queryParameters = queryParameters.set('numPage', numPage); } if (parPAge !== undefined && parPAge !== null) { queryParameters = queryParameters.set('parPAge', parPAge); } - if (statutFormation !== undefined && statutFormation !== null) { - queryParameters = queryParameters.set('statutFormation', statutFormation); - } if (texte !== undefined && texte !== null) { queryParameters = queryParameters.set('texte', texte); } if (tri !== undefined && tri !== null) { queryParameters = queryParameters.set('tri', tri); } + if (dateDebut !== undefined && dateDebut !== null) { + queryParameters = queryParameters.set('dateDebut', dateDebut.toISOString()); + } + if (dateFin !== undefined && dateFin !== null) { + queryParameters = queryParameters.set('dateFin', dateFin.toISOString()); + } let headers = this.defaultHeaders; @@ -459,7 +386,7 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/formations`, + return this.httpClient.request('get',`${this.basePath}/formations/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -471,8 +398,8 @@ export class FormationsService { } /** - * - * Récupérer les modes de formation + * + * Récupérer la liste des modes de formation. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -503,7 +430,7 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/modesFormation`, + return this.httpClient.request>('get',`${this.basePath}/modesformation`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -514,8 +441,8 @@ export class FormationsService { } /** - * - * Récupérer les origines de formation + * + * Récupérer la liste des origines de formation. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -546,93 +473,8 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/originesFormation`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer les formations plannifié et replannifié - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getProchainesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getProchainesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getProchainesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getProchainesFormation(asc: boolean, numPage: number, parPAge: number, idAgence?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getProchainesFormation.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getProchainesFormation.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getProchainesFormation.'); - } - - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/formations/prochaines`, + return this.httpClient.request>('get',`${this.basePath}/originesformation`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -642,8 +484,8 @@ export class FormationsService { } /** - * - * Récupérer les statuts de formation + * + * Récupérer la liste des statuts de formation. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -674,7 +516,7 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/statutsFormation`, + return this.httpClient.request>('get',`${this.basePath}/statutsformation`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -685,8 +527,8 @@ export class FormationsService { } /** - * - * Récupérer les types de formation + * + * Récupérer la liste des types de formation. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -717,7 +559,7 @@ export class FormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/typesFormation`, + return this.httpClient.request>('get',`${this.basePath}/typesformation`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -728,10 +570,10 @@ export class FormationsService { } /** - * - * Mettre à jour une formation - * @param body - * @param idFormation id formation + * + * Mettre à jour une formation. + * @param body + * @param idFormation Id d'une formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ @@ -775,7 +617,7 @@ export class FormationsService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}/update`, + return this.httpClient.request('put',`${this.basePath}/formations/${encodeURIComponent(String(idFormation))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/notes.service.ts b/src/app/shared/api-swagger/api/notes.service.ts index 0ce6ff8..87cdb20 100644 --- a/src/app/shared/api-swagger/api/notes.service.ts +++ b/src/app/shared/api-swagger/api/notes.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -28,7 +28,7 @@ import { Configuration } from '../configurat @Injectable() export class NotesService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -58,19 +58,19 @@ export class NotesService { /** - * - * Supprimer une note - * @param idNote id note + * + * Créer une nouvelle note. + * @param body * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteNote(idNote: number, observe?: 'body', reportProgress?: boolean): Observable; - public deleteNote(idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteNote(idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteNote(idNote: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public addNote(body: DetailsNoteDTO, observe?: 'body', reportProgress?: boolean): Observable; + public addNote(body: DetailsNoteDTO, observe?: 'response', reportProgress?: boolean): Observable>; + public addNote(body: DetailsNoteDTO, observe?: 'events', reportProgress?: boolean): Observable>; + public addNote(body: DetailsNoteDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idNote === null || idNote === undefined) { - throw new Error('Required parameter idNote was null or undefined when calling deleteNote.'); + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling addNote.'); } let headers = this.defaultHeaders; @@ -93,10 +93,16 @@ export class NotesService { // to determine the Content-Type header const consumes: string[] = [ + 'application/json' ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } - return this.httpClient.request('delete',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}/supprimer`, + return this.httpClient.request('post',`${this.basePath}/notes/`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -106,19 +112,19 @@ export class NotesService { } /** - * - * Récupérer une note par son id - * @param idNote id note + * + * Supprimer une note. + * @param idNote Id d'une note * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getNoteById(idNote: number, observe?: 'body', reportProgress?: boolean): Observable; - public getNoteById(idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; - public getNoteById(idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; - public getNoteById(idNote: number, observe: any = 'body', reportProgress: boolean = false ): Observable { + public deleteNote(idNote: number, observe?: 'body', reportProgress?: boolean): Observable; + public deleteNote(idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; + public deleteNote(idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; + public deleteNote(idNote: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (idNote === null || idNote === undefined) { - throw new Error('Required parameter idNote was null or undefined when calling getNoteById.'); + throw new Error('Required parameter idNote was null or undefined when calling deleteNote.'); } let headers = this.defaultHeaders; @@ -143,7 +149,7 @@ export class NotesService { const consumes: string[] = [ ]; - return this.httpClient.request('get',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}`, + return this.httpClient.request('delete',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -154,50 +160,19 @@ export class NotesService { } /** - * - * Récupérer toutes les notes - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer une note par son id. + * @param idNote Id d'une note * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getNotes(asc: boolean, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getNotes(asc: boolean, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getNotes(asc: boolean, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getNotes(asc: boolean, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getNotes.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getNotes.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getNotes.'); - } - - + public getNoteById(idNote: number, observe?: 'body', reportProgress?: boolean): Observable; + public getNoteById(idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getNoteById(idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getNoteById(idNote: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); + if (idNote === null || idNote === undefined) { + throw new Error('Required parameter idNote was null or undefined when calling getNoteById.'); } let headers = this.defaultHeaders; @@ -222,9 +197,8 @@ export class NotesService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/notes/`, + return this.httpClient.request('get',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -234,37 +208,28 @@ export class NotesService { } /** - * - * Récupérer les notes d'une personne a écrite - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer les notes d’un auteur. + * @param idAuteur Id de l'auteur + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getNotesByAuteur(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getNotesByAuteur(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getNotesByAuteur(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getNotesByAuteur(asc: boolean, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getNotesAuteur(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getNotesAuteur(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getNotesAuteur(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getNotesAuteur(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getNotesByAuteur.'); + if (idAuteur === null || idAuteur === undefined) { + throw new Error('Required parameter idAuteur was null or undefined when calling getNotesAuteur.'); } - if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getNotesByAuteur.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getNotesByAuteur.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getNotesByAuteur.'); - } @@ -307,7 +272,7 @@ export class NotesService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/notes/auteur/${encodeURIComponent(String(idReferent))}`, + return this.httpClient.request>('get',`${this.basePath}/notes/${encodeURIComponent(String(idAuteur))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -319,42 +284,28 @@ export class NotesService { } /** - * - * Récupérer une note par son id - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param idReferent id referent - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer le nombre total de notes d’un auteur. + * @param idAuteur Id de l'auteur + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getNotesByCollaborateur(asc: boolean, idCollaborateur: string, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getNotesByCollaborateur(asc: boolean, idCollaborateur: string, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getNotesByCollaborateur(asc: boolean, idCollaborateur: string, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getNotesByCollaborateur(asc: boolean, idCollaborateur: string, idReferent: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getNotesAuteurCount(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable; + public getNotesAuteurCount(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>; + public getNotesAuteurCount(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>; + public getNotesAuteurCount(idAuteur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getNotesByCollaborateur.'); + if (idAuteur === null || idAuteur === undefined) { + throw new Error('Required parameter idAuteur was null or undefined when calling getNotesAuteurCount.'); } - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getNotesByCollaborateur.'); - } - - if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getNotesByCollaborateur.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getNotesByCollaborateur.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getNotesByCollaborateur.'); - } @@ -397,7 +348,7 @@ export class NotesService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/notes/auteur/${encodeURIComponent(String(idReferent))}/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request('get',`${this.basePath}/notes/${encodeURIComponent(String(idAuteur))}/count`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -409,70 +360,16 @@ export class NotesService { } /** - * - * Ajouter une nouvelle note - * @param body - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public nouvelleNote(body: DetailsNoteDTO, observe?: 'body', reportProgress?: boolean): Observable; - public nouvelleNote(body: DetailsNoteDTO, observe?: 'response', reportProgress?: boolean): Observable>; - public nouvelleNote(body: DetailsNoteDTO, observe?: 'events', reportProgress?: boolean): Observable>; - public nouvelleNote(body: DetailsNoteDTO, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (body === null || body === undefined) { - throw new Error('Required parameter body was null or undefined when calling nouvelleNote.'); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.request('post',`${this.basePath}/notes/nouvellenote`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Mettre à jour une note - * @param body - * @param idNote id note + * + * Modifier une note. + * @param body + * @param idNote Id d'une note * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'body', reportProgress?: boolean): Observable; - public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; - public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; + public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'body', reportProgress?: boolean): Observable; + public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'response', reportProgress?: boolean): Observable>; + public updateNote(body: DetailsNoteDTO, idNote: number, observe?: 'events', reportProgress?: boolean): Observable>; public updateNote(body: DetailsNoteDTO, idNote: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { @@ -510,7 +407,7 @@ export class NotesService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}/updateNote`, + return this.httpClient.request('put',`${this.basePath}/notes/${encodeURIComponent(String(idNote))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/participationsFormations.service.ts b/src/app/shared/api-swagger/api/participationsFormations.service.ts index 989aedf..760b280 100644 --- a/src/app/shared/api-swagger/api/participationsFormations.service.ts +++ b/src/app/shared/api-swagger/api/participationsFormations.service.ts @@ -2,8 +2,8 @@ * API du serveur de l'application de digitalisation des EP * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. * - * OpenAPI spec version: 1.3.5 - * + * OpenAPI spec version: 1.3.6 + * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -28,7 +28,7 @@ import { Configuration } from '../configurat @Injectable() export class ParticipationsFormationsService { - protected basePath = 'https://localhost:44393/api'; + protected basePath = 'http://localhost:3000/api'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); @@ -58,64 +58,16 @@ export class ParticipationsFormationsService { /** - * - * Consulter une évaluation d'une formation - * @param idParticipationFormation id participation formation - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public consulterEvaluation(idParticipationFormation: number, observe?: 'body', reportProgress?: boolean): Observable; - public consulterEvaluation(idParticipationFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; - public consulterEvaluation(idParticipationFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; - public consulterEvaluation(idParticipationFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (idParticipationFormation === null || idParticipationFormation === undefined) { - throw new Error('Required parameter idParticipationFormation was null or undefined when calling consulterEvaluation.'); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request('get',`${this.basePath}/evaluations/participationformation/${encodeURIComponent(String(idParticipationFormation))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Evaluer une formation - * @param body - * @param idParticipationFormation id participation formation + * + * Evaluer une formation. + * @param body + * @param idParticipationFormation Id d'une participation formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'body', reportProgress?: boolean): Observable; - public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; - public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; + public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'body', reportProgress?: boolean): Observable; + public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; + public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; public evaluerFormation(body: EvaluationDTO, idParticipationFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { @@ -153,7 +105,7 @@ export class ParticipationsFormationsService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put',`${this.basePath}/evaluations/participationformation/${encodeURIComponent(String(idParticipationFormation))}/evaluer`, + return this.httpClient.request('put',`${this.basePath}/participationsformation/${encodeURIComponent(String(idParticipationFormation))}/evaluation`, { body: body, withCredentials: this.configuration.withCredentials, @@ -165,55 +117,19 @@ export class ParticipationsFormationsService { } /** - * - * Récupérer la liste des formations auxquelles est inscrit le collaborateur - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer une évaluation faite par un collaborateur. + * @param idParticipationFormation Id d'une participation formation * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getParticipationByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getParticipationByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getParticipationByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getParticipationByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getParticipationByCollaborateur.'); - } + public getEvaluationCollaborateur(idParticipationFormation: number, observe?: 'body', reportProgress?: boolean): Observable; + public getEvaluationCollaborateur(idParticipationFormation: number, observe?: 'response', reportProgress?: boolean): Observable>; + public getEvaluationCollaborateur(idParticipationFormation: number, observe?: 'events', reportProgress?: boolean): Observable>; + public getEvaluationCollaborateur(idParticipationFormation: number, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getParticipationByCollaborateur.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getParticipationByCollaborateur.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getParticipationByCollaborateur.'); - } - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); + if (idParticipationFormation === null || idParticipationFormation === undefined) { + throw new Error('Required parameter idParticipationFormation was null or undefined when calling getEvaluationCollaborateur.'); } let headers = this.defaultHeaders; @@ -238,9 +154,8 @@ export class ParticipationsFormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/participationsformation/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + return this.httpClient.request('get',`${this.basePath}/participationsformation/${encodeURIComponent(String(idParticipationFormation))}/evaluation`, { - params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -250,37 +165,28 @@ export class ParticipationsFormationsService { } /** - * - * Récupérer la liste des participants d'une formation - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idFormation id formation - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue + * + * Récupérer la liste des participations de formation d’un collaborateur. + * @param idCollaborateur Id du collaborateur + * @param asc Indique si les données sont récupérées dans l'ordre croissant ou non + * @param numPage Numéro de la page du tableau à afficher + * @param parPAge Nombre d’élément maximum à afficher dans le tableau + * @param texte Texte permettant de filtrer les données + * @param tri Colonne du tableau sur lequel le tri devra être effectué * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getParticipationByFormation(asc: boolean, idFormation: number, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getParticipationByFormation(asc: boolean, idFormation: number, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getParticipationByFormation(asc: boolean, idFormation: number, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getParticipationByFormation(asc: boolean, idFormation: number, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + public getParticipationByCollaborateur(idCollaborateur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; + public getParticipationByCollaborateur(idCollaborateur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; + public getParticipationByCollaborateur(idCollaborateur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; + public getParticipationByCollaborateur(idCollaborateur: string, asc?: boolean, numPage?: number, parPAge?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getParticipationByFormation.'); + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling getParticipationByCollaborateur.'); } - if (idFormation === null || idFormation === undefined) { - throw new Error('Required parameter idFormation was null or undefined when calling getParticipationByFormation.'); - } - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getParticipationByFormation.'); - } - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getParticipationByFormation.'); - } @@ -323,7 +229,7 @@ export class ParticipationsFormationsService { const consumes: string[] = [ ]; - return this.httpClient.request>('get',`${this.basePath}/participationsformation/formation/${encodeURIComponent(String(idFormation))}`, + return this.httpClient.request>('get',`${this.basePath}/participationsformation/${encodeURIComponent(String(idCollaborateur))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, diff --git a/src/app/shared/api-swagger/api/referents.service.ts b/src/app/shared/api-swagger/api/referents.service.ts deleted file mode 100644 index 9f4b76b..0000000 --- a/src/app/shared/api-swagger/api/referents.service.ts +++ /dev/null @@ -1,337 +0,0 @@ -/** - * API du serveur de l'application de digitalisation des EP - * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. - * - * OpenAPI spec version: 1.3.5 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - *//* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent } from '@angular/common/http'; -import { CustomHttpUrlEncodingCodec } from '../encoder'; - -import { Observable } from 'rxjs'; - -import { ErreurDTO } from '../model/erreurDTO'; -import { CollaborateurDTO } from '../model/models'; - -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - -@Injectable() -export class ReferentsService { - - protected basePath = 'https://localhost:44393/api'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (basePath) { - this.basePath = basePath; - } - if (configuration) { - this.configuration = configuration; - this.basePath = basePath || configuration.basePath || this.basePath; - } - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - - - /** - * - * Récupérer le référent d'un collaborateur - * @param idCollaborateur id collaborateur - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getReferentActuelCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; - public getReferentActuelCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getReferentActuelCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getReferentActuelCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getReferentActuelCollaborateur.'); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request('get',`${this.basePath}/referents/actuel/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer un referent par son id - * @param idReferent id referent - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getReferentById(idReferent: string, observe?: 'body', reportProgress?: boolean): Observable; - public getReferentById(idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getReferentById(idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getReferentById(idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (idReferent === null || idReferent === undefined) { - throw new Error('Required parameter idReferent was null or undefined when calling getReferentById.'); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request('get',`${this.basePath}/referents/${encodeURIComponent(String(idReferent))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer la liste de tous les referents - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param fonctions Liste des fonctions des collaborateurs que l'on veut récupérer - * @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer - * @param idBU id de la business unit à laquelle sont rattachées les données à récupérer - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getReferents(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getReferents(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getReferents(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getReferents(asc: boolean, numPage: number, parPAge: number, fonctions?: Array, idAgence?: number, idBU?: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getReferents.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getReferents.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getReferents.'); - } - - - - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (fonctions) { - fonctions.forEach((element) => { - queryParameters = queryParameters.append('fonctions', element); - }) - } - if (idAgence !== undefined && idAgence !== null) { - queryParameters = queryParameters.set('idAgence', idAgence); - } - if (idBU !== undefined && idBU !== null) { - queryParameters = queryParameters.set('idBU', idBU); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/referents`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * - * Récupérer la liste des référents d'un collaborateur - * @param asc Préciser si les données sont dans l'ordre (true) ou dans l'ordre inverse (false) - * @param idCollaborateur id collaborateur - * @param numPage Numéro de la page du tableau qui affiche les données - * @param parPAge Nombre d'éléments affiché sur chaque page du tableau - * @param texte Texte permettant d'identifier l'objet rechercher - * @param tri Colonne du tableau sur lequel le tri s'effectue - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getReferentsByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'body', reportProgress?: boolean): Observable>; - public getReferentsByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'response', reportProgress?: boolean): Observable>>; - public getReferentsByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe?: 'events', reportProgress?: boolean): Observable>>; - public getReferentsByCollaborateur(asc: boolean, idCollaborateur: string, numPage: number, parPAge: number, texte?: string, tri?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - - if (asc === null || asc === undefined) { - throw new Error('Required parameter asc was null or undefined when calling getReferentsByCollaborateur.'); - } - - if (idCollaborateur === null || idCollaborateur === undefined) { - throw new Error('Required parameter idCollaborateur was null or undefined when calling getReferentsByCollaborateur.'); - } - - if (numPage === null || numPage === undefined) { - throw new Error('Required parameter numPage was null or undefined when calling getReferentsByCollaborateur.'); - } - - if (parPAge === null || parPAge === undefined) { - throw new Error('Required parameter parPAge was null or undefined when calling getReferentsByCollaborateur.'); - } - - - - let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); - if (asc !== undefined && asc !== null) { - queryParameters = queryParameters.set('asc', asc); - } - if (numPage !== undefined && numPage !== null) { - queryParameters = queryParameters.set('numPage', numPage); - } - if (parPAge !== undefined && parPAge !== null) { - queryParameters = queryParameters.set('parPAge', parPAge); - } - if (texte !== undefined && texte !== null) { - queryParameters = queryParameters.set('texte', texte); - } - if (tri !== undefined && tri !== null) { - queryParameters = queryParameters.set('tri', tri); - } - - let headers = this.defaultHeaders; - - // authentication (bearerAuth) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - // to determine the Accept header - let httpHeaderAccepts: string[] = [ - 'application/json' - ]; - const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - - return this.httpClient.request>('get',`${this.basePath}/referents/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - -} diff --git a/src/app/shared/api-swagger/api/referentsEP.service.ts b/src/app/shared/api-swagger/api/referentsEP.service.ts new file mode 100644 index 0000000..7271270 --- /dev/null +++ b/src/app/shared/api-swagger/api/referentsEP.service.ts @@ -0,0 +1,177 @@ +/** + * API du serveur de l'application de digitalisation des EP + * API qui sra utilisée afin de faire communiquer le client et le serveur ainsi que le serveur et la boîte noire. + * + * OpenAPI spec version: 1.3.6 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + *//* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; + +import { Observable } from 'rxjs'; + +import { ErreurDTO } from '../model/erreurDTO'; +import { ReferentEPDTO } from '../model/referentEPDTO'; + +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + +@Injectable() +export class ReferentsEPService { + + protected basePath = 'http://localhost:3000/api'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { + if (basePath) { + this.basePath = basePath; + } + if (configuration) { + this.configuration = configuration; + this.basePath = basePath || configuration.basePath || this.basePath; + } + } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } + + + /** + * + * Mettre à jour les collaborateurs d'un référent. + * @param body + * @param idReferent Id d'un référent + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateCollaborateursReferent(body: ReferentEPDTO, idReferent: string, observe?: 'body', reportProgress?: boolean): Observable; + public updateCollaborateursReferent(body: ReferentEPDTO, idReferent: string, observe?: 'response', reportProgress?: boolean): Observable>; + public updateCollaborateursReferent(body: ReferentEPDTO, idReferent: string, observe?: 'events', reportProgress?: boolean): Observable>; + public updateCollaborateursReferent(body: ReferentEPDTO, idReferent: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateCollaborateursReferent.'); + } + + if (idReferent === null || idReferent === undefined) { + throw new Error('Required parameter idReferent was null or undefined when calling updateCollaborateursReferent.'); + } + + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request('put',`${this.basePath}/referentsep/referent/${encodeURIComponent(String(idReferent))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * + * Mettre à jour le référent d'un collaborateur. + * @param body + * @param idCollaborateur Id du collaborateur + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateReferentCollaborateur(body: ReferentEPDTO, idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable; + public updateReferentCollaborateur(body: ReferentEPDTO, idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable>; + public updateReferentCollaborateur(body: ReferentEPDTO, idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable>; + public updateReferentCollaborateur(body: ReferentEPDTO, idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateReferentCollaborateur.'); + } + + if (idCollaborateur === null || idCollaborateur === undefined) { + throw new Error('Required parameter idCollaborateur was null or undefined when calling updateReferentCollaborateur.'); + } + + let headers = this.defaultHeaders; + + // authentication (bearerAuth) required + if (this.configuration.accessToken) { + const accessToken = typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + // to determine the Accept header + let httpHeaderAccepts: string[] = [ + 'application/json' + ]; + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected != undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected != undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request('put',`${this.basePath}/referentsep/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + +}