@@ -21,7 +21,8 @@ export function TeamRosterInputsCheckboxes({
key={member.id}
className={clsx(
"tournament-bracket__during-match-actions__checkbox-name",
- { "disabled-opaque": disabled }
+ { "disabled-opaque": mode === "DISABLED" },
+ { presentational: mode === "PRESENTATIONAL" }
)}
>
handlePlayerClick(member.id)}
diff --git a/app/db/tournament/queries/findMatchModalInfoByNumber.ts b/app/db/tournament/queries/findMatchModalInfoByNumber.ts
index aa711a27f..5b78479ce 100644
--- a/app/db/tournament/queries/findMatchModalInfoByNumber.ts
+++ b/app/db/tournament/queries/findMatchModalInfoByNumber.ts
@@ -1,6 +1,5 @@
import type {
Mode,
- TeamOrder,
TournamentMatchGameResult,
TournamentTeamMember,
User,
@@ -19,7 +18,7 @@ export type FindMatchModalInfoByNumber =
idForReact: string;
teamUpper: TeamRosterInputTeam;
teamLower: TeamRosterInputTeam;
- winner?: TeamOrder;
+ winnerId?: string;
stage: { name: string; mode: Mode };
}[];
}
@@ -92,7 +91,11 @@ export async function findMatchModalInfoByNumber({
id: lowerTeam.teamId,
members: membersWithPlayedInfo.lowerTeamMembers,
},
- winner: stageResult?.winner,
+ winnerId: stageResult
+ ? stageResult.winner === "UPPER"
+ ? upperTeam.teamId
+ : lowerTeam.teamId
+ : undefined,
stage: {
name: tournamentRoundStage.stage.name,
mode: tournamentRoundStage.stage.mode,
diff --git a/app/routes/to/$organization.$tournament/bracket.$bid/match.$num.tsx b/app/routes/to/$organization.$tournament/bracket.$bid/match.$num.tsx
index c62bcb681..7d003a2fc 100644
--- a/app/routes/to/$organization.$tournament/bracket.$bid/match.$num.tsx
+++ b/app/routes/to/$organization.$tournament/bracket.$bid/match.$num.tsx
@@ -1,4 +1,10 @@
-import { json, LoaderFunction, useLoaderData, useLocation } from "remix";
+import {
+ json,
+ LinksFunction,
+ LoaderFunction,
+ useLoaderData,
+ useLocation,
+} from "remix";
import { z } from "zod";
import Modal from "~/components/Modal";
import { TeamRosterInputs } from "~/components/tournament/TeamRosterInputs";
@@ -7,6 +13,11 @@ import {
findMatchModalInfoByNumber,
} from "~/db/tournament/queries/findMatchModalInfoByNumber";
import { Unpacked } from "~/utils";
+import styles from "~/styles/tournament-match.css";
+
+export const links: LinksFunction = () => {
+ return [{ rel: "stylesheet", href: styles }];
+};
const typedJson = (args: NonNullable
) => json(args);
@@ -28,20 +39,24 @@ export default function MatchModal() {
return (
{data.roundName}
- {data.matchInfos
- .filter((matchInfo) => matchInfo.winner)
- .map((matchInfo) => {
- return (
- null}
- setWinnerId={() => null}
- />
- );
- })}
+
+ {data.matchInfos
+ .filter((matchInfo) => matchInfo.winnerId)
+ .map((matchInfo) => {
+ return (
+ null}
+ setWinnerId={() => null}
+ winnerId={matchInfo.winnerId}
+ presentational
+ />
+ );
+ })}
+
);
}
diff --git a/app/styles/tournament-bracket.css b/app/styles/tournament-bracket.css
index 85228fa3a..acdddce32 100644
--- a/app/styles/tournament-bracket.css
+++ b/app/styles/tournament-bracket.css
@@ -152,11 +152,11 @@
display: flex;
width: 100%;
align-items: center;
- cursor: pointer;
}
-.tournament-bracket__during-match-actions__checkbox-name:not(.disabled-opaque):hover {
+.tournament-bracket__during-match-actions__checkbox-name:not(.disabled-opaque):not(.presentational):hover {
border-radius: var(--rounded);
+ cursor: pointer;
outline: 2px solid var(--theme-transparent);
outline-offset: 2px;
}
diff --git a/app/styles/tournament-match.css b/app/styles/tournament-match.css
new file mode 100644
index 000000000..1c40878ab
--- /dev/null
+++ b/app/styles/tournament-match.css
@@ -0,0 +1,6 @@
+.tournament-match-modal__rounds {
+ display: flex;
+ flex-direction: column;
+ gap: var(--s-8);
+ margin-block-start: var(--s-4);
+}