feat: Update match display logic to correctly reflect player sets and outcomes
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 45s

This commit is contained in:
Torsten Schulz (local)
2026-05-28 11:02:25 +02:00
parent e57cdc6ad8
commit 4cf0ee2be8

View File

@@ -297,13 +297,17 @@ export default {
}
});
}
const rowPlayerIsPlayer1 = match.player1.id === player1Id;
const displaySets1 = rowPlayerIsPlayer1 ? sets1 : sets2;
const displaySets2 = rowPlayerIsPlayer1 ? sets2 : sets1;
return {
sets1,
sets2,
sets1: displaySets1,
sets2: displaySets2,
isFinished: match.isFinished,
player1Won: sets1 > sets2,
player2Won: sets2 > sets1
player1Won: displaySets1 > displaySets2,
player2Won: displaySets2 > displaySets1
};
},
getMatchDisplayText(player1Id, player2Id, groupId) {
@@ -388,4 +392,3 @@ export default {
}
};
</script>