From 0ee16c77668242c612c17a5942f40e6da6ba2ca6 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Sun, 21 Sep 2025 17:49:41 +0200 Subject: [PATCH] =?UTF-8?q?F=C3=BCgt=20detaillierte=20Konsolenausgaben=20i?= =?UTF-8?q?n=20TournamentService.js=20hinzu,=20um=20den=20Prozess=20der=20?= =?UTF-8?q?Match-Erstellung=20f=C3=BCr=20Gruppen=20zu=20verfolgen.=20Aktua?= =?UTF-8?q?lisiert=20das=20Styling=20in=20main.scss,=20um=20die=20Schrifta?= =?UTF-8?q?rtgewichtung=20auf=20700=20zu=20erh=C3=B6hen=20und=20die=20Text?= =?UTF-8?q?transformation=20zu=20entfernen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/services/tournamentService.js | 11 ++++++++++- frontend/src/assets/css/main.scss | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/backend/services/tournamentService.js b/backend/services/tournamentService.js index 583130b..12b1c0b 100644 --- a/backend/services/tournamentService.js +++ b/backend/services/tournamentService.js @@ -202,20 +202,28 @@ class TournamentService { } // 4) Round‑Robin anlegen wie gehabt - NUR innerhalb jeder Gruppe + console.log(`[fillGroups] Erstelle Matches für ${groups.length} Gruppen`); for (const g of groups) { + console.log(`[fillGroups] Verarbeite Gruppe ${g.id}`); const gm = await TournamentMember.findAll({ where: { groupId: g.id } }); + console.log(`[fillGroups] Gruppe ${g.id} hat ${gm.length} Teilnehmer:`, gm.map(m => ({ id: m.id, name: m.member?.firstName + ' ' + m.member?.lastName }))); + if (gm.length < 2) { console.warn(`Gruppe ${g.id} hat nur ${gm.length} Teilnehmer - keine Matches erstellt`); continue; } + const rounds = this.generateRoundRobinSchedule(gm); + console.log(`[fillGroups] Gruppe ${g.id} hat ${rounds.length} Runden`); + for (let roundIndex = 0; roundIndex < rounds.length; roundIndex++) { + console.log(`[fillGroups] Runde ${roundIndex + 1} für Gruppe ${g.id}:`, rounds[roundIndex]); for (const [p1Id, p2Id] of rounds[roundIndex]) { // Prüfe, ob beide Spieler zur gleichen Gruppe gehören const p1 = gm.find(p => p.id === p1Id); const p2 = gm.find(p => p.id === p2Id); if (p1 && p2 && p1.groupId === p2.groupId && p1.groupId === g.id) { - await TournamentMatch.create({ + const match = await TournamentMatch.create({ tournamentId, groupId: g.id, round: 'group', @@ -223,6 +231,7 @@ class TournamentService { player2Id: p2Id, groupRound: roundIndex + 1 }); + console.log(`[fillGroups] Match erstellt: ${match.id} - Spieler ${p1Id} vs ${p2Id} in Gruppe ${g.id}`); } else { console.warn(`Spieler gehören nicht zur gleichen Gruppe: ${p1Id} (${p1?.groupId}) vs ${p2Id} (${p2?.groupId}) in Gruppe ${g.id}`); } diff --git a/frontend/src/assets/css/main.scss b/frontend/src/assets/css/main.scss index 39afe9c..d9d6ae8 100644 --- a/frontend/src/assets/css/main.scss +++ b/frontend/src/assets/css/main.scss @@ -369,8 +369,8 @@ th, td { th { background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)); color: white; - font-weight: 600; - text-transform: uppercase; + font-weight: 700; + text-transform: none; font-size: 0.75rem; letter-spacing: 0.4px; }