This repository was archived by the owner on Feb 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Sports-day/feature/legacy-automation-comp…
…onents
- Loading branch information
Showing
11 changed files
with
1,058 additions
and
236 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
app/(authenticated)/sports/[id]/automatic-match-editor/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import CardBackground from "@/components/layout/cardBackground"; | ||
import {Stack, Link, Typography, Breadcrumbs} from "@mui/material"; | ||
import {sportFactory} from "@/src/models/SportModel"; | ||
import {gameFactory} from "@/src/models/GameModel"; | ||
import {CrossGameAutomaticMatchEditor} from "@/components/automation/CrossGameAutomaticMatchEditor"; | ||
|
||
export default async function CrossGameAutomaticMatchEditorPage({params}: { params: { id: string } }) { | ||
const sportId = parseInt(params.id, 10) | ||
const sport = await sportFactory().show(sportId) | ||
const games = await gameFactory().index() | ||
const filteredGames = games.filter((game) => game.sportId == sportId) | ||
|
||
return( | ||
<Stack spacing={1} mx={2} my={3}> | ||
<Breadcrumbs aria-label="breadcrumb" sx={{pl:2}}> | ||
<Link underline="hover" color="inherit" href="/"> | ||
管理者のダッシュボード | ||
</Link> | ||
<Link underline="hover" color="inherit" href={"/sports"}> | ||
競技管理 | ||
</Link> | ||
<Link underline="hover" color="inherit" href={`/sports/${sportId}`}> | ||
{sport.name} | ||
</Link> | ||
<Typography color="text.primary">一括試合編集(Cross Game)</Typography> | ||
</Breadcrumbs> | ||
<CardBackground title={"一括編集"}> | ||
<CrossGameAutomaticMatchEditor | ||
games={filteredGames} | ||
/> | ||
</CardBackground> | ||
</Stack> | ||
) | ||
} |
35 changes: 35 additions & 0 deletions
35
app/(authenticated)/sports/[id]/games/[gameId]/automatic-match-editor/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import CardBackground from "@/components/layout/cardBackground"; | ||
import {Stack, Link, Typography, Breadcrumbs} from "@mui/material"; | ||
import {sportFactory} from "@/src/models/SportModel"; | ||
import {gameFactory} from "@/src/models/GameModel"; | ||
import {AutomaticMatchEditor} from "@/components/automation/AutomaticMatchEditor"; | ||
|
||
export default async function AutomaticMatchEditorPage({params}: { params: { gameId:string, id: string } }) { | ||
const gameId = parseInt(params.gameId, 10) | ||
const game = await gameFactory().show(gameId) | ||
const sportId = parseInt(params.id, 10) | ||
const sport = await sportFactory().show(sportId) | ||
|
||
return( | ||
<Stack spacing={1} mx={2} my={3}> | ||
<Breadcrumbs aria-label="breadcrumb" sx={{pl:2}}> | ||
<Link underline="hover" color="inherit" href="/"> | ||
管理者のダッシュボード | ||
</Link> | ||
<Link underline="hover" color="inherit" href={"/sports"}> | ||
競技管理 | ||
</Link> | ||
<Link underline="hover" color="inherit" href={`/sports/${sport.id}`}> | ||
{sport.name} | ||
</Link> | ||
<Link underline="hover" color="inherit" href={`/sports/${sport.id}/games/${game.id}`}> | ||
{game.name}(ID:{gameId}) | ||
</Link> | ||
<Typography color="text.primary">試合一括編集</Typography> | ||
</Breadcrumbs> | ||
<CardBackground title={`試合一括編集`}> | ||
<AutomaticMatchEditor game={game} /> | ||
</CardBackground> | ||
</Stack> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.