diff --git a/frontend/src/components/tournament/TournamentGroupsTab.vue b/frontend/src/components/tournament/TournamentGroupsTab.vue
index c521b10..8f71735 100644
--- a/frontend/src/components/tournament/TournamentGroupsTab.vue
+++ b/frontend/src/components/tournament/TournamentGroupsTab.vue
@@ -104,7 +104,7 @@
+ @click="idx !== oppIdx ? handleMatchClick(pl.id, opponent.id, group.groupId) : null">
@@ -207,8 +207,9 @@ export default {
'randomize-groups',
'reset-groups',
'reset-matches',
- 'create-matches',
- 'highlight-match'
+ 'create-matches',
+ 'highlight-match',
+ 'go-to-match'
],
computed: {
filteredGroupMatches() {
@@ -384,6 +385,20 @@ export default {
const position = liveStats.findIndex(p => p.id === playerId) + 1;
return position || groupPlayers.findIndex(p => p.id === playerId) + 1;
+ },
+ handleMatchClick(player1Id, player2Id, groupId) {
+ // Highlight das Match
+ this.$emit('highlight-match', player1Id, player2Id, groupId);
+ // Finde das Match und gehe zum Ergebnistab
+ const match = this.matches.find(m =>
+ m.round === 'group' &&
+ m.groupId === groupId &&
+ ((m.player1.id === player1Id && m.player2.id === player2Id) ||
+ (m.player1.id === player2Id && m.player2.id === player1Id))
+ );
+ if (match) {
+ this.$emit('go-to-match', match.id);
+ }
}
}
};
diff --git a/frontend/src/components/tournament/TournamentResultsTab.vue b/frontend/src/components/tournament/TournamentResultsTab.vue
index 224a524..fa1337f 100644
--- a/frontend/src/components/tournament/TournamentResultsTab.vue
+++ b/frontend/src/components/tournament/TournamentResultsTab.vue
@@ -506,3 +506,56 @@ export default {
}
};
+
+
diff --git a/frontend/src/views/TournamentTab.vue b/frontend/src/views/TournamentTab.vue
index c14f182..17703a4 100644
--- a/frontend/src/views/TournamentTab.vue
+++ b/frontend/src/views/TournamentTab.vue
@@ -177,6 +177,7 @@
@reset-matches="resetMatches()"
@create-matches="createMatches()"
@highlight-match="highlightMatch"
+ @go-to-match="goToMatch"
/>
@@ -2231,6 +2232,25 @@ export default {
el.classList.remove('match-highlight');
});
},
+
+ goToMatch(matchId) {
+ // Wechsle zum Ergebnistab
+ this.setActiveTab('results');
+ // Setze activeMatchId für Hervorhebung
+ this.activeMatchId = matchId;
+ // Scrolle zum Match nach einem kurzen Delay, damit der Tab geladen ist
+ this.$nextTick(() => {
+ setTimeout(() => {
+ const matchElement = document.querySelector(`tr[data-match-id="${matchId}"]`);
+ if (matchElement) {
+ matchElement.scrollIntoView({
+ behavior: 'smooth',
+ block: 'center'
+ });
+ }
+ }, 100);
+ });
+ },
async updateParticipantSeeded(participant, event) {
const seeded = event.target.checked;
|