Informations générales
+ Certifiée
Etat : {{formation.statut.libelle}}
Date formation : {{formation.dateDebut | date:'dd/MM/yyyy à hh:mm'}}
+ Nombre de jours : {{formation.jour}}
+ Nombre d'heures : {{formation.heure}}
Origine : {{formation.origine.libelle}}
Organisme : {{ formation.organisme}}
Mode formation : {{ formation.mode.libelle}}
diff --git a/src/app/formations/formations.component.html b/src/app/formations/formations.component.html
index b84d366..a70b540 100644
--- a/src/app/formations/formations.component.html
+++ b/src/app/formations/formations.component.html
@@ -32,3 +32,11 @@
+
+
diff --git a/src/app/formations/formations.component.ts b/src/app/formations/formations.component.ts
index 938294f..3959b83 100644
--- a/src/app/formations/formations.component.ts
+++ b/src/app/formations/formations.component.ts
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
+import {MatPaginator, PageEvent} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import { FormationDetailsDTO } from "@shared/api-swagger/model/models";
@@ -31,6 +31,9 @@ export class FormationsComponent implements OnInit {
*/
parPage = 5;
+ etat = 0;
+
+
/**
* Observable permettant de faire des requêtes sur le service formation.
*/
@@ -52,6 +55,13 @@ export class FormationsComponent implements OnInit {
*/
search = "";
tri = "";
+
+
+ taille = 100;
+
+ pageOption = [ 5, 15, 20, 30, 50];
+
+ pageEvent: PageEvent;
/**
* Pagination du tableau.
*/
@@ -66,15 +76,16 @@ export class FormationsComponent implements OnInit {
* Spécifie si la liste des EP est en cours de chargement et d'écriture dans le tableau.
*/
chargement = true;
+
constructor(private service:FormationsService) {
}
ngOnInit() {
- this.updateDataSource(0);
+ this.updateDataSource();
}
- updateDataSource(val:number) {
- switch ((val)) {
+ 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),
@@ -102,6 +113,15 @@ export class FormationsComponent implements OnInit {
//this.dataSource.sort = this.sort;
}
+ updatePageInfo(event) : PageEvent{
+ console.log("update")
+ console.log(event);
+ this.parPage = event.pageSize;
+ this.numPage = event.pageIndex+1;
+ this.updateDataSource();
+ return event;
+ }
+
ngOnDestroy() {
if(this.formationsDisponiblesSubscription != undefined) {
this.formationsDisponiblesSubscription.unsubscribe();
diff --git a/src/app/formations/new-formation/new-formation.component.html b/src/app/formations/new-formation/new-formation.component.html
index e2b3001..f87c455 100644
--- a/src/app/formations/new-formation/new-formation.component.html
+++ b/src/app/formations/new-formation/new-formation.component.html
@@ -14,7 +14,7 @@
- Statut formationn
+ Statut formation
{{s.libelle}}
diff --git a/src/app/formations/new-formation/new-formation.component.ts b/src/app/formations/new-formation/new-formation.component.ts
index c883192..eecd172 100644
--- a/src/app/formations/new-formation/new-formation.component.ts
+++ b/src/app/formations/new-formation/new-formation.component.ts
@@ -60,17 +60,18 @@ export class NewFormationComponent implements OnInit {
*/
formationForm = this.fb.group(
{
+ id:[0],
intitule: [""],
origine: [""],
statut : [""],
dateDebut: [""],
dateFin: [""],
- heure: [""],
- jour: [""],
+ heure: [2],
+ jour: [1],
organisme: [""],
mode: [""],
type: [""],
- estCertifie: [""],
+ estCertifie: [false],
idAgence: [1]
}
);
@@ -104,6 +105,7 @@ export class NewFormationComponent implements OnInit {
ajouterFormation() {
this.formationSubscription = this.service.ajouterFormation(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.css b/src/app/home/home-assistante/home-assistante.component.css
index bbd5b89..7599f4c 100644
--- a/src/app/home/home-assistante/home-assistante.component.css
+++ b/src/app/home/home-assistante/home-assistante.component.css
@@ -13,6 +13,10 @@ mat-form-field {
width: auto;
margin-left: 5%;
}
+
+.obligatoire {
+ background-color: red;
+}
/*
table{
width: 100%;
diff --git a/src/app/home/home-assistante/home-assistante.component.html b/src/app/home/home-assistante/home-assistante.component.html
index c7227e8..190cf5f 100644
--- a/src/app/home/home-assistante/home-assistante.component.html
+++ b/src/app/home/home-assistante/home-assistante.component.html
@@ -1,10 +1,8 @@
Bienvenu.e
-AU DESSUS
-
- Recherche un collaborateur
+ Rechercher un collaborateur
close
@@ -39,12 +37,12 @@
Type
- {{row.type}}
+ {{getType(row.type)}}
Etat
- {{row.statut}}
+ {{getEtat(row.statut)}}
@@ -54,13 +52,18 @@
Date entretient
- {{row.datePrevisionnelle}}
+ {{row.datePrevisionnelle}}
-
+
-
-
-EN DESSOUS
+
+
diff --git a/src/app/home/home-assistante/home-assistante.component.ts b/src/app/home/home-assistante/home-assistante.component.ts
index 99a4765..d784fdb 100644
--- a/src/app/home/home-assistante/home-assistante.component.ts
+++ b/src/app/home/home-assistante/home-assistante.component.ts
@@ -4,7 +4,7 @@ import { KeycloakService } from 'keycloak-angular';
import { Observable, Subscription } from 'rxjs';
import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
+import {MatPaginator, PageEvent} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import { EpInformationDTO, CollaborateurDTO } from "@shared/api-swagger/model/models";
@@ -37,7 +37,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
/**
* Nombre d'élément du tableau à affiche en une page.
*/
- parPage = 5;
+ parPage = 15;
/**
* Variable qui concerne le choix d'une des BU de l'agence à laquelle appartient l'assistante.
*/
@@ -52,6 +52,14 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
* En fonction de son utilisation, pourrait remplacer "choixBU".
*/
idsBU : number[] = [];
+
+ taille = 100;
+
+ pageOption = [ 5, 15, 20, 30, 50];
+
+ pageEvent: PageEvent;
+
+
/**
* Subscription pour récupérer les EP.
*/
@@ -88,6 +96,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
*/
chargement = true;
+
constructor(public keycloakService : KeycloakService, private service:EpService) {
}
@@ -109,6 +118,15 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
});
}
+ updatePageInfo(event) : PageEvent{
+ console.log("update")
+ console.log(event);
+ this.parPage = event.pageSize;
+ this.numPage = event.pageIndex+1;
+ this.updateDataSource();
+ return event;
+ }
+
/**
* Récupérer le nombre de temps qu'avait passé le collaborateur au sein d'Apside
* Cette méthode était utilisé avec l'ancienne version des modèle et des Classe d'Affichage
@@ -142,7 +160,7 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
res= "Saisi";
break;
case 3:
- res= "Dates proposées";
+ res= "Attente de l'entretien";
break;
case 4:
res= "Entretien prévu";
@@ -154,6 +172,19 @@ export class HomeAssistanteComponent implements OnInit, AfterViewInit {
return res;
}
+ getColor(row) {
+ console.log("ui");
+ if(row.obligatoire)
+ return "red";
+ return "white";
+ }
+
+ getType(type) {
+ if(type == 1)
+ return "EPA";
+ return "EPS";
+ }
+
/**
* Détruire toutes les Subscriptions utilisées pour libérer de la mémoire après le changement de page.
*/
diff --git a/src/app/home/home-rh/home-rh.component.html b/src/app/home/home-rh/home-rh.component.html
index 88996bd..eecf9bd 100644
--- a/src/app/home/home-rh/home-rh.component.html
+++ b/src/app/home/home-rh/home-rh.component.html
@@ -36,3 +36,12 @@
+
+
+
diff --git a/src/app/home/home-rh/home-rh.component.ts b/src/app/home/home-rh/home-rh.component.ts
index eb22ed7..6e3e12a 100644
--- a/src/app/home/home-rh/home-rh.component.ts
+++ b/src/app/home/home-rh/home-rh.component.ts
@@ -3,9 +3,8 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import {MatTableDataSource} from '@angular/material/table';
-import {MatPaginator} from '@angular/material/paginator';
+import {MatPaginator, PageEvent} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
-
import { FormationDetailsDTO } from "@shared/api-swagger/model/models";
import { FormationsService } from "@shared/api-swagger/api/api";
@@ -33,12 +32,18 @@ export class HomeRHComponent implements OnInit {
/**
* Nombre d'élément du tableau à affiche en une page.
*/
- parPage = 5;
+ parPage = 15;
/**
* Permet d'indiquer au serveur sur quel attribut de l'objet ReferentDTO on souhaite faire le tri
*/
tri = "";
+ taille = 100;
+
+ pageOption = [ 5, 15, 20, 30, 50];
+
+ pageEvent: PageEvent;
+
/**
* Observable pour faire des requêtes sur le service formation.
*/
@@ -86,6 +91,8 @@ export class HomeRHComponent 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.
*/
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(
formations => this.dataSource = new MatTableDataSource(formations),
err => console.log(err)
@@ -98,6 +105,15 @@ export class HomeRHComponent implements OnInit {
return "Non";
}
+ updatePageInfo(event) : PageEvent{
+ console.log("update")
+ console.log(event);
+ this.parPage = event.pageSize;
+ this.numPage = event.pageIndex+1;
+ this.updateFormations();
+ return event;
+ }
+
/**
* Une fois la page fermée, il est nécessaire de se désabonner des Oberservable afin d'éviter les fuites mémoires.
*/
diff --git a/src/app/shared/api-swagger/api/ep.service.ts b/src/app/shared/api-swagger/api/ep.service.ts
index f42503c..920b8da 100644
--- a/src/app/shared/api-swagger/api/ep.service.ts
+++ b/src/app/shared/api-swagger/api/ep.service.ts
@@ -30,7 +30,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();
diff --git a/src/app/shared/api-swagger/api/formations.service.ts b/src/app/shared/api-swagger/api/formations.service.ts
index f0617ae..89f6a6f 100644
--- a/src/app/shared/api-swagger/api/formations.service.ts
+++ b/src/app/shared/api-swagger/api/formations.service.ts
@@ -103,7 +103,6 @@ export class FormationsService {
if (httpContentTypeSelected != undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
-
return this.httpClient.request('post',`${this.basePath}/formations`,
{
body: body,
diff --git a/src/app/shared/nav-menu/nav-menu-rh/nav-menu-rh.component.html b/src/app/shared/nav-menu/nav-menu-rh/nav-menu-rh.component.html
index db09976..6ed5071 100644
--- a/src/app/shared/nav-menu/nav-menu-rh/nav-menu-rh.component.html
+++ b/src/app/shared/nav-menu/nav-menu-rh/nav-menu-rh.component.html
@@ -22,4 +22,4 @@
-
+
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index d528f8d..34b53c1 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -7,8 +7,8 @@ import { KeycloakConfig } from 'keycloak-angular';
// Add here your keycloak setup infos
const keycloakConfig: KeycloakConfig = {
url: 'http://localhost:8080/auth',
- realm: 'Apside',
- clientId: 'GestionEPA'
+ realm: 'apside',
+ clientId: 'gestionepa'
};
export const environment = {