Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/images/robochamp/robochamp-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/robochamp/robochamp-8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions src/app/_components/admin/InterviewManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,8 @@ export default function InterviewManagement({
)}

{conflicts.length === 0 &&
interviewSchedule &&
interviewSchedule.filter((u) => u.interviewTime).length > 0 && (
(interviewSchedule?.filter((u) => u.interviewTime) ?? []).length >
0 && (
<div className="rounded border border-green-500/30 bg-green-900/20 p-4 text-center">
<div className="text-green-400">
<h4 className="mt-2 font-semibold">
Expand All @@ -664,15 +664,15 @@ export default function InterviewManagement({
</div>
)}

{interviewSchedule &&
interviewSchedule.filter((u) => u.interviewTime).length === 0 && (
<div className="rounded bg-gray-700 p-4 text-center">
<span className="text-gray-400">
No interviews scheduled yet. Use &quot;Auto Schedule All&quot;
to begin.
</span>
</div>
)}
{(interviewSchedule?.filter((u) => u.interviewTime) ?? []).length ===
0 && (
<div className="rounded bg-gray-700 p-4 text-center">
<span className="text-gray-400">
No interviews scheduled yet. Use &quot;Auto Schedule All&quot; to
begin.
</span>
</div>
)}
</div>

<div className="rounded-lg bg-gray-800 p-6">
Expand Down
11 changes: 3 additions & 8 deletions src/app/_components/imageFade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ import { motion, AnimatePresence } from "framer-motion";
import Image from "next/image";

export default function ImageFade({ className = "" }) {
const slides = [
"/images/teamPhotos/cand25.JPG",
"/images/teamPhotos/cand25-3rd.JPG",
"/images/teamPhotos/cand25-2nd.JPG",
"/images/teamPhotos/cand25-1st.JPG",
];
for (let i = 1; i <= 18; i++) {
slides.push(`/images/teamPhotos/cand25-${i}.JPG`);
const slides = [];
for (let i = 1; i <= 8; i++) {
slides.push(`/images/robochamp/robochamp-${i}.jpg`);
}

const [currentSlide, setCurrentSlide] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default async function Navbar() {
<Link href="team">Team</Link>
{canJudge && <Link href="judge">Judge</Link>}
{session?.user.role === Role.ADMIN && <Link href="admin">Admin</Link>}
<Link href="editions">Past Editions</Link>
{/* <Link href="editions">Past Editions</Link> */}
<Link href="https://www.roborregos.com">About us</Link>
</div>
<div className="hidden lg:block">
Expand Down
48 changes: 6 additions & 42 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import kube from "../../public/images/sponsors/kube.jpg";
import digikey from "../../public/images/sponsors/DigiKey.png";
import kiko from "../../public/images/sponsors/kiko.jpg";
import heppy from "../../public/images/sponsors/heppy.png";
import ball from "../../public/images/ball.jpg";
import maze from "../../public/images/maze.jpg";
import line from "../../public/images/line.jpg";
import Footer from "./_components/footer";
import EventTimeline from "./_components/timeline";
Expand All @@ -38,7 +36,7 @@ export default async function Home() {
<section className="relative flex min-h-[150vw] flex-col items-center justify-start overflow-hidden lg:min-h-screen lg:justify-center">
<div className="z-10 mt-[30vw] text-center lg:mt-0">
<h1 className="font-jersey_25 text-[17vw] leading-none text-roboblue lg:text-[12vw]">
CANDIDATES
ROBOCHAMP
</h1>
<p className="mt-[-2vw] font-anton text-[6vw] text-white lg:text-[3vw]">
By RoBorregos
Expand Down Expand Up @@ -68,24 +66,7 @@ export default async function Home() {
</div>

<section className="mx-[5vw] mt-[5rem] grid gap-[5rem] text-[1.25rem] lg:mx-[5rem] lg:mt-[10rem] lg:grid-cols-3">
<div className="relative rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
src={maze}
alt=""
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
MAZE
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
Navigate a grid of tiles, detect ground colors, and score as you
explore the maze. Find the exit to complete the route and win
bonus points you must return from where you came from.
</p>
</div>

<div></div>
<div className="rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
Expand All @@ -94,30 +75,13 @@ export default async function Home() {
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
LINE
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
The classic line follower returns with a twist. Teams pick their
difficulty by choosing track modules and taking the riskier path
to the end if they&apos; re looking to win!
</p>
</div>
<div className="rounded-xl bg-gradient-to-tr from-neutral-950 to-neutral-800">
<div className="group relative">
<Image
src={ball}
alt=""
className={`h-[15rem] w-full rounded-xl object-cover blur-[0.1rem] transition duration-300 ease-in-out group-hover:blur-none lg:ml-5 lg:mt-5`}
/>
<div className="absolute top-0 h-[15rem] w-full content-center bg-gradient-to-t from-black to-roboblue bg-clip-text text-center font-anton text-[5rem] text-transparent transition duration-300 group-hover:opacity-0 lg:left-5">
BALL
DEACTIVATE THE BOMB
</div>
</div>
<p className="m-[1rem] text-justify font-archivo text-white">
Detect flags on the field and follow their instructions to locate
and interact with the ball. Precision, timing, and control are key
to maximize your score.
In this challenge, teams will have to demonstrate their precision
and control as they navigate a complex maze to reach and
successfully deactivate a simulated bomb within a set time limit.
</p>
</div>
</section>
Expand Down
54 changes: 24 additions & 30 deletions src/server/api/routers/admin/round-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ export const roundControlRouter = createTRPCRouter({
try {
let config = await ctx.db.config.findFirst();

if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

return config;
} catch {
Expand Down Expand Up @@ -67,16 +65,14 @@ export const roundControlRouter = createTRPCRouter({
let config;
try {
config = await ctx.db.config.findFirst();
if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

const visibleRoundsCount = await ctx.db.round
.findMany({
Expand Down Expand Up @@ -180,16 +176,14 @@ export const roundControlRouter = createTRPCRouter({

// Update config
let config = await ctx.db.config.findFirst();
if (!config) {
config = await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});
}
config ??= await ctx.db.config.create({
data: {
freeze: true,
competitionStarted: false,
currentRound: 1,
roundsRevealed: 0,
},
});

const totalVisible = revealedNumbers.length + 1;
await ctx.db.config.update({
Expand Down
32 changes: 14 additions & 18 deletions src/server/api/routers/admin/schedule-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,13 @@ export const scheduleManagementRouter = createTRPCRouter({
where: { teamId: team.id, number: round },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false, // Will be revealed manually
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false, // Will be revealed manually
},
});

// Create the challenge entry
await ctx.db.challenge.create({
Expand Down Expand Up @@ -326,15 +324,13 @@ export const scheduleManagementRouter = createTRPCRouter({
where: { teamId: team.id, number: roundNumber },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: roundNumber,
isVisible: false,
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: roundNumber,
isVisible: false,
},
});

await ctx.db.challenge.create({
data: {
Expand Down
16 changes: 7 additions & 9 deletions src/server/api/routers/admin/testing-utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@ export const testingUtilitiesRouter = createTRPCRouter({
where: { teamId: team.id, number: round },
});

if (!roundRecord) {
roundRecord = await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false,
},
});
}
roundRecord ??= await ctx.db.round.create({
data: {
teamId: team.id,
number: round,
isVisible: false,
},
});

await ctx.db.challenge.create({
data: {
Expand Down
Loading