Add match position to matches
This commit is contained in:
parent
2af0eb1d6f
commit
8c2d7412d5
|
|
@ -119,9 +119,12 @@ export class Match extends React.Component {
|
||||||
}
|
}
|
||||||
return (<div className='mb-3'>
|
return (<div className='mb-3'>
|
||||||
<Card className={'shadow-sm match '} onClick={this.toggleModal}>
|
<Card className={'shadow-sm match '} onClick={this.toggleModal}>
|
||||||
<CardBody className={borderClass + ' border py-2 ' + cardClass + ' ' + styles.match_bg}>
|
<div className="d-flex flex-row">
|
||||||
<MatchTable match={this.state.match} borderColor={borderClass}/>
|
<CardBody className={borderClass + ' border py-2 ' + cardClass + ' ' + styles.match_bg}>
|
||||||
</CardBody>
|
<MatchTable match={this.state.match} borderColor={borderClass}/>
|
||||||
|
</CardBody>
|
||||||
|
<span className="badge bg-secondary align-items-center">{this.state.match.position}</span>
|
||||||
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
<small className='text-muted'>{smallMessage}</small>
|
<small className='text-muted'>{smallMessage}</small>
|
||||||
<MatchModal title='Match' isOpen={this.state.modal} toggle={this.toggleModal} match={this.state.match}
|
<MatchModal title='Match' isOpen={this.state.modal} toggle={this.toggleModal} match={this.state.match}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,8 @@ function convertGroup(apiGroup) {
|
||||||
function convertMatch(apiMatch, allowUndecided) {
|
function convertMatch(apiMatch, allowUndecided) {
|
||||||
const result = {
|
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
|
winnerTeamId: apiMatch.winner === null ? null : apiMatch.winner.id,
|
||||||
|
position: apiMatch.position + 1
|
||||||
};
|
};
|
||||||
|
|
||||||
if (apiMatch.match_scores.length === 2) {
|
if (apiMatch.match_scores.length === 2) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue