parent
de1cc0fe11
commit
b62273401a
@ -1,86 +1,5 @@ |
|||||||
<app-nav-menu></app-nav-menu> |
<app-nav-menu></app-nav-menu> |
||||||
<h1> Liste des collaborateurs </h1> |
<h1> Liste des collaborateurs </h1> |
||||||
|
|
||||||
<ng-container *ngIf="chargement"> |
|
||||||
<mat-spinner></mat-spinner> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container *ngIf="!chargement"> |
<collaborateurs-table [typeRecherche]="typeRecherche" [rechercherParBU]="rechercherParBU" [roles]="roles" [displayedColumns]="displayedColumns" (eventEmitter)="event($event)" ></collaborateurs-table> |
||||||
|
|
||||||
|
|
||||||
<!-- Barre de recherche --> |
|
||||||
<mat-form-field> |
|
||||||
<mat-label>Rechercher un collaborateur</mat-label> |
|
||||||
<input matInput type="text" [(ngModel)]="search" (keyup)="setSearch()"> |
|
||||||
<mat-button *ngIf="search" matSuffix mat-icon-button aria-label="Clear" (click)="resetSearch()"> |
|
||||||
<mat-icon>close</mat-icon> |
|
||||||
</mat-button> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--Checkboxes des BU--> |
|
||||||
<ul> |
|
||||||
<li *ngFor="let bu of bus"> |
|
||||||
<mat-checkbox (change)="updateCheckbox($event.checked,bu)" [checked]="true"> {{bu.nom}}</mat-checkbox> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
|
|
||||||
<!-- Datepicker début --> |
|
||||||
<mat-form-field > |
|
||||||
<mat-label>Date de début</mat-label> |
|
||||||
<input [(ngModel)]="dateDebut" matInput [matDatepicker]="dateDebutPicker" [max]="dateFin" disabled (dateChange)="updateDataSource()"> |
|
||||||
<mat-icon *ngIf="this.dateDebut != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(1)">clear</mat-icon> |
|
||||||
<mat-datepicker-toggle matSuffix [for]="dateDebutPicker"></mat-datepicker-toggle> |
|
||||||
<mat-datepicker touchUi #dateDebutPicker disabled="false"></mat-datepicker> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
<!-- Datepicker fin --> |
|
||||||
<mat-form-field > |
|
||||||
<mat-label>Date de fin</mat-label> |
|
||||||
<input [(ngModel)]="dateFin" matInput [matDatepicker]="dateFinPicker" [min]="dateDebut" disabled (dateChange)="updateDataSource()"> |
|
||||||
<mat-icon *ngIf="this.dateFin != undefined" matDatepickerToggleIcon (click)="updateDateToUndefined(2)">clear</mat-icon> |
|
||||||
<mat-datepicker-toggle matSuffix [for]="dateFinPicker"></mat-datepicker-toggle> |
|
||||||
<mat-datepicker touchUi #dateFinPicker disabled="false"></mat-datepicker> |
|
||||||
</mat-form-field> |
|
||||||
|
|
||||||
<!-- Affichage de la liste des collaborateurs --> |
|
||||||
<mat-table matSort [dataSource]="dataSource" (matSortChange)="triTableau($event)" matSortActive="{{this.tri}}" matSortDirection="asc" > |
|
||||||
|
|
||||||
<ng-container matColumnDef="businessunit"> |
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Agence</mat-header-cell> |
|
||||||
<mat-cell *matCellDef="let row">{{ row.businessUnit.nom }}</mat-cell> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container matColumnDef="collaborateur"> |
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Collabotareur</mat-header-cell> |
|
||||||
<!--Créer un lien vers les détails du collaborateur--> |
|
||||||
<mat-cell *matCellDef="let row" [routerLink]="['/collaborateurs', row.id]">{{row.nom}} {{row.prenom}}</mat-cell> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container matColumnDef="datearrivee"> |
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Date embauche</mat-header-cell> |
|
||||||
<mat-cell *matCellDef="let row">{{row.dateArrivee | date:'dd/MM/yyyy'}}</mat-cell> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<ng-container matColumnDef="referent"> |
|
||||||
<mat-header-cell *matHeaderCellDef >Référent</mat-header-cell> |
|
||||||
<mat-cell *matCellDef="let row"> |
|
||||||
<p *ngIf="row.referent" [routerLink]="['/referents', row.referent.id]">{{ row.referent.prenom }} {{ row.referent.nom }}</p> |
|
||||||
<p *ngIf="!row.referent"> Aucun référent</p> |
|
||||||
</mat-cell> |
|
||||||
</ng-container> |
|
||||||
|
|
||||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
|
||||||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> |
|
||||||
</mat-table> |
|
||||||
|
|
||||||
<mat-paginator #paginator |
|
||||||
[length] = "taille" |
|
||||||
[pageIndex]="numPage-1" |
|
||||||
[pageSize]="parPage" |
|
||||||
[pageSizeOptions]="pageOption" |
|
||||||
(page)="updatePageInfo($event)" |
|
||||||
> |
|
||||||
</mat-paginator> |
|
||||||
</ng-container> |
|
Loading…
Reference in new issue