From 398e32cfb4ace1ec1f5c09e1bc1bd9681dbc7589 Mon Sep 17 00:00:00 2001 From: Haylie Tan Date: Thu, 12 Mar 2026 10:19:22 -0700 Subject: [PATCH 1/2] Updated UI --- .../ScoringForm/ScoringForm.module.scss | 10 +- .../_components/ScoringForm/ScoringForm.tsx | 2 +- .../projects/_components/UnjudgedPage.tsx | 201 +++++++++--------- .../(app)/score/[team-id]/page.module.scss | 32 ++- 4 files changed, 137 insertions(+), 108 deletions(-) diff --git a/app/(pages)/_components/ScoringForm/ScoringForm.module.scss b/app/(pages)/_components/ScoringForm/ScoringForm.module.scss index 79d97ba5..0d7aab52 100644 --- a/app/(pages)/_components/ScoringForm/ScoringForm.module.scss +++ b/app/(pages)/_components/ScoringForm/ScoringForm.module.scss @@ -13,6 +13,11 @@ display: flex; flex-direction: column; gap: 24px; + color: #000; + font-family: "Plus Jakarta Sans"; + font-style: normal; + font-weight: 400; + line-height: normal; } .comment_box { @@ -21,11 +26,12 @@ padding: 1rem; min-height: 170px; margin-top: 16px; + border-radius: 20px; } .submit_button { - background-color: #005271; - border-radius: 8px; + background-color: #121212; + border-radius: 30px; color: white; padding: 15px; font-weight: 600; diff --git a/app/(pages)/_components/ScoringForm/ScoringForm.tsx b/app/(pages)/_components/ScoringForm/ScoringForm.tsx index 1a265cee..808983bb 100644 --- a/app/(pages)/_components/ScoringForm/ScoringForm.tsx +++ b/app/(pages)/_components/ScoringForm/ScoringForm.tsx @@ -177,7 +177,7 @@ export default function ScoringForm({ team, submission }: ScoringFormProps) { ))} ); diff --git a/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx b/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx index 004979a9..7e3d324e 100644 --- a/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx +++ b/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx @@ -1,117 +1,128 @@ +'use client'; + import { useState } from 'react'; -import ProjectTab from './ProjectTab'; +import styles from './page.module.scss'; +import ScoringForm from '@components/ScoringForm/ScoringForm'; +import Loader from '@components/Loader/Loader'; import Image from 'next/image'; -import projectCow from '/public/judges/projects/project-cow.svg'; -import Team from '@typeDefs/team'; import Link from 'next/link'; -interface UnjudgedPageProps { - projects: Team[]; +import { useSubmission } from '@hooks/useSubmission'; +import { useTeam } from '@hooks/useTeam'; + +import leftArrow from '@public/judges/scoring/left-arrow.svg'; + +interface ScoringFormProps { + params: { + 'team-id': string; + }; } -const UnjudgedPage = ({ projects }: UnjudgedPageProps) => { - const [showConfirmation, setShowConfirmation] = useState(false); +export default function ScoreTeam({ params }: ScoringFormProps) { + const [showInfo, setShowInfo] = useState(false); + + const teamId = params['team-id']; + const isMock = teamId.startsWith('mock'); - const handleReportTeam = () => { - setShowConfirmation(false); - // TODO: call report missing team server action here + const tableNumber = Number(teamId.replace('mock-', '')) || 1; + + /* ---------------- MOCK DATA ---------------- */ + + const mockSubmission = { + ok: true, + body: { + categories: [ + { name: 'Technical Difficulty', maxScore: 10 }, + { name: 'Innovation', maxScore: 10 }, + { name: 'Design', maxScore: 10 }, + { name: 'Impact', maxScore: 10 }, + ], + }, }; - if (projects.length === 0) { - return ( -
- - You're Done! - - - You've judged all your projects. - - - Thank you so much! - - Project Cow -
- ); + const mockTeam = { + ok: true, + body: { + name: `Mock Project ${tableNumber}`, + tableNumber: tableNumber, + tracks: ['AI', 'Healthcare', 'Sustainability'], + }, + }; + + /* ---------------- REAL DATA ---------------- */ + + const { submission, loading: subLoading } = isMock + ? { submission: mockSubmission, loading: false } + : useSubmission(teamId); + + const { team, loading: teamLoading } = isMock + ? { team: mockTeam, loading: false } + : useTeam(teamId); + + const loading = subLoading || teamLoading; + + if (loading) { + return ; + } + + if (!submission.ok) { + return submission.error; + } + + if (!team.ok) { + return team.error; } + return ( -
-

- Current project: -

-

- Projects must be judged one by one in order.{'\n'} - - If the team is not at their table when you arrive, tab the{' '} - red button below. - -

- - - {projects[0].tableNumber} - - - {projects[0].name} - - - - +
+ + left arrow + Back to projects -
-
- + +

+ Table {team.body.tableNumber} +

+ +
+
- - Next up: - -
- {projects.map( - (project, idx) => - idx !== 0 && ( - - ) - )} + + {/* SCORING TAB */} + +
+ +
+ + {/* INFO TAB */} + +
+

+ Judging categories Table {team.body.tableNumber} signed up for: +

+ + {team.body.tracks.map((category: string) => ( +

+ {category} +

+ ))}
); -}; - -export default UnjudgedPage; +} \ No newline at end of file diff --git a/app/(pages)/judges/(app)/score/[team-id]/page.module.scss b/app/(pages)/judges/(app)/score/[team-id]/page.module.scss index 95b3258e..6edcb46a 100644 --- a/app/(pages)/judges/(app)/score/[team-id]/page.module.scss +++ b/app/(pages)/judges/(app)/score/[team-id]/page.module.scss @@ -5,7 +5,7 @@ padding: 40px 24px; display: flex; flex-direction: column; - background-color: #F2F2F7; + background-color: #FAFAFF; // changed min-height: 100vh; } @@ -16,17 +16,23 @@ } .tab { - padding: 4px 24px; + padding: 6px 24px; display: flex; justify-content: center; align-items: center; - border-radius: 20px; - border: 1.5px solid var(--teal-1, #005271); + + border-radius: 20px; + border: 1px dashed #3F3F3F; + background-color: transparent; + color: #3F3F3F; + height: auto; - background-color: white; + cursor: pointer; &.active { - background: var(--cow, linear-gradient(180deg, #9EE7E5 0%, #9EE7E5 100%)); + background: #3F3F3F; // changed + color: white; + border: none; } } @@ -35,23 +41,30 @@ font-size: 3rem; font-weight: 700; margin: 12px 0; + border-radius: 20px; // added } .back_button { display: flex; align-items: center; gap: 12px; - color: #005271; font-size: 1.125rem; + color: #121212; + font-style: normal; + font-weight: 600; + line-height: 100%; /* 18px */ + letter-spacing: 0.36px; padding: 12px 0; background: transparent; box-shadow: none; + border-radius: 20px; // added } .info_container { display: none; flex-direction: column; gap: 16px; + border-radius: 20px; &.show { display: flex; @@ -60,8 +73,7 @@ .category_card { padding: 16px 20px; - border-radius: 8px; - background: linear-gradient(180deg, #9EE7E5 0%, #9EE7E5 100%); - box-shadow: 0px 4px 8px 4px rgba(195, 194, 194, 0.08); + border-radius: 50px; + background: #9EE7E5; width: fit-content; } \ No newline at end of file From 5fb55a0dcae5d92119754517b3329f793fc1e4df Mon Sep 17 00:00:00 2001 From: Haylie Tan Date: Thu, 12 Mar 2026 10:20:57 -0700 Subject: [PATCH 2/2] og unjudgedpanel.tsx --- .../projects/_components/UnjudgedPage.tsx | 201 +++++++++--------- 1 file changed, 95 insertions(+), 106 deletions(-) diff --git a/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx b/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx index 7e3d324e..004979a9 100644 --- a/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx +++ b/app/(pages)/judges/(app)/projects/_components/UnjudgedPage.tsx @@ -1,128 +1,117 @@ -'use client'; - import { useState } from 'react'; -import styles from './page.module.scss'; -import ScoringForm from '@components/ScoringForm/ScoringForm'; -import Loader from '@components/Loader/Loader'; +import ProjectTab from './ProjectTab'; import Image from 'next/image'; +import projectCow from '/public/judges/projects/project-cow.svg'; +import Team from '@typeDefs/team'; import Link from 'next/link'; -import { useSubmission } from '@hooks/useSubmission'; -import { useTeam } from '@hooks/useTeam'; - -import leftArrow from '@public/judges/scoring/left-arrow.svg'; - -interface ScoringFormProps { - params: { - 'team-id': string; - }; +interface UnjudgedPageProps { + projects: Team[]; } -export default function ScoreTeam({ params }: ScoringFormProps) { - const [showInfo, setShowInfo] = useState(false); - - const teamId = params['team-id']; - const isMock = teamId.startsWith('mock'); - - const tableNumber = Number(teamId.replace('mock-', '')) || 1; - - /* ---------------- MOCK DATA ---------------- */ - - const mockSubmission = { - ok: true, - body: { - categories: [ - { name: 'Technical Difficulty', maxScore: 10 }, - { name: 'Innovation', maxScore: 10 }, - { name: 'Design', maxScore: 10 }, - { name: 'Impact', maxScore: 10 }, - ], - }, - }; +const UnjudgedPage = ({ projects }: UnjudgedPageProps) => { + const [showConfirmation, setShowConfirmation] = useState(false); - const mockTeam = { - ok: true, - body: { - name: `Mock Project ${tableNumber}`, - tableNumber: tableNumber, - tracks: ['AI', 'Healthcare', 'Sustainability'], - }, + const handleReportTeam = () => { + setShowConfirmation(false); + // TODO: call report missing team server action here }; - /* ---------------- REAL DATA ---------------- */ - - const { submission, loading: subLoading } = isMock - ? { submission: mockSubmission, loading: false } - : useSubmission(teamId); - - const { team, loading: teamLoading } = isMock - ? { team: mockTeam, loading: false } - : useTeam(teamId); - - const loading = subLoading || teamLoading; - - if (loading) { - return ; - } - - if (!submission.ok) { - return submission.error; - } - - if (!team.ok) { - return team.error; + if (projects.length === 0) { + return ( +
+ + You're Done! + + + You've judged all your projects. + + + Thank you so much! + + Project Cow +
+ ); } - return ( -
- - left arrow - Back to projects +
+

+ Current project: +

+

+ Projects must be judged one by one in order.{'\n'} + + If the team is not at their table when you arrive, tab the{' '} + red button below. + +

+ + + {projects[0].tableNumber} + + + {projects[0].name} + + + + - -

- Table {team.body.tableNumber} -

- -
+
+
- +
- - {/* SCORING TAB */} - -
- -
- - {/* INFO TAB */} - -
-

- Judging categories Table {team.body.tableNumber} signed up for: -

- - {team.body.tracks.map((category: string) => ( -

- {category} -

- ))} + + Next up: + +
+ {projects.map( + (project, idx) => + idx !== 0 && ( + + ) + )}
); -} \ No newline at end of file +}; + +export default UnjudgedPage;