mise à jour de commentaires

develop
Yanaël GRETTE 4 years ago
parent 67216c5b80
commit c0097aac86
  1. 0
      src/app/collaborateurs/collaborateur-routing.module.ts
  2. 7
      src/app/collaborateurs/collaborateurs.component.ts
  3. 4
      src/app/collaborateurs/collaborateurs.module.ts
  4. 3
      src/app/collaborateurs/collaborateurs.routing.module.ts
  5. 38
      src/app/collaborateurs/details-collaborateur/details-collaborateur.component.html
  6. 3
      src/app/collaborateurs/details-collaborateur/details-collaborateur.component.ts
  7. 12
      src/app/demandes-delegation/demandes-delegation.component.ts
  8. 37
      src/app/demandes-delegation/details-demande-delegation/demande-delegation.component.ts
  9. 10
      src/app/engagements/engagements.component.ts
  10. 3
      src/app/ep/details-ep/details-ep.component.ts
  11. 7
      src/app/ep/ep-signes/ep-signes.component.ts
  12. 7
      src/app/ep/ep.component.ts
  13. 3
      src/app/formations/edit-formation/edit-formation.component.ts
  14. 3
      src/app/formations/formations.component.ts
  15. 2
      src/app/formations/new-formation/new-formation.component.ts
  16. 7
      src/app/notes/details-note/details-note.component.ts
  17. 8
      src/app/notes/modifier-note/modifier-note.component.ts
  18. 4
      src/app/notes/notes.component.html
  19. 30
      src/app/notes/notes.component.ts
  20. 18
      src/app/notes/nouvelle-note/nouvelle-note.component.ts
  21. 4
      src/app/referents/assignation-referent/assignation-referent.component.html
  22. 27
      src/app/referents/assignation-referent/assignation-referent.component.ts
  23. 2
      src/app/shared/affichage-details-collaboarteur/affichage-details-collaborateur.ts
  24. 2
      src/app/shared/affichage-details-collaboarteur/dialog-assignation-rapide/dialog-assignation-rapide-collaborateurs.html
  25. 16
      src/app/shared/affichage-details-collaboarteur/dialog-assignation-rapide/dialog-assignation-rapide.component.ts
  26. 24
      src/app/shared/affichage-details-collaboarteur/prochain-ep/prochain-ep.component.html
  27. 4
      src/app/shared/affichage-details-collaboarteur/prochain-ep/prochain-ep.component.ts
  28. 8
      src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.html
  29. 27
      src/app/shared/mat-tables/collaborateurs-table/collaborateurs.table.ts
  30. 2
      src/app/shared/mat-tables/engagements-table/engagements-table.html
  31. 10
      src/app/shared/mat-tables/engagements-table/engagements-table.ts
  32. 8
      src/app/shared/mat-tables/ep-table/ep-table.html
  33. 20
      src/app/shared/mat-tables/ep-table/ep-table.ts
  34. 4
      src/app/shared/mat-tables/formations-table/formations.table.html
  35. 18
      src/app/shared/mat-tables/formations-table/formations.table.ts

