Ensure correct sorting and thus also correct liter per 100km calculation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-06-24 20:35:49 +02:00
parent 4b377ce9f4
commit b41d5c5d33
2 changed files with 6 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ export class EntriesComponent implements OnInit {
const entries = this.consumptionClient.getAll()
.pipe(
takeUntilDestroyed(),
map(response => response.consumptions),
map(response => response.consumptions.sort((a, b) => b.dateTime.localeCompare(a.dateTime))),
catchError((error) => this.handleGetEntriesError(error))
);