|
|
|
@ -3,20 +3,19 @@ |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="!chargement"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 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> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 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--> |
|
|
|
|
<ng-container *ngIf="rechercherParBU"> |
|
|
|
|
<mat-checkbox *ngFor="let bu of bus" (change)="updateCheckbox($event.checked,bu)" [checked]="true"> {{bu.nom}}</mat-checkbox> |
|
|
|
|
<mat-checkbox *ngFor="let bu of bus" (change)="updateCheckbox($event.checked,bu)" [checked]="true"> {{bu.nom}}</mat-checkbox> |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="rechercherParDate"> |
|
|
|
@ -30,7 +29,7 @@ |
|
|
|
|
</mat-form-field> |
|
|
|
|
|
|
|
|
|
<!-- Datepicker fin --> |
|
|
|
|
<mat-form-field > |
|
|
|
|
<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> |
|
|
|
@ -38,46 +37,49 @@ |
|
|
|
|
<mat-datepicker touchUi #dateFinPicker disabled="false"></mat-datepicker> |
|
|
|
|
</mat-form-field> |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="taille == 0"> |
|
|
|
|
<p>Aucun collaborateur à afficher</p> |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<ng-container *ngIf="taille != 0"> |
|
|
|
|
|
|
|
|
|
<!-- Affichage de la liste des collaborateurs --> |
|
|
|
|
|
|
|
|
|
<!-- 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> |
|
|
|
|
<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> |
|
|
|
|
<mat-cell *matCellDef="let row" (click)="emitEvent(row,'collaborateur')">{{row.nom}} {{row.prenom}}</mat-cell> |
|
|
|
|
</ng-container> |
|
|
|
|
<ng-container matColumnDef="collaborateur"> |
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header disableClear>Collabotareur</mat-header-cell> |
|
|
|
|
<mat-cell *matCellDef="let row" (click)="emitEvent(row,'collaborateur')">{{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="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" > |
|
|
|
|
<mat-cell *ngIf="row.referent" (click)="emitEvent(row.referent,'referent')">{{ row.referent.prenom }} {{ row.referent.nom }}</mat-cell> |
|
|
|
|
<mat-cell *ngIf="!row.referent">Aucun référent</mat-cell> |
|
|
|
|
</mat-cell> |
|
|
|
|
</ng-container> |
|
|
|
|
<ng-container matColumnDef="referent"> |
|
|
|
|
<mat-header-cell *matHeaderCellDef >Référent</mat-header-cell> |
|
|
|
|
<mat-cell *matCellDef="let row" > |
|
|
|
|
<mat-cell *ngIf="row.referent" (click)="emitEvent(row.referent,'referent')">{{ row.referent.prenom }} {{ row.referent.nom }}</mat-cell> |
|
|
|
|
<mat-cell *ngIf="!row.referent">Aucun référent</mat-cell> |
|
|
|
|
</mat-cell> |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
|
|
|
|
<mat-row [ngClass]="setClassCouleurLigne(row)" *matRowDef="let row; columns: displayedColumns;"></mat-row> |
|
|
|
|
</mat-table> |
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> |
|
|
|
|
<mat-row [ngClass]="setClassCouleurLigne(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 #paginator |
|
|
|
|
[length] = "taille" |
|
|
|
|
[pageIndex]="numPage-1" |
|
|
|
|
[pageSize]="parPage" |
|
|
|
|
[pageSizeOptions]="pageOption" |
|
|
|
|
(page)="updatePageInfo($event)"> |
|
|
|
|
</mat-paginator> |
|
|
|
|
|
|
|
|
|
</ng-container> |
|
|
|
|
</ng-container> |