mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Disable changing is follow up bracket after tournament start
This commit is contained in:
parent
c58000f3fd
commit
71bb340ea9
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ function EventForm() {
|
|||
}
|
||||
isInvitationalTournament={isInvitational}
|
||||
setErrored={setBracketProgressionErrored}
|
||||
isTournamentInProgress={false}
|
||||
/>
|
||||
</div>
|
||||
) : null}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user