Compare commits
No commits in common. 'develop' and 'master' have entirely different histories.
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,14 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component } from '@angular/core'; |
||||||
import { CollaborateursService } from '@shared/api-swagger/api/api' |
|
||||||
import { AuthService } from '@shared/auth/auth.service'; |
|
||||||
import { Subscription } from 'rxjs'; |
|
||||||
|
|
||||||
import { cles } from "@shared/utils/cles" |
|
||||||
|
|
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-root', |
selector: 'app-root', |
||||||
templateUrl: './app.component.html', |
templateUrl: './app.component.html', |
||||||
styleUrls: ['./app.component.scss'] |
styleUrls: ['./app.component.css'] |
||||||
}) |
}) |
||||||
|
export class AppComponent { |
||||||
export class AppComponent implements OnInit { |
|
||||||
title = 'EPAClient'; |
title = 'EPAClient'; |
||||||
|
|
||||||
subscriber: Subscription; |
constructor() { |
||||||
|
|
||||||
|
|
||||||
constructor(private collaborateursService: CollaborateursService, |
|
||||||
private authService: AuthService ) { |
|
||||||
|
|
||||||
} |
|
||||||
|
|
||||||
ngOnInit(): void { |
|
||||||
if(sessionStorage.getItem(cles.sessionKeyConnectee) == undefined) { |
|
||||||
this.subscriber = this.collaborateursService.getCollaborateurByMail(this.authService.mail).subscribe( |
|
||||||
collaborateur => sessionStorage.setItem(cles.sessionKeyConnectee, JSON.stringify(collaborateur)) |
|
||||||
); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
ngOnDestroy(): void { |
|
||||||
if(this.subscriber != undefined) |
|
||||||
this.subscriber.unsubscribe(); |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,125 +0,0 @@ |
|||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
// @ Custom color maps |
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
$navy-app-theme: ( |
|
||||||
50: #ECECEE, |
|
||||||
100: #C5C6CB, |
|
||||||
200: #9EA1A9, |
|
||||||
300: #7D818C, |
|
||||||
400: #5C616F, |
|
||||||
500: #E89759, |
|
||||||
600: #353A48, |
|
||||||
700: #2D323E, |
|
||||||
800: #262933, |
|
||||||
900: #1E2129, |
|
||||||
A100: #C5C6CB, |
|
||||||
A200: #9EA1A9, |
|
||||||
A400: #5C616F, |
|
||||||
A700: #2D323E, |
|
||||||
contrast: ( |
|
||||||
50: $dark-primary-text, |
|
||||||
100: $dark-primary-text, |
|
||||||
200: $dark-primary-text, |
|
||||||
300: $light-primary-text, |
|
||||||
400: $light-primary-text, |
|
||||||
500: $light-primary-text, |
|
||||||
600: $light-primary-text, |
|
||||||
700: $light-primary-text, |
|
||||||
800: $light-primary-text, |
|
||||||
900: $light-primary-text, |
|
||||||
A100: $dark-primary-text, |
|
||||||
A200: $light-primary-text, |
|
||||||
A400: $light-primary-text, |
|
||||||
A700: $light-primary-text, |
|
||||||
) |
|
||||||
); |
|
||||||
|
|
||||||
$apside-primary-app-theme: ( |
|
||||||
50: #ECECEE, |
|
||||||
100: #C5C6CB, |
|
||||||
200: #9EA1A9, |
|
||||||
300: #7D818C, |
|
||||||
400: #5C616F, |
|
||||||
500: #E89759, |
|
||||||
600: #353A48, |
|
||||||
700: #2D323E, |
|
||||||
800: #262933, |
|
||||||
900: #1E2129, |
|
||||||
A100: #C5C6CB, |
|
||||||
A200: #9EA1A9, |
|
||||||
A400: #5C616F, |
|
||||||
A700: #2D323E, |
|
||||||
contrast: ( |
|
||||||
50: $dark-primary-text, |
|
||||||
100: $dark-primary-text, |
|
||||||
200: $dark-primary-text, |
|
||||||
300: $light-primary-text, |
|
||||||
400: $light-primary-text, |
|
||||||
500: $light-primary-text, |
|
||||||
600: $light-primary-text, |
|
||||||
700: $light-primary-text, |
|
||||||
800: $light-primary-text, |
|
||||||
900: $light-primary-text, |
|
||||||
A100: $dark-primary-text, |
|
||||||
A200: $light-primary-text, |
|
||||||
A400: $light-primary-text, |
|
||||||
A700: $light-primary-text, |
|
||||||
) |
|
||||||
); |
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
// @ Define the default theme |
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
|
|
||||||
// Define the primary, accent and warn palettes |
|
||||||
$default-primary-palette: mat-palette($navy-app-theme); |
|
||||||
$default-accent-palette: mat-palette($mat-light-blue, 600, 400, 700); |
|
||||||
$default-warn-palette: mat-palette($mat-red); |
|
||||||
|
|
||||||
// Create the Material theme object |
|
||||||
$theme: mat-light-theme($default-primary-palette, $default-accent-palette, $default-warn-palette); |
|
||||||
|
|
||||||
// Add ".theme-default" class to the body to activate this theme. |
|
||||||
// Class name must start with "theme-" !!! |
|
||||||
.theme-default { |
|
||||||
|
|
||||||
// Create an Angular Material theme from the $theme map |
|
||||||
@include angular-material-theme($theme); |
|
||||||
} |
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
// @ Define a blue-gray dark theme |
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
|
|
||||||
// Define the primary, accent and warn palettes |
|
||||||
$blue-gray-dark-theme-primary-palette: mat-palette($navy-app-theme); |
|
||||||
$blue-gray-dark-theme-accent-palette: mat-palette($mat-blue-gray); |
|
||||||
$blue-gray-dark-theme-warn-palette: mat-palette($mat-red); |
|
||||||
|
|
||||||
// Create the Material theme object |
|
||||||
$blue-gray-dark-theme: mat-dark-theme($blue-gray-dark-theme-primary-palette, $blue-gray-dark-theme-accent-palette, $blue-gray-dark-theme-warn-palette); |
|
||||||
|
|
||||||
// Add ".theme-blue-gray-dark" class to the body to activate this theme. |
|
||||||
// Class name must start with "theme-" !!! |
|
||||||
.theme-blue-gray-dark { |
|
||||||
|
|
||||||
// Generate the Angular Material theme |
|
||||||
@include angular-material-theme($blue-gray-dark-theme); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
// @ Typography |
|
||||||
// ----------------------------------------------------------------------------------------------------- |
|
||||||
|
|
||||||
// Angular Material typography |
|
||||||
$typography: mat-typography-config( |
|
||||||
$font-family: 'Muli, Helvetica Neue, Arial, sans-serif', |
|
||||||
$title: mat-typography-level(20px, 32px, 600), |
|
||||||
$body-2: mat-typography-level(14px, 24px, 600), |
|
||||||
$button: mat-typography-level(14px, 14px, 600), |
|
||||||
$input: mat-typography-level(16px, 1.125, 400) // line-height must be unitless !!! |
|
||||||
); |
|
||||||
|
|
||||||
// Setup the typography |
|
||||||
@include angular-material-typography($typography); |
|
@ -1,5 +1,27 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
<h1> Liste des collaborateurs </h1> |
<h1> Liste des collaborateurs </h1> |
||||||
|
|
||||||
|
<mat-table matSort [dataSource]="dataSource"> |
||||||
|
<ng-container matColumnDef="agence"> |
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Agence</mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let row">{{ row.agence}}</mat-cell> |
||||||
|
</ng-container> |
||||||
|
|
||||||
<collaborateurs-table [typeRecherche]="typeRecherche" [rechercherParBU]="rechercherParBU" [roles]="roles" [displayedColumns]="displayedColumns" (eventEmitter)="event($event)" ></collaborateurs-table> |
<ng-container matColumnDef="collaborateur"> |
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Collabotareur</mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let row" [routerLink]="['/collaborateurs', row.id]">{{row.prenom}} {{row.nom}}</mat-cell> |
||||||
|
</ng-container> |
||||||
|
|
||||||
|
<ng-container matColumnDef="dateembauche"> |
||||||
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Date embauche</mat-header-cell> |
||||||
|
<mat-cell *matCellDef="let row">TODO AUSSI</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">TODO</mat-cell> |
||||||
|
</ng-container> |
||||||
|
|
||||||
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
||||||
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> |
||||||
|
</mat-table> |
||||||
|
@ -1,54 +1,95 @@ |
|||||||
import { Component } from '@angular/core'; |
import { Component, OnInit, OnDestroy, ViewChild, ViewChildren } from '@angular/core'; |
||||||
|
|
||||||
|
import { Observable, Subscription } from 'rxjs'; |
||||||
|
|
||||||
import { collaborateurTypeRecherche } from "@shared/utils/cles"; |
import {MatTableDataSource} from '@angular/material/table'; |
||||||
import { Router } from '@angular/router'; |
import {MatPaginator} from '@angular/material/paginator'; |
||||||
|
import {MatSort} from '@angular/material/sort'; |
||||||
|
|
||||||
|
import { CollaborateursService } from "@shared/api-swagger/api/api"; |
||||||
|
|
||||||
|
import { CollaborateurModel } from "@shared/api-swagger/model/models"; |
||||||
|
import { DisplayCollaborateur } from "@shared/displayInfo/displays"; |
||||||
|
|
||||||
/** |
/** |
||||||
* Composant qui sert à l'affichage de la liste des collaborateurs en fonction de l'agence de son utilitateur. |
* 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({ |
@Component({ |
||||||
selector: 'app-collaborateurs', |
selector: 'app-collaborateurs', |
||||||
templateUrl: './collaborateurs.component.html' |
templateUrl: './collaborateurs.component.html' |
||||||
}) |
}) |
||||||
export class CollaborateursComponent { |
export class CollaborateursComponent implements OnInit { |
||||||
|
|
||||||
|
collaborateursDisponibles : DisplayCollaborateur[]; |
||||||
|
collaborateursFiltre : DisplayCollaborateur[]; |
||||||
|
private collaborateursDisponiblesSubscription : Subscription; |
||||||
|
|
||||||
|
displayedColumns : string[] = ["agence", "collaborateur", "dateembauche", "referent"]; |
||||||
|
|
||||||
|
dataSource : MatTableDataSource<DisplayCollaborateur>; |
||||||
|
|
||||||
/** |
/** |
||||||
* Type de la recherche à indiquer au composant fils qui affiche la liste des collaborateurs |
* contenu de la recherche. |
||||||
*/ |
*/ |
||||||
typeRecherche: string = collaborateurTypeRecherche.collaborateurs; |
search = ""; |
||||||
|
|
||||||
/** |
/** |
||||||
* Rôle des collaborateurs à récupérer via le service collaborateur, ici nous ne voulons que les collaborateurs (pour le moment...). |
* Pagination du tableau. |
||||||
*/ |
*/ |
||||||
roles: string[] = ["Collaborateur"]; |
@ViewChild(MatPaginator) paginator: MatPaginator; |
||||||
|
|
||||||
/** |
/** |
||||||
* Liste des colonnes du tableau à afficher. |
* Tri par les éléments du tableau selon la colonne choisie. |
||||||
*/ |
*/ |
||||||
displayedColumns: string[] = ["businessunit", "collaborateur", "datearrivee", "referent"]; |
@ViewChild(MatSort) sort: MatSort; |
||||||
|
|
||||||
/** |
/** |
||||||
* Indique si la recherche pas BU est activée ou non |
* Spécifie si la liste des EP est en cours de chargement et d'écriture dans le tableau. |
||||||
*/ |
*/ |
||||||
rechercherParBU: boolean = true; |
chargement = true; |
||||||
|
constructor(private service: CollaborateursService) {} |
||||||
|
|
||||||
constructor(private router: Router) {} |
ngOnInit() { |
||||||
|
this. collaborateursDisponiblesSubscription = this.service.getCollaborateurs(undefined,undefined,undefined,1).subscribe( |
||||||
|
collaborateurs => { |
||||||
|
this.initCollaborateur(collaborateurs) |
||||||
|
} |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
/** |
initCollaborateur(collaborateurs:CollaborateurModel[]) { |
||||||
* Fonction permettant d'ouvrir les détails d'un référent ou d'un collaborateur en fonction de la case cliquée |
this.collaborateursDisponibles = []; |
||||||
*
|
let collaborateurDisplay : DisplayCollaborateur; |
||||||
* @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 |
let today = new Date(); |
||||||
*/ |
console.log(collaborateurs); |
||||||
event(event : any) { |
for(let c of collaborateurs) { |
||||||
switch(event.type) { |
collaborateurDisplay = new DisplayCollaborateur(); |
||||||
case "collaborateur": |
collaborateurDisplay.id = c.id; |
||||||
this.router.navigate(["/collaborateurs", event.collaborateur.id]); |
collaborateurDisplay.prenom = c.prenom; |
||||||
break; |
collaborateurDisplay.nom = c.nom; |
||||||
case "referent": |
collaborateurDisplay.agence = c.businessUnit.nom; |
||||||
this.router.navigate(["/referents", event.collaborateur.id]); |
collaborateurDisplay.embauche = c.dateArrivee; |
||||||
break; |
collaborateurDisplay.anciennete = this.setAnciennete(new Date(c.dateArrivee), today); |
||||||
|
collaborateurDisplay.annee = Math.floor(collaborateurDisplay.anciennete / 31536000000); |
||||||
|
collaborateurDisplay.mois = Math.floor(collaborateurDisplay.anciennete / 2629800000 % 12); |
||||||
|
this.collaborateursDisponibles.push(collaborateurDisplay); |
||||||
} |
} |
||||||
|
this.collaborateursFiltre = this.collaborateursDisponibles; |
||||||
|
this.dataSource = new MatTableDataSource(this.collaborateursFiltre); |
||||||
|
this.dataSource.paginator = this.paginator; |
||||||
|
this.dataSource.sort = this.sort; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
|
setAnciennete(firstDate, secondDate) { |
||||||
|
return Math.abs(firstDate-secondDate); |
||||||
|
} |
||||||
|
|
||||||
|
ngOnDestroy() { |
||||||
|
if(this.collaborateursDisponiblesSubscription != undefined) { |
||||||
|
this.collaborateursDisponiblesSubscription.unsubscribe(); |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -1,3 +1,42 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
|
<ng-container *ngIf="collaborateur!=undefined"> |
||||||
|
<h2>{{ collaborateur.prenom }} {{ collaborateur.nom }} </h2> |
||||||
|
|
||||||
<affichage-details-collaborateur [idCollaborateur]="idCollaborateur"></affichage-details-collaborateur> |
<h3>Agence : {{ collaborateur.businessUnit.nom}}</h3> |
||||||
|
<h3>Date embauche : {{ collaborateur.dateArrivee}}</h3> |
||||||
|
</ng-container> |
||||||
|
<ng-container *ngIf="collaborateur==undefined || !eploaded"> |
||||||
|
<mat-spinner></mat-spinner> |
||||||
|
</ng-container> |
||||||
|
|
||||||
|
<ng-container *ngIf= "eploaded && epEffectues.length==0"> |
||||||
|
<h3> Aucun EP effectué encore </h3> |
||||||
|
</ng-container> |
||||||
|
|
||||||
|
<ng-container *ngIf= "eploaded && epEffectues.length!=0"> |
||||||
|
<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.dateentretien}}</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"> {{ row.referent.prenom }} {{ row.referent.nom }}</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> |
||||||
|
@ -1,20 +1,86 @@ |
|||||||
import { Component } from '@angular/core'; |
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core'; |
||||||
|
|
||||||
|
import { Observable, Subscription } from 'rxjs'; |
||||||
import {ActivatedRoute} from '@angular/router'; |
import {ActivatedRoute} from '@angular/router'; |
||||||
|
|
||||||
|
import {MatTableDataSource} from '@angular/material/table'; |
||||||
|
import {MatPaginator} from '@angular/material/paginator'; |
||||||
|
import {MatSort} from '@angular/material/sort'; |
||||||
|
|
||||||
|
import { CollaborateursService, EpService } from "@shared/api-swagger/api/api"; |
||||||
|
|
||||||
|
import { CollaborateurModel } from "@shared/api-swagger/model/collaborateurModel"; |
||||||
|
import { EpModel } from "@shared/api-swagger/model/epModel"; |
||||||
|
import { DisplayEP } from "@shared/displayInfo/displays"; |
||||||
|
|
||||||
/** |
/** |
||||||
* Composant pour gérer l'affichage des détails d'un collaborateur avec ses formations et ses EP |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-details-collaborateur', |
selector: 'app-details-collaborateur', |
||||||
templateUrl: './details-collaborateur.component.html' |
templateUrl: './details-collaborateur.component.html' |
||||||
}) |
}) |
||||||
export class DetailsCollaborateurComponent { |
export class DetailsCollaborateurComponent implements OnInit { |
||||||
|
//epCollaborateurIdCollaborateurGet
|
||||||
|
collaborateur: CollaborateurModel; |
||||||
|
private collaborateurSubscription : Subscription; |
||||||
|
private epSubscription : Subscription; |
||||||
|
epEffectues : DisplayEP[]; |
||||||
|
displayedColumns: string[] = ["dateentretien", "referent", "type", "details"]; |
||||||
|
dataSource : MatTableDataSource<DisplayEP>; |
||||||
|
eploaded = false; |
||||||
|
idCollaborateur: any; |
||||||
|
|
||||||
|
/** |
||||||
|
* Pagination du tableau. |
||||||
|
*/ |
||||||
|
@ViewChild(MatPaginator) paginator: MatPaginator; |
||||||
|
|
||||||
idCollaborateur: string; |
/** |
||||||
|
* Tri par les éléments du tableau selon la colonne choisie. |
||||||
|
*/ |
||||||
|
@ViewChild(MatSort) sort: MatSort; |
||||||
|
|
||||||
|
constructor(private collaborateusrService:CollaborateursService, private epService:EpService, private route: ActivatedRoute) {} |
||||||
|
|
||||||
constructor(private route: ActivatedRoute) { |
ngOnInit() { |
||||||
this.idCollaborateur = this.route.snapshot.paramMap.get('id'); |
this.idCollaborateur = this.route.snapshot.paramMap.get('id'); |
||||||
|
this.collaborateurSubscription = this.collaborateusrService.getCollaborateurById(this.idCollaborateur).subscribe( |
||||||
|
collaborateur => this.initCollaborateur(collaborateur[0]), |
||||||
|
err => console.log(err) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
initCollaborateur(collaborateur:CollaborateurModel) { |
||||||
|
this.collaborateur = collaborateur; |
||||||
|
this.epSubscription = this.epService.getEPByCollaborateur(this.idCollaborateur).subscribe( |
||||||
|
ep => this.initEP(ep) |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
initEP(ep:EpModel[]) { |
||||||
|
this.epEffectues = []; |
||||||
|
let epDisplay : DisplayEP; |
||||||
|
for(let un_ep of ep) { |
||||||
|
epDisplay = new DisplayEP(); |
||||||
|
epDisplay.id = un_ep.id; |
||||||
|
epDisplay.referent = un_ep.referent; |
||||||
|
epDisplay.etat = un_ep.etat; |
||||||
|
epDisplay.type = un_ep.type; |
||||||
|
epDisplay.dateentretien = un_ep.dateEntretien; |
||||||
|
this.epEffectues.push(epDisplay); |
||||||
|
} |
||||||
|
this.dataSource = new MatTableDataSource(this.epEffectues); |
||||||
|
this.dataSource.paginator = this.paginator; |
||||||
|
this.dataSource.sort = this.sort; |
||||||
|
this.eploaded = true; |
||||||
|
} |
||||||
|
|
||||||
|
ngOnDestroy() { |
||||||
|
if(this.epSubscription!= undefined) { |
||||||
|
this.epSubscription.unsubscribe(); |
||||||
|
} |
||||||
|
if(this.collaborateurSubscription!= undefined) { |
||||||
|
this.collaborateurSubscription.unsubscribe(); |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,11 +1,2 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
<h2>Liste de vos demandes de délégations en attente</h2> |
<h1>Liste des demandes de délégations</h1> |
||||||
<ng-container *ngIf="chargement"> |
|
||||||
<mat-spinner></mat-spinner> |
|
||||||
</ng-container> |
|
||||||
<ng-container *ngIf="!chargement"> |
|
||||||
<p *ngIf="demandesDelegation.length==0"> |
|
||||||
Aucune demande de délégation en cours. |
|
||||||
</p> |
|
||||||
<app-demande-delegation *ngFor="let demandeDelegation of demandesDelegation" [demandeDelegation]="demandeDelegation" (eventEmitter)="donnerReponse($event)"></app-demande-delegation> |
|
||||||
</ng-container> |
|
||||||
|
@ -1,15 +1,2 @@ |
|||||||
<mat-card> |
<app-nav-menu></app-nav-menu> |
||||||
<mat-card-header> |
<h1> Demande delegation </h1> |
||||||
<mat-card-title>{{demandeDelegation.ep.collaborateur.nom}} {{demandeDelegation.ep.collaborateur.prenom}}</mat-card-title> |
|
||||||
</mat-card-header> |
|
||||||
<mat-card-content> |
|
||||||
<p>Demande effectuée le {{ demandeDelegation.dateDemande | date: 'dd/MM/yyyy'}} par {{demandeDelegation.ep.referent.nom}} {{demandeDelegation.ep.referent.prenom}} </p> |
|
||||||
<p *ngIf="demandeDelegation.ep.datePrevisionnelle == undefined"> {{demandeDelegation.ep.type}} en attente d'une date</p> |
|
||||||
<p *ngIf="demandeDelegation.ep.datePrevisionnelle != undefined"> {{demandeDelegation.ep.type}} prévu le {{demandeDelegation.ep.datePrevisionnelle | date : 'dd/MM/yyyy'}} </p> |
|
||||||
|
|
||||||
</mat-card-content> |
|
||||||
<mat-card-footer> |
|
||||||
<button mat-raised-button (click)="repondreALaDemande(etatDemande.Validee)" color="primary">Accepter la demande</button> |
|
||||||
<button mat-raised-button (click)="repondreALaDemande(etatDemande.Rejetee)" color="warn">Refuser la demande</button> |
|
||||||
</mat-card-footer> |
|
||||||
</mat-card> |
|
||||||
|
@ -1,117 +1,15 @@ |
|||||||
import { i18nMetaToJSDoc } from '@angular/compiler/src/render3/view/i18n/meta'; |
import { Component, OnInit } from '@angular/core'; |
||||||
import { Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core'; |
|
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
|
||||||
import { DemandeDelegationDTO, DemandeEPIDTO, EtatDemande } from '@shared/api-swagger'; |
|
||||||
import { BrowserStack } from 'protractor/built/driverProviders'; |
|
||||||
import { Subscription } from 'rxjs'; |
|
||||||
|
|
||||||
|
|
||||||
/** |
/** |
||||||
* Composant pour faire afficher les détails d'une demande de délégation |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-demande-delegation', |
selector: 'app-demande-delegation', |
||||||
templateUrl: './demande-delegation.component.html' |
templateUrl: './demande-delegation.component.html' |
||||||
}) |
}) |
||||||
export class DemandeDelegationComponent implements OnInit { |
export class DemandeDelegationComponent implements OnInit { |
||||||
@Input() demandeDelegation: DemandeDelegationDTO; |
|
||||||
@Output() eventEmitter: EventEmitter<any> = new EventEmitter<any>(); |
|
||||||
etatDemande: any = EtatDemande; |
|
||||||
|
|
||||||
dialogSubscription: Subscription; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(private matDialog: MatDialog) {} |
constructor() {} |
||||||
|
|
||||||
ngOnInit() { |
ngOnInit() { |
||||||
} |
} |
||||||
|
|
||||||
accepter() { |
|
||||||
this.repondreALaDemande(EtatDemande.Validee); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
repondreALaDemande(etatDemande: EtatDemande) { |
|
||||||
const data : any = { |
|
||||||
etatDemande : etatDemande, |
|
||||||
demandeDelegation : this.demandeDelegation |
|
||||||
}; |
|
||||||
const dialogRef: MatDialogRef<DialogReponseDemandeDelegation> = this.matDialog.open(DialogReponseDemandeDelegation, {data: data}) |
|
||||||
|
|
||||||
this.dialogSubscription = dialogRef.afterClosed().subscribe( |
|
||||||
reponse => { |
|
||||||
if(reponse.engistree) { |
|
||||||
this.eventEmitter.emit(reponse.demandeDelegation); |
|
||||||
} |
|
||||||
} |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
ngOnDestroy() { |
|
||||||
if(this.dialogSubscription != undefined) { |
|
||||||
this.dialogSubscription.unsubscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
@Component({ |
|
||||||
selector: "dialog-reponse-demande-delegation", |
|
||||||
templateUrl: "./dialog-reponse-demande-delegation.html" |
|
||||||
}) |
|
||||||
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 été validé et doit être enregistré ou non et la demande de délégation cible. |
|
||||||
*/ |
|
||||||
reponse: any = { |
|
||||||
engistree: false |
|
||||||
} |
|
||||||
|
|
||||||
constructor(@Inject(MAT_DIALOG_DATA) public data, private dialogRef: MatDialogRef<DialogReponseDemandeDelegation>) {
|
|
||||||
switch(data.etatDemande) { |
|
||||||
case EtatDemande.Validee: |
|
||||||
this.texte = "Souhaitez-vous vraiment accepter la demande de délégation et devenir le nouveau référent de l'EP ?"; |
|
||||||
break; |
|
||||||
case EtatDemande.Rejetee: |
|
||||||
this.texte = "Souhaitez-vous vraiment refuser la demande de délégation ?"; |
|
||||||
this.estRefus = true; |
|
||||||
break; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
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(); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fermer() { |
|
||||||
this.dialogRef.close(this.reponse); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
} |
@ -1,9 +0,0 @@ |
|||||||
<p>{{texte}}</p> |
|
||||||
<div> |
|
||||||
<mat-form-field *ngIf="estRefus" appearance="fill"> |
|
||||||
<mat-label>Raison du refus</mat-label> |
|
||||||
<textarea matInput [(ngModel)]="raisonRefus"></textarea> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
|
||||||
<button mat-raised-button (click)="enregistrer()" color="primary">Enregister la réponse</button> |
|
||||||
<button mat-raised-button (click)="fermer()" color="warn">Annuler</button> |
|
@ -1,4 +0,0 @@ |
|||||||
<p>Votre réponse à la demande de délégation a bien été enregistrée</p> |
|
||||||
|
|
||||||
<button *ngIf="data.acceptee" (click)="fermer()" [routerLink]="['/ep', data.ep.id]" mat-raised-button>Accéder à l'EP</button> |
|
||||||
<button mat-raised-button (click)="fermer()">Fermer</button> |
|
@ -1,40 +1,32 @@ |
|||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
||||||
|
import { FormsModule } from '@angular/forms'; |
||||||
import { RouterModule } from '@angular/router'; |
import { RouterModule } from '@angular/router'; |
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
|
||||||
|
|
||||||
|
|
||||||
import { NgModule } from "@angular/core"; |
import { NgModule } from "@angular/core"; |
||||||
import { CommonModule } from "@angular/common"; |
import { CommonModule } from "@angular/common"; |
||||||
|
|
||||||
import { MaterialModule } from "@shared/angular-material/angular-material.module"; |
import { MaterialModule } from "@shared/angular-material/angular-material.module"; |
||||||
|
|
||||||
import {NavMenuModule} from '@shared/nav-menu/nav-menu.module'; |
import {NavMenuModule} from '@shared/nav-menu/nav-menu.module'; |
||||||
|
|
||||||
import { DemandesFormationComponent } from './demandes-formation.component'; |
import { DemandesFormationComponent } from './demandes-formation.component'; |
||||||
import { DialogDemandeFormationComponent } from './mat-dialog/dialog-demande-formation.component'; |
|
||||||
import { DemandeFormationComponent } from './details-demande-formation/demande-formation.component' |
import { DemandeFormationComponent } from './details-demande-formation/demande-formation.component' |
||||||
import { NewDemandeFormationComponent } from './new-demande-formation/new-demande-formation.component' |
import { NewDemandeFormationComponent } from './new-demande-formation/new-demande-formation.component' |
||||||
import { DemandesFormationsRoutingModule } from './demandes-formation.routing.module'; |
import { DemandesFormationsRoutingModule } from './demandes-formation.routing.module'; |
||||||
import { MatTablesModule } from "@shared/mat-tables/mat-tables.module"; |
|
||||||
|
|
||||||
/** |
|
||||||
* Module demandes formation |
|
||||||
*/ |
|
||||||
@NgModule({ |
@NgModule({ |
||||||
declarations: [ DemandesFormationComponent, DialogDemandeFormationComponent, DemandeFormationComponent, |
declarations: [ DemandesFormationComponent, DemandeFormationComponent, |
||||||
NewDemandeFormationComponent |
NewDemandeFormationComponent |
||||||
], |
], |
||||||
exports: [ |
exports: [ |
||||||
DemandesFormationComponent |
DemandesFormationComponent |
||||||
], |
], |
||||||
imports: [ |
imports: [ |
||||||
CommonModule, |
|
||||||
MaterialModule, |
MaterialModule, |
||||||
NavMenuModule, |
NavMenuModule, |
||||||
DemandesFormationsRoutingModule, |
DemandesFormationsRoutingModule, |
||||||
MatTablesModule, |
RouterModule |
||||||
RouterModule, |
|
||||||
FormsModule, |
|
||||||
ReactiveFormsModule |
|
||||||
], |
], |
||||||
}) |
}) |
||||||
export class DemandesFormationModule {} |
export class DemandesFormationModule {} |
||||||
|
@ -1,31 +0,0 @@ |
|||||||
<h3>Détails de la demande</h3> |
|
||||||
<p><button mat-stroked-button (click)="fermer()" [routerLink]="['/collaborateurs', collaborateur.id]"> Collaborateur: {{collaborateur.nom}} {{collaborateur.prenom}}</button></p> |
|
||||||
<p> <button mat-stroked-button (click)="fermer()" [routerLink]="['/referents', referent.id]">Référent: {{referent.nom}} {{referent.prenom}}</button></p> |
|
||||||
<p><button mat-stroked-button (click)="fermer()" [routerLink]="['/ep',ep.id]">Voir EP effectué le {{ ep.datePrevisionnelle | date: 'dd/MM/yyyy' }} </button></p> |
|
||||||
<p>Libellé : {{ data.libelle}}</p> |
|
||||||
<p>Description: {{ data.description }}</p> |
|
||||||
<p>Demande RH: {{ afficherDemandeRH(data.demandeRH) }}</p> |
|
||||||
<p>Date demande: {{ data.dateDemande | date: 'dd/MM/yyyy' }} </p> |
|
||||||
<p>Etat : {{ afficherEtat(data.etatDemande) }}</p> |
|
||||||
<p *ngIf="data.etatDemande == etatDemande.Rejetee"> Raison du refus : {{data.commentaireRefus}}</p> |
|
||||||
<ng-container *ngIf="data.etatDemande == etatDemande.EnAttente"> |
|
||||||
<button mat-raised-button (click)="repondre()">Répondre à la demande de formation</button> |
|
||||||
<ng-container *ngIf="donnerReponse"> |
|
||||||
<mat-slide-toggle [(ngModel)]="demandeValidee"> |
|
||||||
Demande validée |
|
||||||
</mat-slide-toggle> |
|
||||||
|
|
||||||
<div> |
|
||||||
<mat-form-field *ngIf="!demandeValidee" appearance="fill"> |
|
||||||
<mat-label>Raison du refus</mat-label> |
|
||||||
<textarea matInput [(ngModel)]="commentaireRefus"></textarea> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
</div> |
|
||||||
<button mat-raised-button (click)="updateDemandeFormation()">Valider le choix</button> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
</ng-container> |
|
||||||
<button mat-raised-button (click)="fermer()">Fermer</button> |
|
||||||
|
|
||||||
|
|
@ -1,79 +0,0 @@ |
|||||||
import { Component, Inject } from "@angular/core"; |
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; |
|
||||||
import { MatSnackBar } from "@angular/material/snack-bar"; |
|
||||||
import { CollaborateurDTO, EpInformationDTO, DemandesFormationService, DemandeFormationDTO, EtatDemande, afficherEtatDemande } from "@shared/api-swagger"; |
|
||||||
import { Subscription } from "rxjs"; |
|
||||||
|
|
||||||
|
|
||||||
@Component( { |
|
||||||
selector: "dialog-demande-formation", |
|
||||||
templateUrl: "dialog-demande-formation.component.html" |
|
||||||
}) |
|
||||||
export class DialogDemandeFormationComponent { |
|
||||||
ep: EpInformationDTO; |
|
||||||
collaborateur: CollaborateurDTO; |
|
||||||
referent: CollaborateurDTO; |
|
||||||
etatDemande: any = EtatDemande; |
|
||||||
engagementsSubscription: Subscription; |
|
||||||
|
|
||||||
donnerReponse: boolean = false; |
|
||||||
commentaireRefus : string = ""; |
|
||||||
demandeValidee: boolean = true; |
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialogRef : MatDialogRef<DialogDemandeFormationComponent>, @Inject(MAT_DIALOG_DATA) public data : DemandeFormationDTO, private demandesFormationService: DemandesFormationService, |
|
||||||
private snackBar: MatSnackBar){ |
|
||||||
this.ep = data.ep; |
|
||||||
this.collaborateur = data.ep.collaborateur; |
|
||||||
this.referent = data.ep.referent; |
|
||||||
} |
|
||||||
|
|
||||||
updateDemandeFormation() { |
|
||||||
let demandeFormation : DemandeFormationDTO = this.data; |
|
||||||
if(this.demandeValidee) { |
|
||||||
demandeFormation.etatDemande = EtatDemande.Validee; |
|
||||||
} |
|
||||||
else { |
|
||||||
if(this.commentaireRefus.length == 0) { |
|
||||||
this.snackBar.open("Vous devez justifier le refus de la demande de formation.", "Attention", { |
|
||||||
duration: 5000, |
|
||||||
horizontalPosition: "center", |
|
||||||
verticalPosition: "top", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
|
|
||||||
demandeFormation.commentaireRefus = this.commentaireRefus; |
|
||||||
demandeFormation.etatDemande = EtatDemande.Rejetee;
|
|
||||||
} |
|
||||||
this.engagementsSubscription = this.demandesFormationService.updateDemandeFormation(demandeFormation, demandeFormation.id).subscribe( |
|
||||||
() => location.reload(), |
|
||||||
err => console.log(err) |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
afficherDemandeRH(demandeRH: boolean) { |
|
||||||
if (demandeRH) |
|
||||||
return 'Oui'; |
|
||||||
else
|
|
||||||
return 'Non' |
|
||||||
} |
|
||||||
|
|
||||||
afficherEtat(etat: EtatDemande) { |
|
||||||
return afficherEtatDemande(etat); |
|
||||||
} |
|
||||||
|
|
||||||
fermer() { |
|
||||||
this.dialogRef.close(); |
|
||||||
} |
|
||||||
|
|
||||||
repondre() { |
|
||||||
this.donnerReponse = true; |
|
||||||
} |
|
||||||
|
|
||||||
ngOnDestroy() { |
|
||||||
if(this.engagementsSubscription != null) { |
|
||||||
this.engagementsSubscription.unsubscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,35 +1,2 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
<h1> Nouvelle demande de formation </h1> |
<h1> Nouvelle demande de formation </h1> |
||||||
|
|
||||||
|
|
||||||
<!-- Le formulaire --> |
|
||||||
<form [formGroup]="demandeFormationForm" (ngSubmit)="ajouterDemandeFormation()"> |
|
||||||
<div> |
|
||||||
<!-- Attribut : libelle --> |
|
||||||
<mat-form-field class="input"> |
|
||||||
<input matInput placeholder="Libellé" formControlName="libelle"> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div> |
|
||||||
<!-- Attribut : description --> |
|
||||||
<mat-form-field class="input"> |
|
||||||
<input matInput placeholder="Description" formControlName="description"> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
|
||||||
|
|
||||||
<div> |
|
||||||
<!-- Attribut : origine --> |
|
||||||
<mat-form-field class="input"> |
|
||||||
<mat-label>Origine de la demande</mat-label> |
|
||||||
<mat-select formControlName="origine"> |
|
||||||
<mat-option *ngFor="let o of originesDemandeFormation" [value]="o">{{o.libelle}}</mat-option> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
|
||||||
|
|
||||||
|
|
||||||
<div> |
|
||||||
<button mat-raised-button>Ajouter une demande de formation</button> |
|
||||||
</div> |
|
||||||
</form> |
|
@ -1,80 +1,15 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
import { Observable, Subscription } from 'rxjs'; |
|
||||||
import { Router } from '@angular/router'; |
|
||||||
import { FormBuilder, FormGroup, FormControl, } from '@angular/forms'; |
|
||||||
|
|
||||||
import { OrigineDemandeFormationDTO, EtatDemande } from "@shared/api-swagger/model/models"; |
|
||||||
|
|
||||||
import { DemandesFormationService } from "@shared/api-swagger/api/api"; |
|
||||||
|
|
||||||
/** |
/** |
||||||
* Composant qui sert à créer une demande de formation pour un collaborateur. |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-new-demande-formation', |
selector: 'app-new-demande-formation', |
||||||
templateUrl: './new-demande-formation.component.html', |
templateUrl: './new-demande-formation.component.html' |
||||||
styleUrls: ['./new-demande-formation.component.scss'] |
|
||||||
}) |
}) |
||||||
export class NewDemandeFormationComponent implements OnInit { |
export class NewDemandeFormationComponent implements OnInit { |
||||||
|
|
||||||
/** |
constructor() {} |
||||||
* Observable pour enregistrer la nouvelle formation |
|
||||||
*/ |
|
||||||
demandeFormationSubscription: Subscription; |
|
||||||
/** |
|
||||||
* Observable pour récupérer la liste des origines formation |
|
||||||
*/ |
|
||||||
origineDemandeSubscription: Subscription; |
|
||||||
|
|
||||||
|
|
||||||
/** |
|
||||||
* Liste des origines de demande de formation à faire afficher dans une liste déroulante. |
|
||||||
*/ |
|
||||||
originesDemandeFormation: OrigineDemandeFormationDTO[]; |
|
||||||
|
|
||||||
/** |
|
||||||
* FormBuilder qui sera lié au formulaire du template avec les attributs d'une formation |
|
||||||
* C'est dans cet objet qu'est stockée la nouvelle formation |
|
||||||
*/ |
|
||||||
demandeFormationForm = this.fb.group( |
|
||||||
{ |
|
||||||
id:[0], |
|
||||||
libelle: [""], |
|
||||||
description: [], |
|
||||||
demandeRH: [true], |
|
||||||
dateDemande: [new Date()], |
|
||||||
etatDemande: [EtatDemande.EnAttente], |
|
||||||
origine: [""], |
|
||||||
collaborateur: [""],
|
|
||||||
} |
|
||||||
); |
|
||||||
|
|
||||||
constructor(private fb: FormBuilder, private demandesFormationService: DemandesFormationService, private router: Router) { } |
|
||||||
|
|
||||||
ngOnInit() { |
ngOnInit() { |
||||||
|
|
||||||
this.origineDemandeSubscription = this.demandesFormationService.getOriginesDemandeFormation().subscribe( |
|
||||||
originesDemandeFormation => this.originesDemandeFormation = originesDemandeFormation, |
|
||||||
err => console.log(err) |
|
||||||
);
|
|
||||||
} |
|
||||||
|
|
||||||
ajouterDemandeFormation() { |
|
||||||
this.demandeFormationSubscription = this.demandesFormationService.addDemandeFormation(this.demandeFormationForm.getRawValue()).subscribe( |
|
||||||
response => { |
|
||||||
console.log(response); |
|
||||||
this.router.navigate(['/demandesformation',response["id"]]); |
|
||||||
} |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
ngOnDestroy() { |
|
||||||
if(this.demandeFormationSubscription != undefined) { |
|
||||||
this.demandeFormationSubscription.unsubscribe(); |
|
||||||
} |
|
||||||
|
|
||||||
if(this.origineDemandeSubscription != undefined) { |
|
||||||
this.origineDemandeSubscription.unsubscribe(); |
|
||||||
} |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,30 +0,0 @@ |
|||||||
<h3>Détails de l'engagement</h3> |
|
||||||
<p><button mat-stroked-button (click)="fermer()" [routerLink]="['/collaborateurs', collaborateur.id]"> Collaborateur: {{collaborateur.nom}} {{collaborateur.prenom}}</button></p> |
|
||||||
<p> <button mat-stroked-button (click)="fermer()" [routerLink]="['/referents', referent.id]">Référent: {{referent.nom}} {{referent.prenom}}</button></p> |
|
||||||
<p><button mat-stroked-button (click)="fermer()" [routerLink]="['/ep',ep.id]">Voir EP effectué le {{ ep.datePrevisionnelle | date: 'dd/MM/yyyy' }} </button></p> |
|
||||||
<p>Action : {{ data.action}}</p> |
|
||||||
<p>Modalité: {{ data.modalite }}</p> |
|
||||||
<p>Date limite: {{ data.dateLimite | date: 'dd/MM/yyyy' }} </p> |
|
||||||
<p>Etat : {{ afficherEtat(data.etatEngagement) }}</p> |
|
||||||
<p *ngIf="data.etatEngagement == etatEngagement.NonRealisable"> Raison non réalisable : {{data.raisonNonRealisable}}</p> |
|
||||||
<ng-container *ngIf="data.etatEngagement == etatEngagement.EnAttente"> |
|
||||||
<button mat-raised-button (click)="repondre()">Répondre à l'engagement</button> |
|
||||||
<ng-container *ngIf="donnerReponse"> |
|
||||||
<mat-slide-toggle [(ngModel)]="engagementRespecte"> |
|
||||||
Engagement respecté |
|
||||||
</mat-slide-toggle> |
|
||||||
|
|
||||||
<div> |
|
||||||
<mat-form-field *ngIf="!engagementRespecte" appearance="fill"> |
|
||||||
<mat-label>Raison du refus</mat-label> |
|
||||||
<textarea matInput [(ngModel)]="raisonRefus"></textarea> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
</div> |
|
||||||
<button mat-raised-button (click)="mettreAJourEngagement()">Valider le choix</button> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
</ng-container> |
|
||||||
<button mat-raised-button (click)="fermer()">Fermer</button> |
|
||||||
|
|
||||||
|
|
@ -1,94 +0,0 @@ |
|||||||
import { Component, Inject } from "@angular/core"; |
|
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog"; |
|
||||||
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" |
|
||||||
}) |
|
||||||
export class EngagementsComponent { |
|
||||||
|
|
||||||
displayedColumns : string[] = ["businessunit", "collaborateur", "action", "dispositif", "modalite", "datelimite", "etat"];
|
|
||||||
constructor(private dialog: MatDialog) {} |
|
||||||
|
|
||||||
afficherDetailsEngagements(engagement: EngagementDTO) { |
|
||||||
const datas = { data: engagement, width: "80%", height: '80%'}; |
|
||||||
this.dialog.open(DialogEngagementsComponent, datas); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 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" |
|
||||||
}) |
|
||||||
export class DialogEngagementsComponent { |
|
||||||
ep: EpInformationDTO; |
|
||||||
collaborateur: CollaborateurDTO; |
|
||||||
referent: CollaborateurDTO; |
|
||||||
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; |
|
||||||
|
|
||||||
|
|
||||||
constructor(private dialogRef : MatDialogRef<DialogEngagementsComponent>, @Inject(MAT_DIALOG_DATA) public data : EngagementDTO, private engagementsService: EngagementsService, |
|
||||||
private snackBar: MatSnackBar){ |
|
||||||
this.ep = data.ep; |
|
||||||
this.collaborateur = data.ep.collaborateur; |
|
||||||
this.referent = data.ep.referent; |
|
||||||
} |
|
||||||
|
|
||||||
mettreAJourEngagement() { |
|
||||||
let engagement : EngagementDTO = this.data; |
|
||||||
if(this.engagementRespecte) { |
|
||||||
engagement.etatEngagement = EtatEngagement.Respecte; |
|
||||||
} |
|
||||||
else { |
|
||||||
if(this.raisonRefus.length == 0) { |
|
||||||
this.snackBar.open("Vous devez justifier le refus de respecter l'engagement.", "Attention", { |
|
||||||
duration: 5000, |
|
||||||
horizontalPosition: "center", |
|
||||||
verticalPosition: "top", |
|
||||||
}); |
|
||||||
return; |
|
||||||
} |
|
||||||
engagement.raisonNonRealisable = this.raisonRefus; |
|
||||||
engagement.etatEngagement = EtatEngagement.NonRealisable;
|
|
||||||
} |
|
||||||
this.engagementsSubscription = this.engagementsService.updateEngagement(engagement, engagement.id).subscribe( |
|
||||||
() => location.reload(), |
|
||||||
err => console.log(err) |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
afficherEtat(etat: EtatEngagement) { |
|
||||||
return afficherEtatEngagement(etat); |
|
||||||
} |
|
||||||
|
|
||||||
fermer() { |
|
||||||
this.dialogRef.close(); |
|
||||||
} |
|
||||||
|
|
||||||
repondre() { |
|
||||||
this.donnerReponse = true; |
|
||||||
} |
|
||||||
|
|
||||||
ngOnDestroy() { |
|
||||||
if(this.engagementsSubscription != null) { |
|
||||||
this.engagementsSubscription.unsubscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,5 +0,0 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
|
||||||
|
|
||||||
<h2>Liste des engagements</h2> |
|
||||||
|
|
||||||
<engagements-table [displayedColumns]="displayedColumns" (eventEmitter)="afficherDetailsEngagements($event)"></engagements-table> |
|
@ -1,30 +0,0 @@ |
|||||||
import { NgModule } from "@angular/core"; |
|
||||||
import { CommonModule } from "@angular/common"; |
|
||||||
import { RouterModule } from '@angular/router'; |
|
||||||
|
|
||||||
import { MaterialModule } from "@shared/angular-material/angular-material.module"; |
|
||||||
|
|
||||||
import {NavMenuModule} from '@shared/nav-menu/nav-menu.module'; |
|
||||||
import { DialogEngagementsComponent, EngagementsComponent } from "./engagements.component"; |
|
||||||
import { EngagementsRoutingModule } from "./engagements.routing.module"; |
|
||||||
import { MatTablesModule } from "@shared/mat-tables/mat-tables.module"; |
|
||||||
import { FormsModule } from "@angular/forms"; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({ |
|
||||||
declarations: [ |
|
||||||
EngagementsComponent, DialogEngagementsComponent |
|
||||||
], |
|
||||||
exports: [], |
|
||||||
imports: [ |
|
||||||
CommonModule, |
|
||||||
RouterModule,
|
|
||||||
NavMenuModule, |
|
||||||
EngagementsRoutingModule, |
|
||||||
MatTablesModule, |
|
||||||
MaterialModule,
|
|
||||||
FormsModule |
|
||||||
], |
|
||||||
}) |
|
||||||
export class EngagementsModule {} |
|
@ -1,19 +0,0 @@ |
|||||||
import { NgModule } from '@angular/core'; |
|
||||||
import { Routes, RouterModule } from '@angular/router'; |
|
||||||
|
|
||||||
|
|
||||||
import { EngagementsComponent } from "./engagements.component"; |
|
||||||
|
|
||||||
import { AuthGuard } from '@shared/auth/auth.guard'; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [ |
|
||||||
{ path: '', component: EngagementsComponent, pathMatch: 'full', canActivate: [AuthGuard]} |
|
||||||
]; |
|
||||||
|
|
||||||
@NgModule({ |
|
||||||
imports: [RouterModule.forChild(routes)], |
|
||||||
exports: [RouterModule] |
|
||||||
}) |
|
||||||
export class EngagementsRoutingModule {} |
|
@ -1,2 +0,0 @@ |
|||||||
export * from './engagements.component'; |
|
||||||
export * from './engagements.module'; |
|
@ -1,97 +0,0 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
|
||||||
<div *ngIf="ep!=undefined" class="detailsep"> |
|
||||||
<p> Collaborateur : {{ep.collaborateur.nom}} {{ep.collaborateur.prenom}} ({{ep.collaborateur.businessUnit.nom}}) <button mat-stroked-button [routerLink]="['/collaborateurs',ep.collaborateur.id]">Accéder au détails collaborateur</button></p> |
|
||||||
<p> Référent : {{ep.referent.nom}} {{ep.referent.prenom}} </p> |
|
||||||
<p> Entretien le : {{ep.datePrevisionnelle | date: 'dd/MM/yyyy'}}</p> |
|
||||||
<p> Statut : {{afficherTypeEP(ep.statut)}}</p> |
|
||||||
|
|
||||||
<button mat-raised-button color="primary" title="Valider le déroulement de l'entretien">Valider entretien</button> |
|
||||||
|
|
||||||
<button mat-raised-button color="primary" title="Signer l'EP">Signer</button> |
|
||||||
|
|
||||||
<mat-tab-group mat-align-tabs="start"> |
|
||||||
<mat-tab label="Les objectifs"> |
|
||||||
<ep-objectifs [ep]="ep"></ep-objectifs> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="La saisie"> |
|
||||||
|
|
||||||
<mat-vertical-stepper class="saisie" linear #stepper> |
|
||||||
<mat-step label="Mission/Projet" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
<mat-step label="Compétences générales" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
<mat-step label="Compétences techniques" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
<mat-step label="Apside" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
|
|
||||||
<mat-step label="Demande d'augmentation salaire" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
<mat-step label="Formation effectuée" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
<mat-step label="Evolution du collaborateur" completed="true"> |
|
||||||
|
|
||||||
</mat-step> |
|
||||||
|
|
||||||
</mat-vertical-stepper> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="Les engagements" *ngIf="afficherDemandesFormationEtEngagements()"> |
|
||||||
<ep-engagements [engagements]="ep.engagements"></ep-engagements> |
|
||||||
</mat-tab> |
|
||||||
<mat-tab label="Les demandes de formation" *ngIf="afficherDemandesFormationEtEngagements()"> |
|
||||||
<ep-demandes-formation [demandesFormation]="ep.demandesFormation"></ep-demandes-formation> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="Commentaire assistant"> |
|
||||||
<ep-commentaires-assistant [ep]="ep" [collaborateurConnecte]="collaborateurConnecte"></ep-commentaires-assistant> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="Choix de dates" *ngIf="afficherChoixDates()" > |
|
||||||
<ep-choix-date [rdvsEntretien]="ep.propositionsEntretien"></ep-choix-date> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="Proposition de date" *ngIf="epNonEffectue()"> |
|
||||||
<ep-propositions-dates [choixTypeEntretien]="ep.choixTypeEntretien"></ep-propositions-dates> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="Demande délégation" *ngIf="epNonEffectue()"> |
|
||||||
<ep-demande-delegation [demande]="ep.demandesDelegation"></ep-demande-delegation> |
|
||||||
</mat-tab> |
|
||||||
<mat-tab label="Les participants"> |
|
||||||
<ep-participants [ep]="ep"></ep-participants> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
</mat-tab-group> |
|
||||||
</div> |
|
||||||
<ng-container *ngIf="ep==undefined"> |
|
||||||
<mat-spinner></mat-spinner> |
|
||||||
</ng-container> |
|
||||||
<!-- |
|
||||||
|
|
||||||
<ng-container *ngIf="ep == undefined" > |
|
||||||
<mat-spinner></mat-spinner> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="ep != undefined"> |
|
||||||
<p> Collaborateur : {{ep.collaborateur.nom + " " + ep.collaborateur.prenom}}</p> |
|
||||||
<p *ngIf="ep.referent != undefined"> Référent : {{ep.referent.nom + " " + ep.referent.prenom}}</p> |
|
||||||
<p *ngIf="ep.referent == undefined"> Aucun référent pour </p> |
|
||||||
<p> Entretien le : {{ep.datePrevisionnelle }}</p> |
|
||||||
|
|
||||||
|
|
||||||
</ng-container> |
|
||||||
--> |
|
@ -1,4 +0,0 @@ |
|||||||
/*.saisie { |
|
||||||
overflow-y: scroll; |
|
||||||
height: 100%; |
|
||||||
}*/ |
|
@ -1,72 +0,0 @@ |
|||||||
import { Component, OnInit } from "@angular/core"; |
|
||||||
import { ActivatedRoute } from "@angular/router"; |
|
||||||
import { affichageStatut, EpDTO, EpService, StatutEp, estEPEnCours, estEPSigne, estEPEnAttenteSignatureCollaborateur, estEPEffectue, CollaborateurDTO } from "@shared/api-swagger"; |
|
||||||
import { AuthService } from "@shared/auth/auth.service"; |
|
||||||
import { cles } from "@shared/utils/cles"; |
|
||||||
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", |
|
||||||
styleUrls: ["./details-ep.component.scss"] |
|
||||||
}) |
|
||||||
export class DetailsEPComponent implements OnInit { |
|
||||||
|
|
||||||
epSubscription : Subscription; |
|
||||||
|
|
||||||
idEp: any; |
|
||||||
|
|
||||||
role : Role; |
|
||||||
roleUtilisateur: string; |
|
||||||
|
|
||||||
collaborateurConnecte : CollaborateurDTO; |
|
||||||
|
|
||||||
ep : EpDTO; |
|
||||||
constructor(private epService : EpService, private route : ActivatedRoute, private authService: AuthService) { |
|
||||||
this.roleUtilisateur = authService.firstRole; |
|
||||||
} |
|
||||||
|
|
||||||
ngOnInit() { |
|
||||||
this.idEp = this.route.snapshot.paramMap.get("id"); |
|
||||||
this.epSubscription = this.epService.getEPById(this.idEp).subscribe( |
|
||||||
ep => { |
|
||||||
this.ep = ep; |
|
||||||
console.log(this.ep); |
|
||||||
}, |
|
||||||
err => console.log(err)
|
|
||||||
); |
|
||||||
this.setCollaborateurConnecte(); |
|
||||||
} |
|
||||||
|
|
||||||
setCollaborateurConnecte() { |
|
||||||
if(sessionStorage.getItem(cles.sessionKeyConnectee) == undefined) { |
|
||||||
setTimeout( () => this.setCollaborateurConnecte(), 1000); |
|
||||||
} |
|
||||||
else { |
|
||||||
this.collaborateurConnecte = JSON.parse(sessionStorage.getItem(cles.sessionKeyConnectee)); |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
afficherDemandesFormationEtEngagements() { |
|
||||||
return estEPSigne(this.ep.statut) || estEPEnAttenteSignatureCollaborateur(this.ep.statut); |
|
||||||
} |
|
||||||
|
|
||||||
afficherTypeEP(statutEP: StatutEp) { |
|
||||||
return affichageStatut(statutEP); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
afficherChoixDates() { |
|
||||||
return this.ep.statut == StatutEp.DatesProposees; |
|
||||||
} |
|
||||||
|
|
||||||
epNonEffectue() { |
|
||||||
return estEPEnCours(this.ep.statut) && !estEPEnAttenteSignatureCollaborateur(this.ep.statut) && !estEPEffectue(this.ep.statut); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
<h3>Choisir une date</h3> |
|
||||||
|
|
||||||
<mat-radio-group class="radio-rdv" [(ngModel)]="choixRdv"> |
|
||||||
<mat-radio-button *ngFor="let rdv of rdvsEntretien" [value]="rdv"> |
|
||||||
{{rdv.typeEntretien.libelle}} le {{rdv.dateEntretien | date : 'dd/MM/yyyy à hh:mm'}} |
|
||||||
</mat-radio-button> |
|
||||||
</mat-radio-group> |
|
||||||
<button mat-raised-button color="primary">Valider le choix</button> |
|
@ -1,5 +0,0 @@ |
|||||||
.radio-rdv { |
|
||||||
display: flex; |
|
||||||
flex-direction: column; |
|
||||||
margin-bottom: 15px; |
|
||||||
} |
|
@ -1,16 +0,0 @@ |
|||||||
import { Component, Input } from '@angular/core'; |
|
||||||
import { RDVEntretienDTO } from '@shared/api-swagger'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant qui permet au collaborateur de faire un choix parmi les date proposées |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-choix-date', |
|
||||||
templateUrl: './ep-choix-date.component.html', |
|
||||||
styleUrls: ["ep-choix-date.component.scss"] |
|
||||||
}) |
|
||||||
export class EpChoixDateComponent { |
|
||||||
@Input() rdvsEntretien : Array<RDVEntretienDTO>; |
|
||||||
choixRdv : RDVEntretienDTO; |
|
||||||
constructor() {} |
|
||||||
} |
|
@ -1,12 +0,0 @@ |
|||||||
<h3 *ngIf="nouveauCommentaire">Ajouter un commentaire</h3> |
|
||||||
<h3 *ngIf="!nouveauCommentaire">Modifier un commentaire</h3> |
|
||||||
|
|
||||||
<div> |
|
||||||
<mat-form-field appearance="fill"> |
|
||||||
<mat-label>Commentaire</mat-label> |
|
||||||
<textarea matInput [(ngModel)]="commentaire"></textarea> |
|
||||||
</mat-form-field> |
|
||||||
</div> |
|
||||||
|
|
||||||
<button mat-raised-button color="primary" (click)="enregistrer()">Enregister les modifications</button> |
|
||||||
<button mat-raised-button color="warn" (click)="annuler()">Annuler</button> |
|
@ -1,3 +0,0 @@ |
|||||||
<p> Êtes-vous certain de vouloir supprimer votre commentaire ?</p> |
|
||||||
<button mat-raised-button color="warn" (click)="valider(true)">Supprimer</button> |
|
||||||
<button mat-raised-button color="primary" (click)="valider(false)">Annuler</button> |
|
@ -1,31 +0,0 @@ |
|||||||
<ng-container *ngIf="ep.commentairesAssistant == undefined || ep.commentairesAssistant.length == 0"> |
|
||||||
Aucun commentaire assistant |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<button mat-raised-button *ngIf="!aDejaCommente()" (click)="nouveauCommentaire()">Ajouter un commentaire</button> |
|
||||||
|
|
||||||
<ng-container *ngIf="ep.commentairesAssistant != undefined && ep.commentairesAssistant.length != 0"> |
|
||||||
Liste des commentaires assistants : |
|
||||||
<mat-card *ngFor="let commentaire of ep.commentairesAssistant"> |
|
||||||
<p> |
|
||||||
{{commentaire.assistant}} |
|
||||||
<ng-container *ngIf="commentaire.idAssistant == collaborateurConnecte.id"> |
|
||||||
<mat-icon (click)="modifierCommentaire(commentaire)">edit</mat-icon> |
|
||||||
<mat-icon (click)="supprimerCommentaire(commentaire.id)">delete</mat-icon> |
|
||||||
</ng-container> |
|
||||||
</p> |
|
||||||
<p>{{commentaire.commentaire}}</p> |
|
||||||
|
|
||||||
</mat-card> |
|
||||||
<!-- |
|
||||||
<ul> |
|
||||||
<li *ngFor="let commentaire of ep.commentairesAssistant"> |
|
||||||
<p>Assistant : {{commentaire.assistant}}</p> |
|
||||||
<p>{{commentaire.commentaire}}</p> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
--> |
|
||||||
</ng-container> |
|
||||||
<mat-card> |
|
||||||
|
|
||||||
</mat-card> |
|
@ -1,131 +0,0 @@ |
|||||||
import { analyzeAndValidateNgModules } from '@angular/compiler'; |
|
||||||
import { Component, Inject, Input } from '@angular/core'; |
|
||||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
|
||||||
import { CollaborateurDTO, CommentaireAssistantDTO, EpDTO } from '@shared/api-swagger'; |
|
||||||
import { AuthService } from '@shared/auth/auth.service'; |
|
||||||
import { Subscription } from 'rxjs'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour permettre au référent d'ajouter son commentaire et à tous les participants de le consulter |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-commentaires-assistant', |
|
||||||
templateUrl: './ep-commentaires-assistant.component.html' |
|
||||||
}) |
|
||||||
export class EpCommentairesAssistantComponent { |
|
||||||
|
|
||||||
@Input() ep : EpDTO; |
|
||||||
|
|
||||||
@Input() collaborateurConnecte : CollaborateurDTO; |
|
||||||
|
|
||||||
dialogAjoutModificationSubscription : Subscription; |
|
||||||
dialogSuppressionSubscription : Subscription; |
|
||||||
|
|
||||||
constructor(private matDialog: MatDialog) {} |
|
||||||
|
|
||||||
|
|
||||||
aDejaCommente() { |
|
||||||
return this.ep.commentairesAssistant != undefined && this.ep.commentairesAssistant.some( c => c.idAssistant == this.collaborateurConnecte.id); |
|
||||||
} |
|
||||||
|
|
||||||
nouveauCommentaire() { |
|
||||||
this.ouvrirSaisiCommentaire(undefined); |
|
||||||
} |
|
||||||
|
|
||||||
modifierCommentaire(commentaire : CommentaireAssistantDTO) { |
|
||||||
this.ouvrirSaisiCommentaire(commentaire); |
|
||||||
} |
|
||||||
|
|
||||||
supprimerCommentaire(id : number) { |
|
||||||
const dialogRef: MatDialogRef<DialogEPSupprimerCommentaireAssistant> = this.matDialog.open(DialogEPSupprimerCommentaireAssistant); |
|
||||||
this.dialogSuppressionSubscription = dialogRef.afterClosed().subscribe( |
|
||||||
reponse => { |
|
||||||
if(reponse) |
|
||||||
this.ep.commentairesAssistant = this.ep.commentairesAssistant.filter( c => c.id != id); |
|
||||||
} |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
ouvrirSaisiCommentaire(data?: any) { |
|
||||||
const dialogRef: MatDialogRef<DialogEPAjouterCommentaireAssistant> = this.matDialog.open(DialogEPAjouterCommentaireAssistant, { data: data}); |
|
||||||
this.dialogAjoutModificationSubscription = dialogRef.afterClosed().subscribe( |
|
||||||
reponse => { |
|
||||||
if(reponse != undefined && reponse.nouveauCommentaire) |
|
||||||
this.ajouterCommentaire(reponse.commentaire); |
|
||||||
} |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
ajouterCommentaire(commentaire : CommentaireAssistantDTO) { |
|
||||||
commentaire.idAssistant = this.collaborateurConnecte.id; |
|
||||||
commentaire.assistant = this.collaborateurConnecte.nom + " " + this.collaborateurConnecte.prenom; |
|
||||||
if(this.ep.commentairesAssistant == undefined) { |
|
||||||
this.ep.commentairesAssistant = []; |
|
||||||
} |
|
||||||
this.ep.commentairesAssistant.push(commentaire); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
ngOnDestroy() { |
|
||||||
this.dialogAjoutModificationSubscription?.unsubscribe(); |
|
||||||
this.dialogSuppressionSubscription?.unsubscribe(); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour faire afficher un pop up pour l'ajout d'un commentaire assistant |
|
||||||
*/ |
|
||||||
@Component( { |
|
||||||
selector: "dialog-ep-ajouter-commentaire", |
|
||||||
templateUrl: "./dialog-ep-ajouter-commentaire-assistant.html" |
|
||||||
}) |
|
||||||
export class DialogEPAjouterCommentaireAssistant { |
|
||||||
commentaire : string = ""; |
|
||||||
nouveauCommentaire : boolean = true; |
|
||||||
commentaireDTO : CommentaireAssistantDTO; |
|
||||||
|
|
||||||
constructor(private dialogRef : MatDialogRef<DialogEPAjouterCommentaireAssistant>, @Inject(MAT_DIALOG_DATA) public data: CommentaireAssistantDTO) { |
|
||||||
if(data != undefined) { |
|
||||||
this.commentaireDTO = data; |
|
||||||
this.commentaire = this.commentaireDTO.commentaire; |
|
||||||
this.nouveauCommentaire = false; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
enregistrer() { |
|
||||||
if(this.nouveauCommentaire) { |
|
||||||
this.commentaireDTO = { |
|
||||||
idAssistant : "", |
|
||||||
commentaire : this.commentaire |
|
||||||
} |
|
||||||
} |
|
||||||
else { |
|
||||||
this.commentaireDTO.commentaire = this.commentaire; |
|
||||||
} |
|
||||||
const reponse : any = { |
|
||||||
nouveauCommentaire: this.nouveauCommentaire, |
|
||||||
commentaire : this.commentaireDTO |
|
||||||
} |
|
||||||
this.dialogRef.close(reponse); |
|
||||||
}
|
|
||||||
|
|
||||||
annuler() { |
|
||||||
this.dialogRef.close(undefined); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour afficher un pop permettant la validation ou non de la suppression d'un commentaire |
|
||||||
*/ |
|
||||||
@Component( { |
|
||||||
selector: "dialog-ep-supprimer-commentaire-assistant", |
|
||||||
templateUrl: "./dialog-ep-supprimer-commentaire-assistant.html" |
|
||||||
}) |
|
||||||
export class DialogEPSupprimerCommentaireAssistant { |
|
||||||
constructor( private dialogRef: MatDialogRef<DialogEPSupprimerCommentaireAssistant>) {} |
|
||||||
|
|
||||||
valider(reponse : boolean) { |
|
||||||
this.dialogRef.close(reponse); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
@ -1,15 +0,0 @@ |
|||||||
<ng-container *ngIf="demande == undefined"> |
|
||||||
<h3>Aucune demande de délégation en cours</h3> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="demande != undefined"> |
|
||||||
<h3>Demande de délégation en cours :</h3> |
|
||||||
<p> Receveur : {{demande.referent.nom}} {{demande.referent.prenom}}</p> |
|
||||||
<p> Date de la demande : {{demande.dateDemande | date: 'dd/MM/yyyy'}}</p> |
|
||||||
<p> Raison de la demande : {{demande.raisonDemande }}</p> |
|
||||||
<p> {{afficherEtatDemande(demande.etatDemande)}}</p> |
|
||||||
<ng-container *ngIf="demande.etatDemande == etatDemande.Rejetee" > |
|
||||||
<p> Date réponse : {{demande.dateReponse | date: 'dd/MM/yyyy'}}</p> |
|
||||||
<p> Raison refus : {{demande.raisonRefus}} </p> |
|
||||||
</ng-container> |
|
||||||
</ng-container> |
|
@ -1,22 +0,0 @@ |
|||||||
import { Component, Input} from '@angular/core'; |
|
||||||
import { AfficherEtatDemandeDelegation, DemandeDelegationDTO, EpDTO, EtatDemande } from '@shared/api-swagger'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour faire une demande de délégation et voir la dernière en cours |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-demande-delegation', |
|
||||||
templateUrl: './ep-demande-delegation.component.html' |
|
||||||
}) |
|
||||||
export class EpDemandeDelegationComponent{ |
|
||||||
|
|
||||||
etatDemande : any = EtatDemande; |
|
||||||
|
|
||||||
@Input() demande: DemandeDelegationDTO; |
|
||||||
constructor() {} |
|
||||||
|
|
||||||
afficherEtatDemande(etat: EtatDemande) { |
|
||||||
return AfficherEtatDemandeDelegation(etat); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
@ -1,2 +0,0 @@ |
|||||||
<h3 *ngIf="demandesFormation == undefined || demandesFormation == []">Aucune demande de formation</h3> |
|
||||||
<demandes-formation-table *ngIf="demandesFormation != undefined && demandesFormation.length != 0" [displayedColumns]="displayedColumns" [estAffichageEP]="estAffichageEP" [demandesFormation]="demandesFormation" ></demandes-formation-table> |
|
@ -1,19 +0,0 @@ |
|||||||
import { Component, Input } from '@angular/core'; |
|
||||||
import { DemandeFormationDTO } from '@shared/api-swagger'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour ajouter et voir les demandes de formation |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-demandes-formation', |
|
||||||
templateUrl: './ep-demandes-formation.component.html' |
|
||||||
}) |
|
||||||
export class EpDemandesFormationComponent { |
|
||||||
@Input() demandesFormation : Array<DemandeFormationDTO>; |
|
||||||
estAffichageEP : boolean = true; |
|
||||||
displayedColumns : Array<string> = ["libelle", "description", "etat", "demanderh"]; |
|
||||||
|
|
||||||
constructor() {} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
<ng-container *ngIf="engagements == undefined || engagements.length == 0"> |
|
||||||
<h3>Aucun engagements pris</h3> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="engagements != undefined && engagements.length != 0"> |
|
||||||
<engagements-table [displayedColumns]="displayedColumns" [estAffichageEP]="estAffichageEP" [engagementsSaisis]="engagements"></engagements-table> |
|
||||||
</ng-container> |
|
||||||
|
|
@ -1,15 +0,0 @@ |
|||||||
import { Component, Input } from "@angular/core"; |
|
||||||
import { EngagementDTO } from "@shared/api-swagger"; |
|
||||||
|
|
||||||
@Component({ |
|
||||||
selector: "ep-engagements", |
|
||||||
templateUrl: "./ep-engagements.component.html" |
|
||||||
}) |
|
||||||
export class EpEngagementsCompenent { |
|
||||||
@Input()engagements : EngagementDTO[]; |
|
||||||
|
|
||||||
displayedColumns : string[] = ["action", "dispositif", "modalite", "datelimite", "etat"]; |
|
||||||
estAffichageEP : boolean = true; |
|
||||||
|
|
||||||
constructor(){} |
|
||||||
} |
|
@ -1,21 +0,0 @@ |
|||||||
<ng-container *ngIf="ep.objectifs != undefined && ep.objectifs != []"> |
|
||||||
<h3>Nouveaux objectifs</h3> |
|
||||||
<ul> |
|
||||||
<li *ngFor= "let objectif of ep.objectifs; let index = index" > |
|
||||||
Objectif {{index +1}} : {{objectif.libelle}} |
|
||||||
|
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="ep.objectifsPrecedent != undefined && ep.objectifsPrecedent != []"> |
|
||||||
<h3>Objectifs précédents</h3> |
|
||||||
<ul> |
|
||||||
<li *ngFor= "let objectif of ep.objectifsPrecedent; let index = index"> |
|
||||||
<p [ngClass]="objectif.statutObjectif"> Objectif {{index +1}} : {{objectif.libelle}} ({{afficherStatutObjectif(objectif.statutObjectif)}})</p> |
|
||||||
<p *ngIf="objectif.commentaire != undefined && objectif.commentaire != ''"> Commentaire : {{objectif.commentaire}}</p> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
|
|
@ -1,14 +0,0 @@ |
|||||||
li { |
|
||||||
margin-bottom: 1%; |
|
||||||
} |
|
||||||
.Atteint { |
|
||||||
color: green |
|
||||||
} |
|
||||||
|
|
||||||
.NonAtteint{ |
|
||||||
color: red |
|
||||||
} |
|
||||||
|
|
||||||
.Partiel { |
|
||||||
color: orange |
|
||||||
} |
|
@ -1,19 +0,0 @@ |
|||||||
import { Component, Input } from "@angular/core"; |
|
||||||
import { afficherStatutObjectif, EpDTO, StatutObjectif } from "@shared/api-swagger"; |
|
||||||
|
|
||||||
|
|
||||||
@Component({ |
|
||||||
selector : "ep-objectifs", |
|
||||||
templateUrl: "ep-objectifs.component.html", |
|
||||||
styleUrls: ["ep-objectifs.component.scss"] |
|
||||||
}) |
|
||||||
export class EpObjectifsComponent { |
|
||||||
|
|
||||||
@Input() ep : EpDTO; |
|
||||||
|
|
||||||
constructor(){} |
|
||||||
|
|
||||||
afficherStatutObjectif(statut: StatutObjectif) { |
|
||||||
return afficherStatutObjectif(statut); |
|
||||||
} |
|
||||||
} |
|
@ -1,11 +0,0 @@ |
|||||||
<ng-container *ngIf="ep.participants == undefined || ep.participants == []"> |
|
||||||
<h3> Aucun participant</h3> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="ep.participants != undefined && ep.participants != []"> |
|
||||||
<ul> |
|
||||||
<li *ngFor=" let participant of ep.participants"> |
|
||||||
{{participant.participant}} |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</ng-container> |
|
@ -1,16 +0,0 @@ |
|||||||
import { Component, Input, OnInit } from '@angular/core'; |
|
||||||
import { EpDTO } from '@shared/api-swagger'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant pour afficher la liste des participants de l'EP |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-participants', |
|
||||||
templateUrl: './ep-participants.component.html' |
|
||||||
}) |
|
||||||
export class EpParticipantsComponent { |
|
||||||
|
|
||||||
@Input() ep : EpDTO; |
|
||||||
|
|
||||||
constructor() {} |
|
||||||
} |
|
@ -1,39 +0,0 @@ |
|||||||
<h3>Proposer au moins une date</h3> |
|
||||||
|
|
||||||
<mat-chip-list> |
|
||||||
Préférences du collaborateur : |
|
||||||
<mat-chip *ngFor="let choix of choixTypeEntretien; let index = index"> |
|
||||||
N°{{index+1}} {{choix.libelle}} |
|
||||||
</mat-chip> |
|
||||||
</mat-chip-list> |
|
||||||
|
|
||||||
<ng-container *ngIf="propositionsRdvEntretien.length != nbPropositionMax "> |
|
||||||
<div> |
|
||||||
<mat-form-field> |
|
||||||
<input matInput [(ngModel)]="dateProposee" [ngxMatDatetimePicker]="dateProposeePicker" placeholder="Proposer une date" [min]="dateMin"> |
|
||||||
<mat-datepicker-toggle matSuffix [for]="dateProposeePicker"> </mat-datepicker-toggle> |
|
||||||
<ngx-mat-datetime-picker #dateProposeePicker></ngx-mat-datetime-picker> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
<mat-form-field appearance="fill"> |
|
||||||
<mat-label>Choisir le type d'entretien</mat-label> |
|
||||||
<mat-select [(value)]="choixEntretien"> |
|
||||||
<mat-option></mat-option> |
|
||||||
<mat-option *ngFor="let choix of choixTypeEntretien; let index = index" [value]="choix">N°{{index+1}} {{choix.libelle}}</mat-option> |
|
||||||
</mat-select> |
|
||||||
</mat-form-field> |
|
||||||
<p *ngIf="choixEntretien != undefined">Choix : {{choixEntretien.libelle}}</p> |
|
||||||
</div> |
|
||||||
<div> |
|
||||||
<button mat-raised-button (click)="enregistrerChoix()">Ajouter proposition</button> |
|
||||||
</div> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ul> |
|
||||||
<li *ngFor="let proposition of propositionsRdvEntretien; let index = index"> |
|
||||||
Proposition {{index+1}} : {{proposition.typeEntretien.libelle.toLowerCase()}} le {{proposition.dateEntretien | date : "dd/MM/yyyy à hh:mm"}} |
|
||||||
<mat-icon (click)="annulerProposition(proposition)">delete</mat-icon> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
|
|
||||||
<button mat-raised-button color="primary">Valider les dates proposés</button> |
|
@ -1,42 +0,0 @@ |
|||||||
import { Component, Input } from '@angular/core'; |
|
||||||
import { RDVEntretienDTO, TypeEntretienDTO } from '@shared/api-swagger'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant permettant au référent de proposer ses dates d'EP à partir des préférences de lieu d'entretien du collaborateur |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'ep-propositions-dates', |
|
||||||
templateUrl: './ep-propositions-dates.component.html' |
|
||||||
}) |
|
||||||
export class EpPropositionsDatesComponent { |
|
||||||
nbPropositionMax = 3; |
|
||||||
dateMin: Date; |
|
||||||
dateProposee: Date; |
|
||||||
choixEntretien : TypeEntretienDTO; |
|
||||||
|
|
||||||
@Input() choixTypeEntretien : Array<TypeEntretienDTO>; |
|
||||||
|
|
||||||
propositionsRdvEntretien : Array<RDVEntretienDTO> = []; |
|
||||||
constructor() { |
|
||||||
this.dateMin = new Date(); |
|
||||||
this.dateMin.setDate( this.dateMin.getDate() +1); |
|
||||||
} |
|
||||||
|
|
||||||
enregistrerChoix() { |
|
||||||
if(this.dateProposee != undefined && this.choixEntretien != undefined) { |
|
||||||
let rdv : RDVEntretienDTO = { |
|
||||||
dateEntretien : this.dateProposee, |
|
||||||
typeEntretien : this.choixEntretien |
|
||||||
}; |
|
||||||
this.propositionsRdvEntretien.push(rdv); |
|
||||||
this.dateProposee = undefined; |
|
||||||
this.choixEntretien = undefined; |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
annulerProposition(proposition:RDVEntretienDTO) { |
|
||||||
this.propositionsRdvEntretien = this.propositionsRdvEntretien.filter( p => p!= proposition); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} |
|
@ -1,7 +1,6 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
/** |
/** |
||||||
* Composant permettant de faire la demande d'augmentation de salaire |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-ep-augmentation-salaire', |
selector: 'app-ep-augmentation-salaire', |
@ -0,0 +1 @@ |
|||||||
|
<h1>Consultation choix date</h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-choix-date', |
||||||
|
templateUrl: './ep-choix-date.component.html' |
||||||
|
}) |
||||||
|
export class EpChoixDateComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<h1>Consultation commentaire assistant</h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-commentaire-assistant', |
||||||
|
templateUrl: './ep-commentaire-assistant.component.html' |
||||||
|
}) |
||||||
|
export class EpCommentaireAssistantComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -1,7 +1,6 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
/** |
/** |
||||||
* Composant pour permettre au référent d'ajouter son commentaire et à tous les participants de le consulter
|
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-ep-commentaire-referent', |
selector: 'app-ep-commentaire-referent', |
@ -1,7 +1,6 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
/** |
/** |
||||||
* Ce composant sert peut-ête à rien... |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-ep-consultation', |
selector: 'app-ep-consultation', |
@ -0,0 +1 @@ |
|||||||
|
<h1>Consultation demande delegation</h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-demande-delegation', |
||||||
|
templateUrl: './ep-demande-delegation.component.html' |
||||||
|
}) |
||||||
|
export class EpDemandeDelegationComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<h1>Consultation demandes formation</h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-demandes-formation', |
||||||
|
templateUrl: './ep-demandes-formation.component.html' |
||||||
|
}) |
||||||
|
export class EpDemandesFormationComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<h1>Consultation participants </h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-participants', |
||||||
|
templateUrl: './ep-participants.component.html' |
||||||
|
}) |
||||||
|
export class EpParticipantsComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,2 @@ |
|||||||
|
<app-nav-menu></app-nav-menu> |
||||||
|
<h1>New participant </h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-new-participant', |
||||||
|
templateUrl: './new-participant.component.html' |
||||||
|
}) |
||||||
|
export class NewParticipantComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<h1>Saisie propositions dates</h1> |
@ -0,0 +1,15 @@ |
|||||||
|
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
|
/** |
||||||
|
*/ |
||||||
|
@Component({ |
||||||
|
selector: 'app-ep-propositions-dates', |
||||||
|
templateUrl: './ep-propositions-dates.component.html' |
||||||
|
}) |
||||||
|
export class EpPropositionsDatesComponent implements OnInit { |
||||||
|
|
||||||
|
constructor() {} |
||||||
|
|
||||||
|
ngOnInit() { |
||||||
|
} |
||||||
|
} |
@ -1,7 +1,6 @@ |
|||||||
import { Component, OnInit } from '@angular/core'; |
import { Component, OnInit } from '@angular/core'; |
||||||
|
|
||||||
/** |
/** |
||||||
* Composant pour vérifier que la signature des deux parties |
|
||||||
*/ |
*/ |
||||||
@Component({ |
@Component({ |
||||||
selector: 'app-ep-signature', |
selector: 'app-ep-signature', |
@ -1,3 +0,0 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
|
||||||
<h1>Liste des EP collaborateurs signés</h1> |
|
||||||
<ep-table [typeRechercheEP]="typeRechercheEP" [displayedColumns]="displayedColumns" (eventEmitter)="eventEmitter($event)"></ep-table> |
|
@ -1,40 +0,0 @@ |
|||||||
import { Component } from '@angular/core'; |
|
||||||
import { Router } from '@angular/router'; |
|
||||||
import { epTypeRecherche } from '@shared/utils/cles'; |
|
||||||
|
|
||||||
/** |
|
||||||
* Composant qui permet la consultation de la liste des EP signés |
|
||||||
*/ |
|
||||||
@Component({ |
|
||||||
selector: 'app-ep-signes', |
|
||||||
templateUrl: './ep-signes.component.html' |
|
||||||
}) |
|
||||||
export class EpSignesComponent { |
|
||||||
displayedColumns: string[] = ["agence", "collaborateur", "referent", "datearrivee", "statutep", "typeep", "dateentretien", "consultation"]; |
|
||||||
|
|
||||||
typeRechercheEP : string = epTypeRecherche.EPSignes; |
|
||||||
|
|
||||||
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": |
|
||||||
if(event.ep.collaborateur != undefined) |
|
||||||
this.router.navigate(["/collaborateurs", event.ep.collaborateur.id]) |
|
||||||
break; |
|
||||||
case "referent": |
|
||||||
if(event.ep.referent != undefined) |
|
||||||
this.router.navigate(["/referents", event.ep.referent.id]) |
|
||||||
break; |
|
||||||
case "ep": |
|
||||||
this.router.navigate(["/ep", event.ep.id]); |
|
||||||
break; |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
@ -1,22 +1,2 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
<h2>Vos EP</h2> |
<h1>Liste des EP collaborateurs</h1> |
||||||
|
|
||||||
<ng-container *ngIf="idCollaborateur == undefined"> |
|
||||||
|
|
||||||
<mat-spinner></mat-spinner> |
|
||||||
</ng-container> |
|
||||||
<ng-container *ngIf="idCollaborateur != undefined"> |
|
||||||
<mat-tab-group mat-align-tabs="start"> |
|
||||||
<mat-tab label="EP signés"> |
|
||||||
<ep-table [rechercherParBU]="false" [rechercherParDate]="true" [typeRechercheEP]="epTypeRecherche.RechercheEPCollaborateursSignes" [displayedColumns]="displayedColumnsEPSignes" [idCollaborateur]="idCollaborateur" (eventEmitter)="ouvrirEP($event)" ></ep-table> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="EP référent"> |
|
||||||
<ep-table [rechercherParBU]="false" [rechercherParDate]="true" [typeRechercheEP]="epTypeRecherche.RechercheEPReferentSignes" [displayedColumns]="displayedColumnsEPReferent" [idCollaborateur]="idCollaborateur" (eventEmitter)="ouvrirEP($event)" ></ep-table> |
|
||||||
</mat-tab> |
|
||||||
|
|
||||||
<mat-tab label="EP Participant"> |
|
||||||
TODO |
|
||||||
</mat-tab> |
|
||||||
</mat-tab-group> |
|
||||||
</ng-container> |
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue