diff --git a/src/Vegasco-Web/src/app/modules/entries/edit-entry/edit-entry.component.ts b/src/Vegasco-Web/src/app/modules/entries/edit-entry/edit-entry.component.ts index ce86a37..9fbf386 100644 --- a/src/Vegasco-Web/src/app/modules/entries/edit-entry/edit-entry.component.ts +++ b/src/Vegasco-Web/src/app/modules/entries/edit-entry/edit-entry.component.ts @@ -81,7 +81,8 @@ export class EditEntryComponent implements OnInit { .getAll() .pipe( takeUntilDestroyed(), - map(response => response.cars), + map(response => response.cars + .sort((a, b) => a.name.localeCompare(b.name))), tap(cars => { const selectedCarId = this.selectedCarService.getSelectedCarId(); diff --git a/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts b/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts index aa38d73..08e33e9 100644 --- a/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts +++ b/src/Vegasco-Web/src/app/modules/entries/entries/entries.component.ts @@ -99,6 +99,8 @@ export class EntriesComponent implements OnInit { this.cars$ = this.entriesOverviewService.getCars() .pipe( takeUntilDestroyed(), + map((cars) => cars + .sort((a, b) => a.name.localeCompare(b.name))), tap((cars) => { const selectedCarId = this.selectedCarService.getSelectedCarId();