mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-14 07:06:14 -05:00
Fix can't prepare maps in two day tournaments
This commit is contained in:
@@ -14,6 +14,7 @@ import { modesShort, rankedModesShort } from "~/modules/in-game-lists/modes";
|
||||
import { isAdmin } from "~/permissions";
|
||||
import { removeDuplicates } from "~/utils/arrays";
|
||||
import {
|
||||
databaseTimestampNow,
|
||||
databaseTimestampToDate,
|
||||
dateToDatabaseTimestamp,
|
||||
} from "~/utils/dates";
|
||||
@@ -198,6 +199,7 @@ export class Tournament {
|
||||
sources,
|
||||
createdAt: null,
|
||||
canBeStarted:
|
||||
(!startTime || startTime < databaseTimestampNow()) &&
|
||||
checkedInTeams.length >= TOURNAMENT.ENOUGH_TEAMS_TO_START &&
|
||||
(sources ? relevantMatchesFinished : this.regularCheckInHasEnded),
|
||||
teamsPendingCheckIn:
|
||||
@@ -242,6 +244,7 @@ export class Tournament {
|
||||
sources,
|
||||
createdAt: null,
|
||||
canBeStarted:
|
||||
(!startTime || startTime < databaseTimestampNow()) &&
|
||||
checkedInTeamsWithReplaysAvoided.length >=
|
||||
TOURNAMENT.ENOUGH_TEAMS_TO_START &&
|
||||
(sources ? relevantMatchesFinished : this.regularCheckInHasEnded),
|
||||
|
||||
@@ -471,6 +471,8 @@ export default function TournamentBracketsPage() {
|
||||
⚠️{" "}
|
||||
{bracketIdx === 0 ? (
|
||||
<>Tournament start time is in the future</>
|
||||
) : bracket.startTime && bracket.startTime > new Date() ? (
|
||||
<>Bracket start time is in the future</>
|
||||
) : (
|
||||
<>Teams pending from the previous bracket</>
|
||||
)}{" "}
|
||||
|
||||
Reference in New Issue
Block a user