Skip to content

Commit

Permalink
Simplify backend function
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Jun 3, 2024
1 parent 48e1e9c commit e506dde
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ public List<AlignmentDto> getAlignmentPossibilities(Long quarterId) {
List<Objective> objectivesByQuarter = objectivePersistenceService.findObjectiveByQuarterId(quarterId);
List<AlignmentDto> alignmentDtoList = new ArrayList<>();

Set<Team> teamSet = new HashSet<>();
objectivesByQuarter.forEach(objective -> teamSet.add(objective.getTeam()));
List<Team> teamList = new ArrayList<>(teamSet.stream().sorted(Comparator.comparing(Team::getName)).toList());
List<Team> teamList = objectivesByQuarter.stream().map(Objective::getTeam).distinct()
.sorted(Comparator.comparing(Team::getName)).toList();

teamList.forEach(team -> {
List<Objective> filteredObjectiveList = objectivesByQuarter.stream()
Expand Down

0 comments on commit e506dde

Please sign in to comment.