+ Schedule - {tournament.name} +
+ ++ Tournament Schedule +
+ ++ No schedule has been generated yet. Click "Generate Schedule" to create round matchups. +
+diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..da8a33c --- /dev/null +++ b/.env.production @@ -0,0 +1,11 @@ +# Test environment - use dev database +DATABASE_PROVIDER=postgresql +DATABASE_URL="postgresql://euchre_camp:LINGO5row_hiding@dhg.lol:5432/euchre_camp_dev" + +# Better Auth Configuration +BETTER_AUTH_SECRET="your-secret-key-change-in-production" +BETTER_AUTH_URL="http://localhost:3000" +TRUSTED_ORIGINS="http://localhost:3000" + +# Application configuration +NODE_ENV=production diff --git a/.gitignore b/.gitignore index 2b128b4..84b0682 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ prisma/prisma/dev.db* playwright-report/ .env.development .env.dev + +cucumber-pretty diff --git a/src/app/admin/tournaments/[id]/schedule/page.tsx b/src/app/admin/tournaments/[id]/schedule/page.tsx new file mode 100644 index 0000000..0ea0a32 --- /dev/null +++ b/src/app/admin/tournaments/[id]/schedule/page.tsx @@ -0,0 +1,74 @@ +import { prisma } from "@/lib/prisma" +import Navigation from "@/components/Navigation" +import Link from "next/link" +import { notFound } from "next/navigation" + +interface PageProps { + params: Promise<{ + id: string + }> +} + +export const dynamic = "force-dynamic" + +export default async function TournamentSchedulePage({ params }: PageProps) { + const { id } = await params + const tournamentId = parseInt(id, 10) + + if (isNaN(tournamentId)) { + notFound() + } + + const tournament = await prisma.event.findUnique({ + where: { id: tournamentId }, + include: { + participants: { + include: { + player: true, + }, + }, + }, + }) + + if (!tournament) { + notFound() + } + + return ( +
+ No schedule has been generated yet. Click "Generate Schedule" to create round matchups. +
++ If an account exists with that email, a password reset link will be sent. +
++ Enter your email address and we will send you a link to reset your password. +
+