@ -6,8 +6,6 @@ import { Router } from '@angular/router';
/**
* Composant qui sert à l'affichage de la liste des collaborateurs en fonction de l'agence de son utilitateur.
* Seuls les commerciaux, RH et assistantes pourront accéder à la liste des collaborateurs.
* Les données affichées : Agence-Nom Prénom-Date Embauche-Responsable Commercial-Date Prochain EP.
*/
@Component({
selector: 'app-collaborateurs',
@ -37,6 +35,11 @@ export class CollaborateursComponent {
constructor(private router: Router) {}
/**
* Fonction permettant d'ouvrir les détails d'un référent ou d'un collaborateur en fonction de la case cliquée
*
* @param event Evènement reçu par le composant enfant, contient le type du collaborateur reçu (référent, collaborateur) et les données collaborateur
*/
event(event : any) {
switch(event.type) {
case "collaborateur":

@ -17,9 +17,7 @@ import { MatTablesModule } from "@shared/mat-tables/mat-tables.module";
import { CollaborateursRoutingModule } from "./collaborateurs.routing.module";
import { AffichageDetailsCollaborateurModule } from "@shared/affichage-details-collaboarteur/affichage-details-collaborateur.module";
/**
* Module collaborateur.
*/
@NgModule({
declarations: [
CollaborateursComponent, DetailsCollaborateurComponent,

@ -13,9 +13,6 @@ import { AuthGuard } from '../shared/auth/auth.guard';
import { Role } from '../shared/utils/roles';
/**
* Routes du module collaborateur
*/
const routes: Routes = [
{ path:paths_collaborateurs.formations, component: FormationsCollaboateurComponent, canActivate: [AuthGuard] },
{ path:paths_collaborateurs.evaluation, component: EvaluationComponent, canActivate: [AuthGuard] },

@ -1,39 +1,3 @@
<app-nav-menu></app-nav-menu>
<affichage-details-collaborateur [idCollaborateur]="idCollaborateur"></affichage-details-collaborateur>
<!--
<ng-container *ngIf= "eploaded && nbEP==0">
<h3> Aucun EP effectué encore </h3>
</ng-container>
<ng-container *ngIf= "eploaded && nbEP>0">
Affichage de la liste des EP effectués
<h3>Liste des précédents EP</h3>
<mat-table [dataSource]="this.dataSource" matSort>
<ng-container matColumnDef="dateentretien">
<mat-header-cell *matHeaderCellDef mat-sort-header>Date entretient</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.datePrevisionnelle }}</mat-cell>
</ng-container>
<ng-container matColumnDef="referent">
<mat-header-cell *matHeaderCellDef mat-sort-header>Référent</mat-header-cell>
<mat-cell *matCellDef="let row"> {{ getReferent(row.referent) }}</mat-cell>
</ng-container>
<ng-container matColumnDef="type">
<mat-header-cell *matHeaderCellDef mat-sort-header>Type</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.type }}</mat-cell>
</ng-container>
<ng-container matColumnDef="details">
<mat-header-cell *matHeaderCellDef mat-sort-header></mat-header-cell>
<mat-cell *matCellDef="let row" [routerLink]="['/ep',row.id]"> Voir détails EP </mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
</ng-container>
-->
<affichage-details-collaborateur [idCollaborateur]="idCollaborateur"></affichage-details-collaborateur>

@ -4,7 +4,7 @@ import {ActivatedRoute} from '@angular/router';
/**
* Composant pour gérer l'affichage des détails d'un collaborateur et de ses EP
* Composant pour gérer l'affichage des détails d'un collaborateur avec ses formations et ses EP
*/
@Component({
selector: 'app-details-collaborateur',
@ -13,6 +13,7 @@ import {ActivatedRoute} from '@angular/router';
export class DetailsCollaborateurComponent {
idCollaborateur: string;
constructor(private route: ActivatedRoute) {
this.idCollaborateur = this.route.snapshot.paramMap.get('id');
}

@ -5,7 +5,8 @@ import { cles } from '@shared/utils/cles';
import { Subscription } from 'rxjs';
/**
*/
* Composant pour faire afficher la liste des demandes de délégation reçues
*/
@Component({
selector: 'app-demandes-delegation',
templateUrl: './demandes-delegation.component.html'
@ -25,12 +26,12 @@ export class DemandesDelegationComponent implements OnInit {
ngOnInit() {
this.recupererIdCollaborateurConencte();
this.setIdCollaborateurConnecte();
}
recupererIdCollaborateurConencte() {
setIdCollaborateurConnecte() {
if(sessionStorage.getItem(cles.sessionKeyConnectee) == undefined) {
setTimeout( () => this.recupererIdCollaborateurConencte(), 1000);
setTimeout( () => this.setIdCollaborateurConnecte(), 1000);
}
else {
const collaborateurConnecte: CollaborateurDTO = JSON.parse(sessionStorage.getItem(cles.sessionKeyConnectee));
@ -39,6 +40,9 @@ export class DemandesDelegationComponent implements OnInit {
}
}
/**
* Cette fonction permet de mettre à jour l'affichage de la liste des demande de délégation
*/
updateListeDemandesDelegation() {
this.chargement = false;
this.demandeDelegationSubscription = this.demandeDelegationService.getDemandesDelegationReferent(this.idCollaborateurConnecte).subscribe(

@ -7,7 +7,8 @@ import { Subscription } from 'rxjs';
/**
*/
* Composant pour faire afficher les détails d'une demande de délégation
*/
@Component({
selector: 'app-demande-delegation',
templateUrl: './demande-delegation.component.html'
@ -62,9 +63,21 @@ export class DemandeDelegationComponent implements OnInit {
})
export class DialogReponseDemandeDelegation {
/**
* Texte à afficher lors de la réponse à une demande de délégation. Le texte dépend de si la demande va être acceptée ou bien refusée.
*/
texte: string ="";
/**
* Indique si la réponse est un refus.
*/
estRefus: boolean = false;
raisonRefus: string;
/**
* Contient l'information indiquant si la réponse a é validé et doit être enregistré ou non et la demande de délégation cible.
*/
reponse: any = {
engistree: false
}
@ -81,18 +94,18 @@ export class DialogReponseDemandeDelegation {
}
}
enregistrer() {
if(this.estRefus && this.raisonRefus == "")
return;
let demandeDelegation: DemandeDelegationDTO = this.data.demandeDelegation;
demandeDelegation.etatDemande = this.data.etatDemande;
demandeDelegation.raisonRefus = this.raisonRefus;
this.reponse = {
engistree: true,
demandeDelegation: demandeDelegation
enregistrer() {
if(this.estRefus && this.raisonRefus == "")
return;
let demandeDelegation: DemandeDelegationDTO = this.data.demandeDelegation;
demandeDelegation.etatDemande = this.data.etatDemande;
demandeDelegation.raisonRefus = this.raisonRefus;
this.reponse = {
engistree: true,
demandeDelegation: demandeDelegation
}
this.fermer();
}
this.fermer();
}

@ -4,7 +4,9 @@ import { MatSnackBar } from "@angular/material/snack-bar";
import { CollaborateurDTO, EngagementDTO, EngagementsService, EpInformationDTO, EtatEngagement, afficherEtatEngagement } from "@shared/api-swagger";
import { Subscription } from "rxjs";
/**
* Composant pour afficher la liste des engagements EP
*/
@Component({
selector: "app-engagements",
templateUrl: "./engagements.html"
@ -20,6 +22,9 @@ export class EngagementsComponent {
}
}
/**
* Dialog pour afficher les détails d'un engagement et y donner une réponse si possible
*/
@Component( {
selector: "dialog-engagements",
templateUrl: "dialog-engagements.html"
@ -31,6 +36,9 @@ export class DialogEngagementsComponent {
etatEngagement: any = EtatEngagement;
engagementsSubscription: Subscription;
/**
* Indique si l'on souhaite donner une réponse à l'engagement encore en cours ou non
*/
donnerReponse: boolean = false;
raisonRefus : string = "";
engagementRespecte: boolean = true;

@ -5,6 +5,9 @@ import { AuthService } from "@shared/auth/auth.service";
import { Role } from "@shared/utils/roles";
import { Subscription } from "rxjs";
/**
* Composant pour afficher les détails d'un EP
*/
@Component({
selector : "details-ep",
templateUrl: "./details-ep.component.html",

@ -3,7 +3,7 @@ import { Router } from '@angular/router';
import { epTypeRecherche } from '@shared/utils/cles';
/**
* Composant qui permet la consultation de la liste des EP signés collaborateur
* Composant qui permet la consultation de la liste des EP signés
*/
@Component({
selector: 'app-ep-signes',
@ -17,6 +17,11 @@ export class EpSignesComponent {
constructor(private router: Router){}
/**
* Evènement permettant de choisir si l'on souhaite ouvrir les détails du collaborateur, du référent ou bien de l'EP
*
* @param event Evènement reçu par le composant enfant, contient le type de l'évènement (référent, ep, collaborateur) et les données ep
*/
eventEmitter(event: any) {
switch(event.type) {
case "collaborateur":

@ -6,7 +6,9 @@ import { cles, epTypeRecherche } from '@shared/utils/cles';
import { Role } from '@shared/utils/roles';
/**
* Composant pour faire afficher les EP signés, référent et participants du connecté
*/
@Component({
selector: 'app-ep',
templateUrl: './ep.component.html'
@ -36,6 +38,7 @@ export class EpComponent implements OnInit {
this.setIdCollaborateur();
}
setIdCollaborateur() {
if(sessionStorage.getItem(cles.sessionKeyConnectee) == undefined) {
setTimeout( () => this.setIdCollaborateur(), 1000);
@ -47,7 +50,7 @@ export class EpComponent implements OnInit {
}
ouvrirEP(event) {
ouvrirEP(event : any) {
if(event.type == "ep")
this.router.navigate(["/ep", event.ep.id]);
}

@ -14,7 +14,8 @@ import { FormationDTO, ModeFormationDTO, TypeFormationDTO, StatutFormationDTO, O
import { FormationsService } from '@shared/api-swagger/api/api';
/**
*/
* Composant pour modifier une formation
*/
@Component({
selector: 'app-edit-formation',
templateUrl: './edit-formation.component.html',

@ -1,7 +1,8 @@
import { Component } from '@angular/core';
/**
*/
* Composant pour faire afficher la liste des formations liées à l'agence du connecté
*/
@Component({
selector: 'app-formations',
templateUrl: './formations.component.html'

@ -8,7 +8,7 @@ import { FormationDTO, ModeFormationDTO, TypeFormationDTO, StatutFormationDTO, O
import { FormationsService } from "@shared/api-swagger/api/api";
/**
* Composant pour l'ajout d'une nouvelle formation
* Composant pour ajotuer une nouvelle formation
*/
@Component({
selector: 'app-new-formation',

@ -4,7 +4,9 @@ import { ActivatedRoute, Router } from "@angular/router";
import { DetailsNoteDTO, NotesService } from "@shared/api-swagger";
import { Subscription } from "rxjs";
/**
* Composant pour faire afficher les détails d'une note d'un manager ou d'un RA
*/
@Component({
selector: "app-details-note",
templateUrl: "./details-note.component.html"
@ -27,6 +29,9 @@ export class DetailsNoteComponent implements OnInit{
}
}
/**
* Permet d'ouvrir un popup pour effectuer la validation de la suppresion d'une note
*/
supprimerNote() {
this.dialog.open(DialogSuppressionNoteComponent, { data: this.note})
}

@ -6,6 +6,10 @@ import { ActivatedRoute, Router } from "@angular/router";
import { CollaborateurDTO, DetailsNoteDTO, NotesService } from "@shared/api-swagger";
import { Subscription } from "rxjs";
/**
* Composant pour modifier une note
*/
@Component({
selector: "modifier-note",
templateUrl: "./modifier-note.component.html"
@ -14,6 +18,7 @@ export class ModifierNoteComponent implements OnInit{
chercherNoteSubscription: Subscription;
modifierNoteSubscription: Subscription;
dialogSubscription: Subscription;
@ -22,6 +27,9 @@ export class ModifierNoteComponent implements OnInit{
id: any;
/**
* Form lié à la note qui devra être mise à jour
*/
noteForm: FormGroup;
constructor(private noteService: NotesService, private fb: FormBuilder, private router: Router,

@ -21,7 +21,7 @@
<ng-container *ngIf="taille != 0">
<mat-table [dataSource]="dataSource" (matSortChange)="triTableau($event)" matSort matSortActive="{{this.tri}}" matSortDirection="desc">
<mat-table [dataSource]="dataSource" (matSortChange)="trierTableau($event)" matSort matSortActive="{{this.tri}}" matSortDirection="desc">
<ng-container matColumnDef="collaborateur">
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Collaborateur</mat-header-cell>
@ -49,7 +49,7 @@
[pageIndex]="numPage-1"
[pageSize]="parPage"
[pageSizeOptions]="pageOption"
(page)="updatePageInfo($event)">
(page)="updatePaginationTableau($event)">
</mat-paginator>
</ng-container>

@ -28,7 +28,7 @@ export class NotesComponent implements OnInit {
notesSubscriber: Subscription;
notesCountSubscriber: Subscription;
id: string;
idCollaborateur: string;
dataSource: MatTableDataSource<AffichageNoteDTO>;
@ -40,7 +40,7 @@ export class NotesComponent implements OnInit {
setSearch() {
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
resetSearch() {
@ -49,40 +49,42 @@ export class NotesComponent implements OnInit {
}
ngOnInit() {
this.recupererId();
this.setIdCollaborateur();
}
recupererId() {
setIdCollaborateur() {
if(sessionStorage.getItem(cles.sessionKeyConnectee) == undefined){
setTimeout( () => this.recupererId(), 1000);
setTimeout( () => this.setIdCollaborateur(), 1000);
}
else {
const collaborateurConnecte : CollaborateurDTO = JSON.parse(sessionStorage.getItem(cles.sessionKeyConnectee));
this.id = collaborateurConnecte.id;
this.idCollaborateur = collaborateurConnecte.id;
this.chargement = false;
this.updateDataSource();
this.updateDonneesTableau();
}
}
updateDataSource() {
this.notesSubscriber = this.notesService.getNotesAuteur(this.id, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe(
updateDonneesTableau() {
this.notesSubscriber = this.notesService.getNotesAuteur(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe(
notes => { console.log(notes); this.dataSource = new MatTableDataSource(notes);},
err => console.log(err)
);
this.notesCountSubscriber = this.notesService.getNotesAuteurCount(this.id, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe(
this.notesCountSubscriber = this.notesService.getNotesAuteurCount(this.idCollaborateur, this.asc, this.numPage, this.parPage, this.search, this.tri).subscribe(
count => this.taille = count,
err => console.log(err)
);
}
updatePageInfo(event){
updatePaginationTableau(event :any){
this.parPage = event.pageSize;
this.numPage = event.pageIndex+1;
this.updateDataSource();
this.updateDonneesTableau();
}
triTableau(e) {
trierTableau(e :any) {
this.tri = e.active;
switch(e.direction) {
case "asc":
@ -92,7 +94,7 @@ export class NotesComponent implements OnInit {
this.asc = false;
break;
}
this.updateDataSource();
this.updateDonneesTableau();
}

@ -6,6 +6,8 @@ import { CollaborateurDTO, DetailsNoteDTO, NotesService } from "@shared/api-swag
import { cles, collaborateurTypeRecherche } from "@shared/utils/cles";
import { Subscription } from "rxjs";
@Component({
selector: "nouvelle-note",
templateUrl: "./nouvelle-note.component.html"
@ -18,6 +20,9 @@ export class NouvelleNoteComponent {
collaborateurChoisi: CollaborateurDTO;
/**
* Form lié à la note à ajouter
*/
noteForm = this.fb.group(
{
titre: [""],
@ -48,6 +53,9 @@ export class NouvelleNoteComponent {
);
}
/**
* Permet d'ouvrir un popup qui va permettre de choisir le collaborateur lié à la note
*/
choixCollaborateur() {
const datas = { data: this.collaborateurChoisi, width: "80%", height: '80%'};
const dialogRef = this.dialog.open(DialogChoixCollaborateurNoteComponent, datas);
@ -89,12 +97,20 @@ export class DialogChoixCollaborateurNoteComponent {
this.dialogRef.close();
}
/**
* Enregister le choix du collaborateur de la note
*/
enregistrerChoix() {
if(this.collaborateurChoisi != undefined) {
this.dialogRef.close(this.collaborateurChoisi);
}
}
/**
* Evènement permettant de mettre à jour le collaborateur de la note avec le collaborateur reçu par le composant enfant
* @param event Evènement reçu du composant enfant
*/
choisirCollaborateur(event : any) {
this.collaborateurChoisi = event.collaborateur;

@ -6,7 +6,7 @@
<mat-step label="Choix du référent" [completed]="referentChoisi != undefined">
<p *ngIf="referentChoisi == undefined">Veuillez sélectionner un référent</p>
<p *ngIf="referentChoisi != undefined">Référent sélectionné : {{referentChoisi.nom}} {{referentChoisi.prenom}}</p>
<collaborateurs-table [typeRecherche]="typeRechercheReferent" [rechercherParBU]="rechercherParBu" [roles]="rolesReferents" [displayedColumns]="displayedColumnsReferent" [rechercherParDate]="rechercherParDate" (eventEmitter)="choixReferent($event)" ></collaborateurs-table>
<collaborateurs-table [typeRecherche]="typeRechercheReferent" [rechercherParBU]="rechercherParBu" [roles]="rolesReferents" [displayedColumns]="displayedColumnsReferent" [rechercherParDate]="rechercherParDate" (eventEmitter)="selectionnerReferent($event)" ></collaborateurs-table>
</mat-step>
<mat-step label="Choix des collaborateurs" [completed]="collaborateursSelectionnes.length != 0" >
@ -26,7 +26,7 @@
</mat-chip-list>
</ng-container>
<collaborateurs-table [typeRecherche]="typeRechercheCollaborateursEP" [rechercherParBU]="rechercherParBu" [roles]="rolesCollaborateurs" [displayedColumns]="displayedColumnsCollaborateurs" [rechercherParDate]="rechercherParDate" [collaborateursEP]="collaborateursEP" [collaborateursAjouts]="collaborateursSelectionnes" (eventEmitter)="ajoutCollaborateur($event)" ></collaborateurs-table>
<collaborateurs-table [typeRecherche]="typeRechercheCollaborateursEP" [rechercherParBU]="rechercherParBu" [roles]="rolesCollaborateurs" [displayedColumns]="displayedColumnsCollaborateurs" [rechercherParDate]="rechercherParDate" [collaborateursEP]="collaborateursEP" [collaborateursAjouts]="collaborateursSelectionnes" (eventEmitter)="selectionnerCollaborateur($event)" ></collaborateurs-table>
</mat-step>
<mat-step label="Confirmation">

@ -23,7 +23,6 @@ export class AssignationReferentComponent {
referentChoisi : CollaborateurDTO = undefined;
rolesReferents : string[] = ["Manager", "RA", "CP", "TL"];
typeRechercheReferent: string = collaborateurTypeRecherche.referents;
@ -36,13 +35,13 @@ export class AssignationReferentComponent {
collaborateursSelectionnes: CollaborateurDTO[] = [];
/**
* Liste des colonnes du tableau à afficher pour les référents.
*/
* Liste des colonnes à afficher lors du choix du référent
*/
displayedColumnsReferent : string[] = ["businessunit", "collaborateur"];
/**
* Liste des colonnes du tableau à afficher.
*/
* Liste des colonnes à afficher lors du choix des collaborateurs
*/
displayedColumnsCollaborateurs : string[] = ["businessunit", "collaborateur", "datearrivee", "referent"];
collaborateurSubscription: Subscription;
@ -53,13 +52,17 @@ export class AssignationReferentComponent {
private snackBar: MatSnackBar) {
}
choixReferent(event: any) {
selectionnerReferent(event: any) {
console.log(event);
this.referentChoisi = event.collaborateur;
this.setCollaborateurEP();
this.setCollaborateursEP();
}
setCollaborateurEP() {
/**
* Récupérer la liste des collaborateurs EP du référent sélectionné
*/
setCollaborateursEP() {
this.collaborateurSubscription = this.collaborateurService.getCollaborateursByReferent(this.referentChoisi.id).subscribe(
collaborateurs => {
this.collaborateursEP = collaborateurs;
@ -69,7 +72,12 @@ export class AssignationReferentComponent {
);
}
ajoutCollaborateur(event:any) {
/**
* Permet de sélectionner un collaborateur et de l'ajouter ou l'enlever de la liste des collaborateurs à ajouter si il n'est pas déjà un collaborateur EP du référent
* @param event contient le collaborateur qui a é récupéré
*/
selectionnerCollaborateur(event:any) {
if(event.type != "collaborateur")
return;
if(event.collaborateur.id == this.referentChoisi.id) {
@ -95,6 +103,7 @@ export class AssignationReferentComponent {
this.collaborateursSelectionnes = this.collaborateursSelectionnes.filter(c => c.id != collaborateur.id);
}
mettreAJourReferentEP() {
const referentEP :ReferentEPDTO = {
idReferent: this.referentChoisi.id,

@ -62,7 +62,7 @@ export class AffichageDetailsCollaborateurComponent implements OnInit{
}
}
ouvrirEP(event) {
ouvrirEP(event :any) {
if(event.type == "ep")
this.router.navigate(["/ep", event.ep.id]);
}

@ -14,4 +14,4 @@
</ng-container>
<p *ngIf="collaborateursSelectionnes.length == 0">Veuillez sélectionner au moins un collaborateur</p>
<button mat-raised-button color="primary" (click)="annuler()">Annuler</button>
<collaborateurs-table [rechercherParBU]="rechercherParBU" [rechercherParDate]="rechercherParDate" [roles]="roles" [displayedColumns]="displayedColumns" [typeRecherche]="typeRecherche" (eventEmitter)="ajoutCollaborateur($event)" [collaborateursEP]="collaborateursEP" [collaborateursAjouts]="collaborateursSelectionnes" ></collaborateurs-table>
<collaborateurs-table [rechercherParBU]="rechercherParBU" [rechercherParDate]="rechercherParDate" [roles]="roles" [displayedColumns]="displayedColumns" [typeRecherche]="typeRecherche" (eventEmitter)="selectionnerCollaborateur($event)" [collaborateursEP]="collaborateursEP" [collaborateursAjouts]="collaborateursSelectionnes" ></collaborateurs-table>

@ -31,7 +31,7 @@ export class DialogAssignationRapideReferentComponent {
this.referentChoisi = data.referent;
}
selectionnerReferent(event) {
selectionnerReferent(event :any) {
this.referentChoisi = event.collaborateur;
}
@ -100,8 +100,11 @@ export class DialogAssignationRapideCollaborateursComponent implements OnInit{
);
}
ajoutCollaborateur(event:any) {
/**
* Permet de sélectionner un collaborateur et de l'ajouter ou l'enlever de la liste des collaborateurs à ajouter si il n'est pas déjà un collaborateur EP du référent
* @param event contient le collaborateur qui a é récupéré
*/
selectionnerCollaborateur(event:any) {
if(event.type != "collaborateur")
return;
if(event.collaborateur.id == this.data.id) {
@ -126,12 +129,7 @@ export class DialogAssignationRapideCollaborateursComponent implements OnInit{
enleverCollaborateur(collaborateur: CollaborateurDTO) {
this.collaborateursSelectionnes = this.collaborateursSelectionnes.filter(c => c.id != collaborateur.id);
}
ajouterCollaborateur(event) {
if(event.type == "collaborateur") {
}
}
mettreAJourReferentEP() {
const referentEP : ReferentEPDTO = {

@ -2,29 +2,29 @@
<mat-spinner></mat-spinner>
</ng-container>
<ng-container *ngIf="!chargement">
<ng-container *ngIf="ep == undefined">
<ng-container *ngIf="prochainEP == undefined">
<p> Aucun prochain EP n'a été trouvé </p>
</ng-container>
<ng-container *ngIf="ep != undefined">
<ng-container *ngIf="ep.statut == statutEP.cree">
<p> Prochain {{ep.type}} disponible pour saisie le {{ ep.dateDisponibilite | date: "dd/MM/yyyy" }} </p>
<ng-container *ngIf="prochainEP != undefined">
<ng-container *ngIf="prochainEP.statut == statutEP.cree">
<p> Prochain {{prochainEP.type}} disponible pour saisie le {{ prochainEP.dateDisponibilite | date: "dd/MM/yyyy" }} </p>
</ng-container>
<ng-container *ngIf="ep.statut != statutEP.cree">
<p> {{ep.type}} : {{ afficherStatutEP(ep.statut) }} </p>
<p> Disponible depuis le {{ ep.dateDisponibilite | date : "dd/MM/yyyy" }}</p>
<p> Date d'entretien le {{ ep.datePrevisionnelle | date : "dd/MM/yyyy" }}</p>
<ng-container *ngIf="ep.referent != undefined">
<p> Référent EP : {{ep.referent.nom}} {{ep.referent.prenom}} </p>
<ng-container *ngIf="prochainEP.statut != statutEP.cree">
<p> {{prochainEP.type}} : {{ afficherStatutEP(prochainEP.statut) }} </p>
<p> Disponible depuis le {{ prochainEP.dateDisponibilite | date : "dd/MM/yyyy" }}</p>
<p> Date d'entretien le {{ prochainEP.datePrevisionnelle | date : "dd/MM/yyyy" }}</p>
<ng-container *ngIf="prochainEP.referent != undefined">
<p> Référent EP : {{prochainEP.referent.nom}} {{prochainEP.referent.prenom}} </p>
</ng-container>
<ng-container *ngIf="ep.referent == undefined">
<ng-container *ngIf="prochainEP.referent == undefined">
<p> Il n'y a actuellement aucun référent pour cet EP </p>
</ng-container>
<button mat-stroked-button *ngIf="ep.statut != statutEP.Disponible" [routerLink]="['/ep',ep.id]">Accéder à l'EP</button>
<button mat-stroked-button *ngIf="prochainEP.statut != statutEP.Disponible" [routerLink]="['/ep',prochainEP.id]">Accéder à l'EP</button>
</ng-container>
</ng-container>

@ -16,7 +16,7 @@ export class ProchainEpComponent implements OnInit {
chargement: boolean = true;
ep : EpInformationDTO;
prochainEP : EpInformationDTO;
epSubscription: Subscription;
@ -28,7 +28,7 @@ export class ProchainEpComponent implements OnInit {
this.epSubscription = this.epService.getProchainEPCollaborateur(this.idCollaborateur).subscribe(
ep => {
console.log(ep);
this.ep = ep;
this.prochainEP = ep;
this.chargement = false;
},
err => {

@ -22,7 +22,7 @@
<!-- Datepicker début -->
<mat-form-field >
<mat-label>Date de début</mat-label>
<input [(ngModel)]="dateDebut" matInput [matDatepicker]="dateDebutPicker" [max]="dateFin" disabled (dateChange)="updateDataSource()">
<input [(ngModel)]="dateDebut" matInput [matDatepicker]="dateDebutPicker" [max]="dateFin" disabled (dateChange)="updateDonneesTableau()">
<mat-icon *ngIf="this.dateDebut != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(1)">clear</mat-icon>
<mat-datepicker-toggle matSuffix [for]="dateDebutPicker"></mat-datepicker-toggle>
<mat-datepicker touchUi #dateDebutPicker disabled="false"></mat-datepicker>
@ -31,7 +31,7 @@
<!-- Datepicker fin -->
<mat-form-field>
<mat-label>Date de fin</mat-label>
<input [(ngModel)]="dateFin" matInput [matDatepicker]="dateFinPicker" [min]="dateDebut" disabled (dateChange)="updateDataSource()">
<input [(ngModel)]="dateFin" matInput [matDatepicker]="dateFinPicker" [min]="dateDebut" disabled (dateChange)="updateDonneesTableau()">
<mat-icon *ngIf="this.dateFin != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(2)">clear</mat-icon>
<mat-datepicker-toggle matSuffix [for]="dateFinPicker"></mat-datepicker-toggle>
<mat-datepicker touchUi #dateFinPicker disabled="false"></mat-datepicker>
@ -46,7 +46,7 @@
<!-- Affichage de la liste des collaborateurs -->
<mat-table matSort [dataSource]="dataSource" (matSortChange)="triTableau($event)" matSortActive="{{this.tri}}" matSortDirection="asc" >
<mat-table matSort [dataSource]="dataSource" (matSortChange)="trierTableau($event)" matSortActive="{{this.tri}}" matSortDirection="asc" >
<ng-container matColumnDef="businessunit">
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Agence</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.businessUnit.nom }}</mat-cell>
@ -79,7 +79,7 @@
[pageIndex]="numPage-1"
[pageSize]="parPage"
[pageSizeOptions]="pageOption"
(page)="updatePageInfo($event)">
(page)="updatePaginationTableau($event)">
</mat-paginator>
</ng-container>
</ng-container>

@ -160,7 +160,7 @@ export class CollaborateursTableComponent implements OnInit {
* Mettre à jour les informations à afficher dans la tableau.
* 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() {
updateDonneesTableau() {
switch(this.typeRecherche) {
case collaborateurTypeRecherche.collaborateurs:
case collaborateurTypeRecherche.referents:
@ -215,17 +215,17 @@ export class CollaborateursTableComponent implements OnInit {
this.dateDebut = undefined;
if(val == 2)
this.dateFin = undefined;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
* Mettre à jour le nomre d'élément à afficher par page et le numéro de la page
* @param event évènement de la pagination
*/
updatePageInfo(event){
updatePaginationTableau(event){
this.parPage = event.pageSize;
this.numPage = event.pageIndex+1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -233,7 +233,7 @@ export class CollaborateursTableComponent implements OnInit {
*/
setSearch() {
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
@ -250,7 +250,7 @@ export class CollaborateursTableComponent implements OnInit {
* Trier le tableau en fonction de l'évènement de la colonne
* @param e évènement du tri
*/
triTableau(e) {
trierTableau(e) {
this.tri = e.active;
switch(e.direction) {
case "asc":
@ -260,7 +260,7 @@ export class CollaborateursTableComponent implements OnInit {
this.asc = false;
break;
}
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -276,12 +276,17 @@ export class CollaborateursTableComponent implements OnInit {
for(let bu of this.bus) {
this.busIds.push(bu.id);
}
this.updateDataSource();
this.updateDonneesTableau();
this.chargement = false;
}
}
setClassCouleurLigne(collaborateur: CollaborateurDTO) {
/**
* Permettre d'ajouter une classe à la ligne afin de choisir la couleur de cette même ligne
*
* @param collaborateur le collaborateur de la ligne du tableau
*/
setClassCouleurLigne(collaborateur: CollaborateurDTO) {
if(this.contientCollaborateur(this.collaborateursAjouts,collaborateur)) {
return "collaborateurAjoute";
}
@ -308,7 +313,7 @@ export class CollaborateursTableComponent implements OnInit {
this.busIds = this.busIds.filter( (id) => id != bu.id);
}
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**

@ -73,7 +73,7 @@
[pageIndex]="numPage-1"
[pageSize]="parPage"
[pageSizeOptions]="pageOption"
(page)="updatePageInfo($event)">
(page)="updatePaginationTableau($event)">
</mat-paginator>
</ng-container>

@ -104,7 +104,7 @@ export class EngagementTableComponent implements OnInit {
}
updateDataSource() {
updateDonneesTableau() {
if(this.busIds.length == 0 || this.etatsEngagements.length == 0) {
this.taille = 0;
this.dataSource = new MatTableDataSource(undefined);
@ -138,14 +138,14 @@ export class EngagementTableComponent implements OnInit {
for(let bu of this.bus) {
this.busIds.push(bu.id);
}
this.updateDataSource();
this.updateDonneesTableau();
this.chargement = false;
}
}
setSearch() {
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
resetSearch() {
@ -157,10 +157,10 @@ export class EngagementTableComponent implements OnInit {
* Mettre à jour le nomre d'élément à afficher par page et le numéro de la page
* @param event évènement de la pagination
*/
updatePageInfo(event){
updatePaginationTableau(event){
this.parPage = event.pageSize;
this.numPage = event.pageIndex+1;
this.updateDataSource();
this.updateDonneesTableau();
}
updateEtatsEngagement(event:boolean, etat:EtatEngagement) {

@ -36,7 +36,7 @@
<!-- Datepicker début -->
<mat-form-field >
<mat-label>Date de début</mat-label>
<input [(ngModel)]="dateDebut" matInput [matDatepicker]="dateDebutPicker" [max]="dateFin" disabled (dateChange)="updateDataSource()">
<input [(ngModel)]="dateDebut" matInput [matDatepicker]="dateDebutPicker" [max]="dateFin" disabled (dateChange)="updateDonneesTableau()">
<mat-icon *ngIf="this.dateDebut != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(1)">clear</mat-icon>
<mat-datepicker-toggle matSuffix [for]="dateDebutPicker"></mat-datepicker-toggle>
<mat-datepicker touchUi #dateDebutPicker disabled="false"></mat-datepicker>
@ -45,14 +45,14 @@
<!-- Datepicker fin -->
<mat-form-field>
<mat-label>Date de fin</mat-label>
<input [(ngModel)]="dateFin" matInput [matDatepicker]="dateFinPicker" [min]="dateDebut" disabled (dateChange)="updateDataSource()">
<input [(ngModel)]="dateFin" matInput [matDatepicker]="dateFinPicker" [min]="dateDebut" disabled (dateChange)="updateDonneesTableau()">
<mat-icon *ngIf="this.dateFin != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(2)">clear</mat-icon>
<mat-datepicker-toggle matSuffix [for]="dateFinPicker"></mat-datepicker-toggle>
<mat-datepicker touchUi #dateFinPicker disabled="false"></mat-datepicker>
</mat-form-field>
</ng-container>
<mat-table matSort [dataSource]="dataSource" (matSortChange)="triTableau($event)" matSortDirection="asc">
<mat-table matSort [dataSource]="dataSource" (matSortChange)="trierTableau($event)" matSortDirection="asc">
<ng-container matColumnDef="agence">
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>
Business Unit
@ -120,7 +120,7 @@
[pageIndex]="numPage-1"
[pageSize]="parPage"
[pageSizeOptions]="pageOption"
(page)="updatePageInfo($event)"
(page)="updatePaginationTableau($event)"
>
</mat-paginator>

@ -94,7 +94,7 @@ export class EpTableComponent implements OnInit{
});
}
updateDataSource() {
updateDonneesTableau() {
switch(this.typeRechercheEP) {
case epTypeRecherche.EPEnCours:
this.getEPEnCours();
@ -199,7 +199,7 @@ export class EpTableComponent implements OnInit{
/*for(let bu of this.bus) {
this.busIds.push(bu.id);
}*/
this.updateDataSource();
this.updateDonneesTableau();
this.chargement = false;
}
}
@ -213,17 +213,17 @@ export class EpTableComponent implements OnInit{
this.dateDebut = undefined;
if(val == 2)
this.dateFin = undefined;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
* Mettre à jour le nomre d'élément à afficher par page et le numéro de la page
* @param event évènement de la pagination
*/
updatePageInfo(event){
updatePaginationTableau(event){
this.parPage = event.pageSize;
this.numPage = event.pageIndex+1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -231,7 +231,7 @@ export class EpTableComponent implements OnInit{
*/
setSearch() {
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -255,7 +255,7 @@ export class EpTableComponent implements OnInit{
this.busIds = [];
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -272,14 +272,14 @@ export class EpTableComponent implements OnInit{
this.busIds = this.busIds.filter( (id) => id != bu.id);
}
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**
* Trier le tableau en fonction de l'évènement de la colonne
* @param e évènement du tri
*/
triTableau(e) {
trierTableau(e) {
this.tri = e.active;
switch(e.direction) {
case "asc":
@ -289,7 +289,7 @@ export class EpTableComponent implements OnInit{
this.asc = false;
break;
}
this.updateDataSource();
this.updateDonneesTableau();
}

@ -26,7 +26,7 @@
<!-- Affichage de la liste des formations -->
<mat-table matSort [dataSource]="dataSource" (matSortChange)="triTableau($event)" matSortActive="{{this.tri}}" matSortDirection="asc" >
<mat-table matSort [dataSource]="dataSource" (matSortChange)="trierTableau($event)" matSortActive="{{this.tri}}" matSortDirection="asc" >
<ng-container matColumnDef="intitule">
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Intitulé</mat-header-cell>
<mat-cell *matCellDef="let row">{{ row.intitule }}</mat-cell>
@ -76,7 +76,7 @@
[pageIndex]="numPage-1"
[pageSize]="parPage"
[pageSizeOptions]="pageOption"
(page)="updatePageInfo($event)"
(page)="updatePaginationTableau($event)"
>
</mat-paginator>

@ -111,7 +111,7 @@ export class FormationsTableComponent implements OnInit {
* Mettre à jour les informations à afficher dans la tableau.
* 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() {
updateDonneesTableau() {
this.updateFormations();
}
@ -156,7 +156,7 @@ export class FormationsTableComponent implements OnInit {
else {
this.collaborateurConnecte = JSON.parse(sessionStorage.getItem(cles.sessionKeyConnectee));
this.idAgence = this.collaborateurConnecte.businessUnit.agence.id;
this.updateDataSource();
this.updateDonneesTableau();
this.chargement = false;
}
}
@ -165,10 +165,10 @@ export class FormationsTableComponent implements OnInit {
* Mettre à jour le nomre d'élément à afficher par page et le numéro de la page
* @param event évènement de la pagination
*/
updatePageInfo(event){
updatePaginationTableau(event){
this.parPage = event.pageSize;
this.numPage = event.pageIndex+1;
this.updateDataSource();
this.updateDonneesTableau();
}
@ -177,7 +177,7 @@ export class FormationsTableComponent implements OnInit {
*/
setSearch() {
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
@ -194,7 +194,7 @@ export class FormationsTableComponent implements OnInit {
* Trier le tableau en fonction de l'évènement de la colonne
* @param e évènement du tri
*/
triTableau(e) {
trierTableau(e) {
this.tri = e.active;
switch(e.direction) {
case "asc":
@ -204,7 +204,7 @@ export class FormationsTableComponent implements OnInit {
this.asc = false;
break;
}
this.updateDataSource();
this.updateDonneesTableau();
}
/**
@ -220,7 +220,7 @@ export class FormationsTableComponent implements OnInit {
this.idStatuts = [];
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
@ -238,7 +238,7 @@ export class FormationsTableComponent implements OnInit {
this.idStatuts = this.idStatuts.filter(id => id != statut.id);
}
this.numPage = 1;
this.updateDataSource();
this.updateDonneesTableau();
}
/**

Loading…
Cancel
Save