Style dans la page de résumé
This commit is contained in:
@@ -57,7 +57,9 @@ export class ListOfDzsComponent implements OnInit {
|
||||
}
|
||||
|
||||
public setToFavorite(dropzone: DropZoneResp) {
|
||||
dropzone.isFavorite = this.serviceApi.SetFavoriteDropZone(dropzone);
|
||||
dropzone.isFavorite = true;
|
||||
this.serviceApi.SetFavoriteDropZone(dropzone);
|
||||
|
||||
const data = this.dataSourceTable.data;
|
||||
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
||||
@@ -65,7 +67,9 @@ export class ListOfDzsComponent implements OnInit {
|
||||
}
|
||||
|
||||
public removeToFavorite(dropzone: DropZoneResp) {
|
||||
dropzone.isFavorite = !this.serviceApi.RemoveFavoriteDropZone(dropzone);
|
||||
dropzone.isFavorite = false;
|
||||
this.serviceApi.RemoveFavoriteDropZone(dropzone);
|
||||
|
||||
const data = this.dataSourceTable.data;
|
||||
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0));
|
||||
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
|
||||
|
||||
Reference in New Issue
Block a user