diff --git a/components/league/legacy/GameEditFields.tsx b/components/league/legacy/GameEditFields.tsx index 75b6371..166915d 100644 --- a/components/league/legacy/GameEditFields.tsx +++ b/components/league/legacy/GameEditFields.tsx @@ -138,6 +138,11 @@ export default function GameEditFields(props: GameEditFieldsProps) { > 得失点 + + 勝ち点 + diff --git a/components/league/legacy/GameForm.tsx b/components/league/legacy/GameForm.tsx index 8ff0137..3793f3b 100644 --- a/components/league/legacy/GameForm.tsx +++ b/components/league/legacy/GameForm.tsx @@ -42,8 +42,8 @@ export default function GameForm(props: GameFormProps) { } // calculationType invalid - if (calculationTypeState !== "total_score" && calculationTypeState !== "diff_score") { - alert("合計得点もしくは得失点差が選択可能です。") + if (calculationTypeState !== "total_score" && calculationTypeState !== "diff_score" && calculationTypeState !== "win_score") { + alert("勝ち点、合計得点もしくは得失点差が選択可能です。") return } diff --git a/components/league/table/leagueTable.tsx b/components/league/table/leagueTable.tsx index 6abf3bd..950b957 100644 --- a/components/league/table/leagueTable.tsx +++ b/components/league/table/leagueTable.tsx @@ -126,9 +126,16 @@ export default async function LeagueTable(props: LeagueTableProps) { ) } } else { - rows.push( - - ) + if (results.teams.some(r => r.rank === result.rank && r.teamId !== result.teamId)) { + rows.push( + + ) + } else { + rows.push( + + ) + } + } } } diff --git a/src/models/GameModel.ts b/src/models/GameModel.ts index 0878228..42b75de 100644 --- a/src/models/GameModel.ts +++ b/src/models/GameModel.ts @@ -16,7 +16,7 @@ export type Game = { } export type GameType = "tournament" | "league" -export type GameCalculationType = "total_score" | "diff_score" +export type GameCalculationType = "total_score" | "diff_score" | "win_score" export type TournamentResult = { gameId: number,