Added TournamentRegistration.active
All checks were successful
Gitea/swiss-backend/pipeline/head This commit looks good

This commit is contained in:
2025-08-15 09:31:27 +02:00
parent e154c7e4d7
commit 3baea70356
3 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,6 @@ import nl.connectedit.swiss.domain.TournamentStatus;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -37,7 +36,7 @@ public class Tournament extends AbstractEntity {
private TournamentStatus status; private TournamentStatus status;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<Event> events;// = new ArrayList<>(); private List<Event> events;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<TournamentPlayer> tournamentPlayers; private List<TournamentPlayer> tournamentPlayers;

View File

@@ -21,5 +21,7 @@ public class TournamentRegistrationDto extends AbstractDto {
private String status; private String status;
private Boolean active;
private List<EventRegistrationDto> events; private List<EventRegistrationDto> events;
} }

View File

@@ -31,6 +31,7 @@ public class TournamentPlayerRegistrationMapper {
tournamentRegistrationDto.setEditable(tournament.getStatus() == TournamentStatus.UPCOMING); tournamentRegistrationDto.setEditable(tournament.getStatus() == TournamentStatus.UPCOMING);
tournamentRegistrationDto.setDate(tournament.getDate().format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))); tournamentRegistrationDto.setDate(tournament.getDate().format(DateTimeFormatter.ofPattern("dd-MM-yyyy")));
tournamentRegistrationDto.setStatus(tournament.getStatus().name()); tournamentRegistrationDto.setStatus(tournament.getStatus().name());
tournamentRegistrationDto.setActive(tournament.getActive());
tournamentRegistrationDto.setEvents( tournamentRegistrationDto.setEvents(
tournament.getEvents() tournament.getEvents()
.stream() .stream()