Mise à jour de la saisie EP et évaluation avec un seule table saisie et récupération des engagements et participations à une formation
parent
c4a57bf458
commit
aa83775a80
@ -0,0 +1,115 @@ |
|||||||
|
/** |
||||||
|
* 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.2.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* 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 { EngagementModel } from '../model/engagementModel'; |
||||||
|
import { ErreurModel } from '../model/erreurModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class EngagementsService { |
||||||
|
|
||||||
|
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; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* récupérer la liste des engagements |
||||||
|
* @param idBu id de la business unit à laquelle sont rattachées les données à récupérer |
||||||
|
* @param idAgence id de l'agence à laquelle sont rattachées les données à récupérer |
||||||
|
* @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(idBu?: number, idAgence?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<EngagementModel>>; |
||||||
|
public getEngagements(idBu?: number, idAgence?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<EngagementModel>>>; |
||||||
|
public getEngagements(idBu?: number, idAgence?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<EngagementModel>>>; |
||||||
|
public getEngagements(idBu?: number, idAgence?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()}); |
||||||
|
if (idBu !== undefined && idBu !== null) { |
||||||
|
queryParameters = queryParameters.set('idBu', <any>idBu); |
||||||
|
} |
||||||
|
if (idAgence !== undefined && idAgence !== null) { |
||||||
|
queryParameters = queryParameters.set('idAgence', <any>idAgence); |
||||||
|
} |
||||||
|
|
||||||
|
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<Array<EngagementModel>>('get',`${this.basePath}/engagements/`, |
||||||
|
{ |
||||||
|
params: queryParameters, |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,107 @@ |
|||||||
|
/** |
||||||
|
* 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.2.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* 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 { ErreurModel } from '../model/erreurModel'; |
||||||
|
import { ParticipationFormationModel } from '../model/participationFormationModel'; |
||||||
|
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
||||||
|
import { Configuration } from '../configuration'; |
||||||
|
|
||||||
|
|
||||||
|
@Injectable() |
||||||
|
export class ParticipationsFormationsService { |
||||||
|
|
||||||
|
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; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
*
|
||||||
|
* récupérer la liste des formations auxquelles est inscrit le 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 getParticipationByCollaborateur(idCollaborateur: string, observe?: 'body', reportProgress?: boolean): Observable<Array<ParticipationFormationModel>>; |
||||||
|
public getParticipationByCollaborateur(idCollaborateur: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<ParticipationFormationModel>>>; |
||||||
|
public getParticipationByCollaborateur(idCollaborateur: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<ParticipationFormationModel>>>; |
||||||
|
public getParticipationByCollaborateur(idCollaborateur: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
||||||
|
|
||||||
|
if (idCollaborateur === null || idCollaborateur === undefined) { |
||||||
|
throw new Error('Required parameter idCollaborateur was null or undefined when calling getParticipationByCollaborateur.'); |
||||||
|
} |
||||||
|
|
||||||
|
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<Array<ParticipationFormationModel>>('get',`${this.basePath}/participationsformation/collaborateur/${encodeURIComponent(String(idCollaborateur))}`, |
||||||
|
{ |
||||||
|
withCredentials: this.configuration.withCredentials, |
||||||
|
headers: headers, |
||||||
|
observe: observe, |
||||||
|
reportProgress: reportProgress |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
/** |
||||||
|
* 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.2.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* 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. |
||||||
|
*/ |
||||||
|
import { CollaborateurModel } from './collaborateurModel'; |
||||||
|
import { EpModel } from './epModel'; |
||||||
|
|
||||||
|
export interface AutorisationModel {
|
||||||
|
id: number; |
||||||
|
referent?: CollaborateurModel; |
||||||
|
ep: EpModel; |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
/** |
||||||
|
* 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.2.0 |
||||||
|
*
|
||||||
|
* |
||||||
|
* 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. |
||||||
|
*/ |
||||||
|
import { EpModel } from './epModel'; |
||||||
|
import { SaisieModel } from './saisieModel'; |
||||||
|
|
||||||
|
export interface DocumentModel {
|
||||||
|
id: number; |
||||||
|
type: string; |
||||||
|
ep?: EpModel; |
||||||
|
saisieCollaborateur?: Array<SaisieModel>; |
||||||
|
saisieCommercial?: Array<SaisieModel>; |
||||||
|
} |
Loading…
Reference in new issue