affichage des demandes de formation d'un EP

develop
Yanaël GRETTE 4 years ago
parent 283663f9cb
commit 1c41609db7
  1. 4
      src/app/ep/details-ep/details-ep.component.html
  2. 3
      src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.html
  3. 8
      src/app/ep/details-ep/ep-demandes-formation/ep-demandes-formation.component.ts
  4. 4
      src/app/ep/ep.module.ts
  5. 11
      src/app/shared/mat-tables/demandes-formation-table/demandes-formation.table.html
  6. 2
      src/app/shared/mat-tables/demandes-formation-table/demandes-formation.table.ts

@ -52,7 +52,9 @@
<mat-tab label="Les engagements"> <mat-tab label="Les engagements">
<ep-engagements [engagements]="ep.engagements"></ep-engagements> <ep-engagements [engagements]="ep.engagements"></ep-engagements>
</mat-tab> </mat-tab>
<mat-tab label="Les demandes de formation"></mat-tab> <mat-tab label="Les demandes de formation">
<ep-demandes-formation [demandesFormation]="ep.demandesFormation"></ep-demandes-formation>
</mat-tab>
<mat-tab label="Commentaire assistant"> <mat-tab label="Commentaire assistant">
<ep-commentaires-assistant [ep]="ep"></ep-commentaires-assistant> <ep-commentaires-assistant [ep]="ep"></ep-commentaires-assistant>

@ -1 +1,2 @@
<h1>Consultation demandes formation</h1> <h3 *ngIf="demandesFormation == undefined || demandesFormation == []">Aucune demande de formation</h3>
<demandes-formation-table *ngIf="demandesFormation != undefined && demandesFormation != []" [displayedColumns]="displayedColumns" [estAffichageEP]="estAffichageEP" [demandesFormation]="demandesFormation" ></demandes-formation-table>

@ -1,13 +1,17 @@
import { Component } from '@angular/core'; import { Component, Input } from '@angular/core';
import { DemandeFormationDTO } from '@shared/api-swagger';
/** /**
* Composant pour ajouter et voir les demandes de formation * Composant pour ajouter et voir les demandes de formation
*/ */
@Component({ @Component({
selector: 'app-ep-demandes-formation', selector: 'ep-demandes-formation',
templateUrl: './ep-demandes-formation.component.html' templateUrl: './ep-demandes-formation.component.html'
}) })
export class EpDemandesFormationComponent { export class EpDemandesFormationComponent {
@Input() demandesFormation : Array<DemandeFormationDTO>;
estAffichageEP : boolean = true;
displayedColumns : Array<string> = ["libelle", "description", "etat", "demanderh"];
constructor() {} constructor() {}

@ -20,6 +20,7 @@ import { EpCommentairesAssistantComponent } from "./details-ep/ep-commentaires-a
import { EpEngagementsCompenent } from "./details-ep/ep-engagements/ep-engagements.component"; import { EpEngagementsCompenent } from "./details-ep/ep-engagements/ep-engagements.component";
import { EpPropositionsDatesComponent } from "./details-ep/ep-propositions-dates/ep-propositions-dates.component"; import { EpPropositionsDatesComponent } from "./details-ep/ep-propositions-dates/ep-propositions-dates.component";
import { EpChoixDateComponent } from "./details-ep/ep-choix-date/ep-choix-date.component"; import { EpChoixDateComponent } from "./details-ep/ep-choix-date/ep-choix-date.component";
import { EpDemandesFormationComponent } from "./details-ep/ep-demandes-formation/ep-demandes-formation.component";
/** /**
* Module de l'ep * Module de l'ep
@ -28,7 +29,8 @@ import { EpChoixDateComponent } from "./details-ep/ep-choix-date/ep-choix-date.c
declarations: [ declarations: [
EpComponent, EpSignesComponent, DetailsEPComponent, EpObjectifsComponent, EpComponent, EpSignesComponent, DetailsEPComponent, EpObjectifsComponent,
EpParticipantsComponent, EpDemandeDelegationComponent, EpCommentairesAssistantComponent, EpParticipantsComponent, EpDemandeDelegationComponent, EpCommentairesAssistantComponent,
EpEngagementsCompenent, EpPropositionsDatesComponent, EpChoixDateComponent EpEngagementsCompenent, EpPropositionsDatesComponent, EpChoixDateComponent,
EpDemandesFormationComponent
], ],
exports: [EpComponent, DetailsEPComponent exports: [EpComponent, DetailsEPComponent
], ],

@ -105,6 +105,17 @@
</ng-container> </ng-container>
</ng-container> </ng-container>
<ng-container matColumnDef="libelle">
<mat-header-cell *matHeaderCellDef mat-sort-header>Libellé</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.libelle}}</mat-cell>
</ng-container>
<ng-container matColumnDef="description">
<mat-header-cell *matHeaderCellDef mat-sort-header>Description</mat-header-cell>
<mat-cell *matCellDef="let row">{{row.description}}</mat-cell>
</ng-container>
<ng-container matColumnDef="etat"> <ng-container matColumnDef="etat">
<mat-header-cell *matHeaderCellDef mat-sort-header>Réponse</mat-header-cell> <mat-header-cell *matHeaderCellDef mat-sort-header>Réponse</mat-header-cell>
<mat-cell *matCellDef="let row">{{afficherEtat(row.etatDemande)}}</mat-cell> <mat-cell *matCellDef="let row">{{afficherEtat(row.etatDemande)}}</mat-cell>

@ -126,7 +126,9 @@ export class DemandesFormationTableComponent implements OnInit {
ngOnInit() { ngOnInit() {
if(this.estAffichageEP) { if(this.estAffichageEP) {
this.taille = this.demandesFormation.length; this.taille = this.demandesFormation.length;
this.parPage = this.taille;
this.dataSource = new MatTableDataSource(this.demandesFormation); this.dataSource = new MatTableDataSource(this.demandesFormation);
this.chargement = false;
} }
else else
this.setBUsId(); this.setBUsId();

Loading…
Cancel
Save