diff --git a/packages/api/src/routers/stripe.ts b/packages/api/src/routers/stripe.ts index e7ab945..f17d5f2 100644 --- a/packages/api/src/routers/stripe.ts +++ b/packages/api/src/routers/stripe.ts @@ -48,7 +48,7 @@ export const stripeRouter = createTRPCRouter({ description: "One year membership to Data Science at Georgia Tech", // images: ["https://example.com/logo.png"], // Optional: Add a logo if available }, - unit_amount: 1500, // $15.00 + unit_amount: 2500, // $15.00 }, quantity: 1, }, diff --git a/packages/db/scripts/reset.ts b/packages/db/scripts/reset.ts deleted file mode 100644 index 48f3f12..0000000 --- a/packages/db/scripts/reset.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Pool } from "pg"; -import * as dotenv from "dotenv"; -import path from "path"; -import { execSync } from "child_process"; - -dotenv.config({ path: path.resolve(__dirname, "../../../.env") }); - -const DATABASE_URL = process.env.DATABASE_URL; -if (!DATABASE_URL) { - throw new Error("DATABASE_URL is not defined"); -} - -const pool = new Pool({ connectionString: DATABASE_URL }); - -async function reset() { - console.log("Resetting database..."); - - try { - // Drop and recreate public schema to clear everything - await pool.query("DROP SCHEMA public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO public;"); - console.log("Database cleared."); - - // Push schema to restore tables - console.log("Pushing schema..."); - execSync("pnpm migrate:push", { - stdio: "inherit", - cwd: path.resolve(__dirname, "..") - }); - console.log("Schema pushed."); - - } catch (error) { - console.error("Reset failed:", error); - process.exit(1); - } finally { - await pool.end(); - } -} - -reset(); diff --git a/sites/mainweb/app/(portal)/judge/page.tsx b/sites/mainweb/app/(portal)/judge/page.tsx index c552359..13bab53 100644 --- a/sites/mainweb/app/(portal)/judge/page.tsx +++ b/sites/mainweb/app/(portal)/judge/page.tsx @@ -7,35 +7,34 @@ import { useRouter } from 'next/navigation'; import { LiquidGlass } from '@/components/portal/LiquidGlass'; import { LoadingScreen } from '@/components/portal/LoadingScreen'; import { StatusScreen } from '@/components/portal/StatusScreen'; -import { ProgressBar } from '@/components/portal/ProgressBar'; -import { RubricSlider, RubricSliderStyles } from '@/components/portal/judge/RubricSlider'; +import { RubricSlider } from '@/components/portal/judge/RubricSlider'; // Rubric criteria definitions const RUBRIC_CRITERIA = [ { key: 'creativity', - label: 'Creativity & Originality', - description: 'Unique approach to data analysis and/or solution development', + label: 'Creativity', + description: 'Unique approach & originality', }, { key: 'impact', - label: 'Impact & Relevance', - description: 'Benefits to society, alignment with competition goals', + label: 'Impact', + description: 'Benefits to society', }, { key: 'scope', - label: 'Scope & Technical Depth', - description: 'Variety of data/tools, appropriate usage in analysis', + label: 'Technical Depth', + description: 'Variety of tools & data', }, { key: 'clarity', - label: 'Clarity & Engagement', - description: 'Clear description, engaging video pitch presentation', + label: 'Clarity', + description: 'Clear presentation', }, { key: 'soundness', - label: 'Soundness & Accuracy', - description: 'Consistent techniques, logical conclusions from analysis', + label: 'Soundness', + description: 'Logical conclusions', }, ] as const; @@ -47,10 +46,13 @@ type RubricScores = { soundness: number; }; +type JudgingStep = 'viewing' | 'judging'; + export default function JudgePage() { const { data: session, status } = useSession(); const router = useRouter(); const [mounted, setMounted] = useState(false); + const [step, setStep] = useState('viewing'); const [scores, setScores] = useState({ creativity: 5, impact: 5, @@ -59,7 +61,6 @@ export default function JudgePage() { soundness: 5, }); const [comment, setComment] = useState(''); - const [expandedCriteria, setExpandedCriteria] = useState(null); const { data: judgeStatus, isLoading: checkingJudge } = trpc.judge.isJudge.useQuery(undefined, { enabled: !!session, @@ -85,7 +86,7 @@ export default function JudgePage() { onSuccess: () => { setScores({ creativity: 5, impact: 5, scope: 5, clarity: 5, soundness: 5 }); setComment(''); - setExpandedCriteria(null); + setStep('viewing'); refetch(); refetchProgress(); }, @@ -118,7 +119,7 @@ export default function JudgePage() { }; if (!mounted || status === 'loading' || checkingJudge) { - return ; + return ; } if (!session) return null; @@ -127,10 +128,10 @@ export default function JudgePage() { return ( signOut({ callbackUrl: '/login' })} - actionLabel="Terminate Session" + actionLabel="Sign Out" actionVariant="danger" /> ); @@ -140,10 +141,10 @@ export default function JudgePage() { return ( signOut({ callbackUrl: '/login' })} - actionLabel="Terminate Session" + actionLabel="Sign Out" actionVariant="default" /> ); @@ -156,103 +157,156 @@ export default function JudgePage() { return ( signOut({ callbackUrl: '/login' })} - actionLabel="Exit Terminal" + actionLabel="Sign Out" actionVariant="primary" /> ); } if (loadingNext || !project) { - return ; + return ; } - return ( -
-
-
-
-
+ // Step 1: Viewing - Show table number + if (step === 'viewing') { + return ( +
+ {/* Progress bar */} +
+
+
- +
+ {/* Progress text */} +

+ {((progress?.completed || 0) + 1)} of {progress?.total} +

-
- {/* Table Number Header */} -
-

Table

-
-
-

+ {/* Large Table Number */} +

+

Go to Table

+

{project.tableNumber}

-

- {((progress?.completed || 0) + 1)}/{progress?.total} -

+ + {/* Project Name */} +
+

{project.name}

+ {project.teamMembers && ( +

{project.teamMembers}

+ )} +
+ + {/* Start Button - Big touch target */} + + + +
+
+ ); + } + + // Step 2: Judging - Scoring interface + return ( +
+ {/* Progress bar */} +
+
+
+ + {/* Header - Sticky */} +
+
+ + +
+
+

Table

+

{project.tableNumber}

+
+
+

Score

+

{totalScore}

+
+
+
+ {/* Scrollable Content */} +
{/* Project Info */} - -
-

Project

-

{project.name}

+
+

{project.name}

{project.teamMembers && ( -

{project.teamMembers}

+

{project.teamMembers}

)} - - - {/* Rubric Sliders */} - -
- Rubric Scoring - - {totalScore}/50 - -
+
-
- {RUBRIC_CRITERIA.map((criterion) => ( - updateScore(criterion.key, value)} - isExpanded={expandedCriteria === criterion.key} - onToggleExpand={() => setExpandedCriteria(expandedCriteria === criterion.key ? null : criterion.key)} - /> - ))} -
- + {/* Rubric Scoring */} +
+ {RUBRIC_CRITERIA.map((criterion) => ( + updateScore(criterion.key, value)} + /> + ))} +
{/* Comment */}