diff --git a/js/components/GroupStage.js b/js/components/GroupStage.js index 7b0ac40..ae2d73c 100644 --- a/js/components/GroupStage.js +++ b/js/components/GroupStage.js @@ -80,9 +80,9 @@ function GroupScoresTable(props) { Team - Pkt. - Gew. - Kas. + Pkt. + Gew. + Kas. diff --git a/js/components/Match.js b/js/components/Match.js index d9f3211..7396122 100644 --- a/js/components/Match.js +++ b/js/components/Match.js @@ -118,13 +118,21 @@ export class Match extends React.Component { smallMessage = 'Spiel kann gestartet werden'; break; } + + const groupInformation = this.state.match.group ? +
Gr. {this.state.match.group.number}
: + ''; + return (
- {this.state.match.position} + + {groupInformation} +
Sp. {this.state.match.position}
+
{smallMessage} diff --git a/js/redux/tournamentApi.js b/js/redux/tournamentApi.js index 2a35483..a216d1d 100644 --- a/js/redux/tournamentApi.js +++ b/js/redux/tournamentApi.js @@ -106,9 +106,12 @@ function convertGroup(apiGroup) { function convertMatch(apiMatch, allowUndecided) { const result = { - id: apiMatch.id, state: apiMatch.state, allowUndecided: allowUndecided, + id: apiMatch.id, + state: apiMatch.state, + allowUndecided: allowUndecided, winnerTeamId: apiMatch.winner === null ? null : apiMatch.winner.id, - position: apiMatch.position + 1 + position: apiMatch.position + 1, + group: apiMatch.group ? {id: apiMatch.group.id, number: apiMatch.group.number} : null }; if (apiMatch.match_scores.length === 2) { diff --git a/pages/tournament-fullscreen.js b/pages/tournament-fullscreen.js index b5dd732..5819389 100644 --- a/pages/tournament-fullscreen.js +++ b/pages/tournament-fullscreen.js @@ -7,6 +7,7 @@ import { Spinner } from 'reactstrap'; import {Match} from '../js/components/Match'; +import {sortMatchesByPositionAscending} from '../js/utils/sorting'; function FullscreenPage(props) { @@ -27,7 +28,9 @@ function Matches(props) { matches = (
keine Matches
); } else { matches = ( - {props.matches.map(match => )} + {props.matches.sort(sortMatchesByPositionAscending()).map( + match => + )} ); } return (