Disable changing is follow up bracket after tournament start
Some checks failed
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

This commit is contained in:
Kalle 2025-01-24 17:23:54 +02:00
parent c58000f3fd
commit 71bb340ea9
3 changed files with 8 additions and 1 deletions

View File

@ -23,10 +23,12 @@ export function BracketProgressionSelector({
initialBrackets,
isInvitationalTournament,
setErrored,
isTournamentInProgress,
}: {
initialBrackets?: Progression.InputBracket[];
isInvitationalTournament: boolean;
setErrored: (errored: boolean) => void;
isTournamentInProgress: boolean;
}) {
const [brackets, setBrackets] = React.useState<Progression.InputBracket[]>(
initialBrackets ?? [defaultBracket()],
@ -106,6 +108,7 @@ export function BracketProgressionSelector({
}
count={i + 1}
isInvitationalTournament={isInvitationalTournament}
isTournamentInProgress={isTournamentInProgress}
/>
))}
</div>
@ -132,6 +135,7 @@ function TournamentFormatBracketSelector({
onDelete,
count,
isInvitationalTournament,
isTournamentInProgress,
}: {
bracket: Progression.InputBracket;
brackets: Progression.InputBracket[];
@ -139,6 +143,7 @@ function TournamentFormatBracketSelector({
onDelete?: () => void;
count: number;
isInvitationalTournament: boolean;
isTournamentInProgress: boolean;
}) {
const id = React.useId();
@ -353,7 +358,7 @@ function TournamentFormatBracketSelector({
startTime: undefined,
})
}
disabled={bracket.disabled}
disabled={bracket.disabled || isTournamentInProgress}
/>
<Label htmlFor={createId("follow-up-bracket")} spaced={false}>
Is follow-up bracket

View File

@ -273,6 +273,7 @@ function EventForm() {
}
isInvitationalTournament={isInvitational}
setErrored={setBracketProgressionErrored}
isTournamentInProgress={false}
/>
</div>
) : null}

View File

@ -815,6 +815,7 @@ function BracketProgressionEditDialog({ close }: { close: () => void }) {
}))}
isInvitationalTournament={tournament.isInvitational}
setErrored={setBracketProgressionErrored}
isTournamentInProgress
/>
<div className="stack md horizontal justify-center mt-6">
<SubmitButton