parent
09059dee66
commit
9f348c1b7f
@ -0,0 +1,5 @@ |
||||
.radio-rdv { |
||||
display: flex; |
||||
flex-direction: column; |
||||
margin-bottom: 15px; |
||||
} |
@ -1 +1,8 @@ |
||||
<h1>Consultation choix date</h1> |
||||
<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,16 +1,16 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
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: 'app-ep-choix-date', |
||||
templateUrl: './ep-choix-date.component.html' |
||||
selector: 'ep-choix-date', |
||||
templateUrl: './ep-choix-date.component.html', |
||||
styleUrls: ["ep-choix-date.component.css"] |
||||
}) |
||||
export class EpChoixDateComponent implements OnInit { |
||||
|
||||
export class EpChoixDateComponent { |
||||
@Input() rdvsEntretien : Array<RDVEntretienDTO>; |
||||
choixRdv : RDVEntretienDTO; |
||||
constructor() {} |
||||
|
||||
ngOnInit() { |
||||
} |
||||
} |
||||
|
@ -0,0 +1,8 @@ |
||||
<ng-container *ngIf="engagements == undefined || engagements == []"> |
||||
<h3>Aucun engagements pris</h3> |
||||
</ng-container> |
||||
|
||||
<ng-container *ngIf="engagements != undefined && engagements != []"> |
||||
<engagements-table [displayedColumns]="displayedColumns" [estAffichageEP]="estAffichageEP" [engagementsSaisis]="engagements"></engagements-table> |
||||
</ng-container> |
||||
|
@ -0,0 +1,15 @@ |
||||
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 +1,39 @@ |
||||
<h1>Saisie propositions dates</h1> |
||||
<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,16 +1,42 @@ |
||||
import { Component, OnInit } from '@angular/core'; |
||||
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: 'app-ep-propositions-dates', |
||||
selector: 'ep-propositions-dates', |
||||
templateUrl: './ep-propositions-dates.component.html' |
||||
}) |
||||
export class EpPropositionsDatesComponent implements OnInit { |
||||
export class EpPropositionsDatesComponent { |
||||
nbPropositionMax = 3; |
||||
dateMin: Date; |
||||
dateProposee: Date; |
||||
choixEntretien : TypeEntretienDTO; |
||||
|
||||
constructor() {} |
||||
@Input() choixTypeEntretien : Array<TypeEntretienDTO>; |
||||
|
||||
ngOnInit() { |
||||
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); |
||||
} |
||||
|
||||
|
||||
} |
||||
|
Loading…
Reference in new issue