feat(tournament): enhance tournament creation with group settings and winning sets logic

- Updated the tournamentService to set default values for tournament type, number of groups, and advancing participants for group tournaments.
- Adjusted the frontend logic to dynamically determine the number of winning sets based on the mini championship year, ensuring proper configuration for tournaments.
This commit is contained in:
Torsten Schulz (local)
2026-01-30 23:12:44 +01:00
parent 14dc654145
commit 47a815dd71
2 changed files with 7 additions and 2 deletions

View File

@@ -1208,7 +1208,10 @@ export default {
const tournament = tRes.data;
this.currentTournamentName = tournament.name || '';
this.currentTournamentDate = tournament.date || '';
this.currentWinningSets = tournament.winningSets || 3;
const defaultSets = tournament.miniChampionshipYear != null ? 1 : 3;
this.currentWinningSets = (tournament.winningSets != null && tournament.winningSets >= 1)
? tournament.winningSets
: defaultSets;
this.isGroupTournament = tournament.type === 'groups';
// Defensive: Backend/DB kann (historisch/UI-default) 0/null liefern.
// Für gruppenbasierte Turniere ohne Klassen brauchen wir hier aber eine sinnvolle Zahl,