@ -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)
)
}