Add best of 1 as an option to tournaments

This commit is contained in:
Kalle 2024-08-25 10:19:06 +03:00
parent 9a82c5b782
commit ec2ad2033e
3 changed files with 4 additions and 3 deletions

View File

@ -611,6 +611,7 @@ function GlobalMapCountInput({
onChange={(e) => onSetCount(Number(e.target.value))}
defaultValue={defaultValue}
>
<option value="1">1</option>
<option value="3">3</option>
<option value="5">5</option>
<option value="7">7</option>
@ -712,7 +713,7 @@ function RoundMapList({
</h3>
{editing && includeRoundSpecificSelections ? (
<div className="stack xs horizontal">
{[3, 5, 7].map((count) => (
{[1, 3, 5, 7].map((count) => (
<div key={count}>
<Label htmlFor={`bo-${count}-${id}`}>Bo{count}</Label>
<input

View File

@ -105,7 +105,7 @@ const tournamentRoundMaps = z.object({
}),
)
.nullish(),
count: numericEnum([3, 5, 7]),
count: numericEnum([1, 3, 5, 7]),
type: z.enum(["BEST_OF", "PLAY_ALL"]),
pickBan: z.enum(["COUNTERPICK", "BAN_2"]).nullish(),
});

View File

@ -3,7 +3,7 @@ export const TOURNAMENT = {
COUNTERPICK_MAPS_PER_MODE: 2,
COUNTERPICK_MAX_STAGE_REPEAT: 2,
COUNTERPICK_ONE_MODE_TOURNAMENT_MAPS_PER_MODE: 6,
AVAILABLE_BEST_OF: [3, 5, 7] as const,
AVAILABLE_BEST_OF: [1, 3, 5, 7] as const,
ENOUGH_TEAMS_TO_START: 2,
MIN_GROUP_SIZE: 3,
MAX_GROUP_SIZE: 6,