Hide UI and serverside check against adding a new team after tournament started
Some checks failed
E2E Tests / e2e (push) Has been cancelled
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
2026-07-07 08:05:58 +03:00
parent 1726c463fe
commit dab72d7142
2 changed files with 4 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ import {
import * as TournamentLFGRepository from "~/features/tournament-lfg/TournamentLFGRepository.server";
import { parseFormDataWithImages } from "~/form/parse.server";
import invariant from "~/utils/invariant";
import { parseParams } from "~/utils/remix.server";
import { errorToastIfFalsy, parseParams } from "~/utils/remix.server";
import { tournamentAdminPage } from "~/utils/urls";
import { idObject } from "~/utils/zod";
import { adminRegistrationFormSchemaServer } from "../tournament-admin-registration-schemas.server";
@@ -50,6 +50,8 @@ export const action: ActionFunction = async ({ request, params }) => {
team = tournament.teamById(data.tournamentTeamId);
}
errorToastIfFalsy(team || !tournament.hasStarted, "Tournament has started");
const currentMemberIds = team?.members.map((member) => member.userId) ?? [];
const submittedMemberIds = submittedMembers.map((member) => member.userId);
const membersToAdd = submittedMemberIds.filter(

View File

@@ -72,7 +72,7 @@ export default function TournamentAdminTeamsPage() {
>
Export
</SendouButton>
{!tournament.ctx.isFinalized ? (
{!tournament.hasStarted ? (
<LinkButton
size="small"
icon={<Plus />}