ouvert de la page du référent d'un collaborateur à partir de la liste des collaborateurs

develop
Yanaël GRETTE 4 years ago
parent f558516a1a
commit a937aeaafc
  1. 2
      src/app/collaborateurs/collaborateurs.component.html
  2. 2
      src/app/referents/details-referent/details-referent.component.ts

@ -65,7 +65,7 @@
<ng-container matColumnDef="referent">
<mat-header-cell *matHeaderCellDef mat-sort-header>Référent</mat-header-cell>
<mat-cell *matCellDef="let row">
<p *ngIf="row.referent">{{ row.referent.prenom }} {{ row.referent.nom }}</p>
<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>

@ -29,7 +29,7 @@ export class DetailsReferentComponent implements OnInit {
this.idReferent = this.route.snapshot.paramMap.get("id");
this.referentSubscription = this.service.getCollaborateurById(this.idReferent).subscribe(
referent => this.initReferent(referent[0]),
referent => this.initReferent(referent),
err => console.log(err)
)
}

Loading…
Cancel
Save