X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftournament%2FDetail.js;h=bb9b9284461ebe85ea7c4a818cb417c8c7df43f6;hb=5a0be9cded90d70dd16a56d30b4804dbd830aa0f;hp=d4e23cdba4e0ca359a634d2fda2b73e896e595c1;hpb=e0616336a824a6d59c4b9d25ef4ed7fa26214cef;p=alttp.git diff --git a/resources/js/components/tournament/Detail.js b/resources/js/components/tournament/Detail.js index d4e23cd..bb9b928 100644 --- a/resources/js/components/tournament/Detail.js +++ b/resources/js/components/tournament/Detail.js @@ -6,6 +6,7 @@ import { withTranslation } from 'react-i18next'; import ApplyButton from './ApplyButton'; import Scoreboard from './Scoreboard'; import ScoreChartButton from './ScoreChartButton'; +import SettingsButton from './SettingsButton'; import ApplicationsButton from '../applications/Button'; import Protocol from '../protocol/Protocol'; import Rounds from '../rounds/List'; @@ -13,12 +14,14 @@ import Box from '../users/Box'; import { isRunner, mayAddRounds, + mayUpdateTournament, mayViewProtocol, } from '../../helpers/permissions'; import { getTournamentAdmins, getTournamentMonitors, hasRunners, + hasScoreboard, hasTournamentAdmins, hasTournamentMonitors, } from '../../helpers/Tournament'; @@ -50,6 +53,9 @@ const Detail = ({
+ {mayUpdateTournament(user, tournament) ? + + : null} {mayViewProtocol(user, tournament) ? : null} @@ -60,15 +66,17 @@ const Detail = ({
-
-

{i18n.t('tournaments.scoreboard')}

- {hasRunners(tournament) && tournament.rounds.length > 2 ? - + {hasScoreboard(tournament) ? <> +
+

{i18n.t('tournaments.scoreboard')}

+ {hasRunners(tournament) && tournament.rounds.length > 2 ? + + : null} +
+ {hasRunners(tournament) ? + : null} -
- {hasRunners(tournament) ? - - : null} + : null} {hasTournamentAdmins(tournament) ? <>