diff --git a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java index db725e34..7dc5efa3 100644 --- a/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java +++ b/server/application-server/src/main/java/de/tum/in/www1/hephaestus/meta/MetaService.java @@ -1,15 +1,15 @@ package de.tum.in.www1.hephaestus.meta; +import de.tum.in.www1.hephaestus.gitprovider.team.TeamService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import de.tum.in.www1.hephaestus.gitprovider.team.TeamService; - @Service public class MetaService { + private static final Logger logger = LoggerFactory.getLogger(MetaService.class); @Autowired @@ -24,6 +24,10 @@ public class MetaService { public MetaDataDTO getMetaData() { logger.info("Getting meta data..."); var teams = teamService.getAllTeams(); - return new MetaDataDTO(teams, scheduledDay, scheduledTime); + return new MetaDataDTO( + teams.stream().sorted((team1, team2) -> team1.name().compareTo(team2.name())).toList(), + scheduledDay, + scheduledTime + ); } } diff --git a/webapp/src/app/home/leaderboard/filter/team/team.component.ts b/webapp/src/app/home/leaderboard/filter/team/team.component.ts index c0cb2ad4..cd8a4e1d 100644 --- a/webapp/src/app/home/leaderboard/filter/team/team.component.ts +++ b/webapp/src/app/home/leaderboard/filter/team/team.component.ts @@ -1,6 +1,6 @@ import { Component, computed, effect, input, signal } from '@angular/core'; import { FormsModule } from '@angular/forms'; -import { Router, RouterLink } from '@angular/router'; +import { Router } from '@angular/router'; import { BrnSelectModule } from '@spartan-ng/ui-select-brain'; import { HlmSelectModule } from '@spartan-ng/ui-select-helm'; import { HlmLabelModule } from '@spartan-ng/ui-label-helm'; @@ -14,7 +14,7 @@ interface SelectOption { @Component({ selector: 'app-leaderboard-filter-team', standalone: true, - imports: [RouterLink, BrnSelectModule, HlmSelectModule, HlmLabelModule, FormsModule], + imports: [BrnSelectModule, HlmSelectModule, HlmLabelModule, FormsModule], templateUrl: './team.component.html' }) export class LeaderboardFilterTeamComponent {