Ajout de la mise en favoris des DZs

This commit is contained in:
Sébastien André
2019-11-27 17:47:20 +01:00
parent bee8ca06f4
commit 2a2ea38a14
11 changed files with 91 additions and 24 deletions

View File

@@ -1,5 +1,15 @@
<div *ngIf="dataSourceTable != null else loading">
<table mat-table [dataSource]="dataSourceTable">
<ng-container matColumnDef="isfavorite">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element" style="text-align: center;">
<img src="../../assets/img/favorite.png" alt="favorite DZ" *ngIf="element.isfavorite"
(click)="removeToFavorite(element)">
<img src="../../assets/img/not-favorite.png" alt="favorite DZ" *ngIf="!element.isfavorite"
(click)="setToFavorite(element)">
</td>
</ng-container>
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef>ID</th>
<td mat-cell *matCellDef="let element">{{element.id}}</td>