Modification de la récupération des sauts et mapping entre les IDs des données référentielles et les données présentes dans le cache.

This commit is contained in:
Sébastien André
2021-05-02 15:00:11 +02:00
parent 192a985b50
commit f59d1828ca
9 changed files with 70 additions and 15 deletions

View File

@@ -46,14 +46,15 @@ export class ListOfDzsComponent implements OnInit {
}
private getListOfDropZones() {
this.serviceApi.getListOfDropZones().subscribe((data) => {
setTimeout(() => {
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) || a.name.localeCompare(b.name));
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
this.dataSourceTable.paginator = this.paginator;
this.resultsLength = data.length;
}, 500);
});
this.serviceApi.getListOfDropZones()
.subscribe((data) => {
setTimeout(() => {
data.sort((a, b) => (b.isFavorite ? 1 : 0) - (a.isFavorite ? 1 : 0) || a.name.localeCompare(b.name));
this.dataSourceTable = new MatTableDataSource<DropZoneResp>(data);
this.dataSourceTable.paginator = this.paginator;
this.resultsLength = data.length;
}, 500);
});
}
public setToFavorite(dropzone: DropZoneResp) {

View File

@@ -15,6 +15,7 @@
</div>
<div class="paragraph" style="margin-top: 20px;">
<label class="left130">Refresh</label>
<mat-icon aria-hidden="false" aria-label="Force the refresh of the stats" style="cursor: pointer;"
(click)='refreshStats()'>cached</mat-icon>
</div>