import Scoreboard from './Scoreboard';
import Protocol from '../protocol/Protocol';
import Rounds from '../rounds/List';
+import Box from '../users/Box';
import {
mayAddRounds,
mayViewProtocol,
} from '../../helpers/permissions';
+import {
+ getTournamentAdmins,
+ hasRunners,
+ hasTournamentAdmins,
+} from '../../helpers/Tournament';
import { withUser } from '../../helpers/UserContext';
import i18n from '../../i18n';
</Col>
</Row>
<Row>
- <Col lg={8} xl={9}>
+ <Col lg={{ order: 2, span: 4 }} xl={{ order: 2, span: 3 }}>
+ <div className="d-flex align-items-center justify-content-between">
+ <h2>{i18n.t('tournaments.scoreboard')}</h2>
+ </div>
+ {hasRunners(tournament) ?
+ <Scoreboard tournament={tournament} />
+ : null}
+ {hasTournamentAdmins(tournament) ?
+ <>
+ <div className="d-flex align-items-center justify-content-between">
+ <h2>{i18n.t('tournaments.admins')}</h2>
+ </div>
+ {getTournamentAdmins(tournament).map(p =>
+ <p key={p.id}><Box user={p.user} /></p>
+ )}
+ </>
+ : null}
+ </Col>
+ <Col lg={{ order: 1, span: 8 }} xl={{ order: 1, span: 9 }}>
<div className="d-flex align-items-center justify-content-between">
<h2>{i18n.t('rounds.heading')}</h2>
{addRound && mayAddRounds(user, tournament) ?
<Rounds rounds={tournament.rounds} tournament={tournament} />
: null}
</Col>
- <Col lg={4} xl={3}>
- <div className="d-flex align-items-center justify-content-between">
- <h2>{i18n.t('tournaments.scoreboard')}</h2>
- </div>
- {tournament.participants ?
- <Scoreboard tournament={tournament} />
- : null}
- </Col>
</Row>
</Container>;