-
Notifications
You must be signed in to change notification settings - Fork 2
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 #26 from RoBorregos/upload/team_data
Upload/team data and stuff
- Loading branch information
Showing
18 changed files
with
269 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,24 @@ | ||
Nombre, R1_PistaA,R1_PistaB,R1_PistaC,R2_PistaA,R2_PistaB,R2_PistaC,R3_PistaA,R3_PistaB,R3_PistaC | ||
Circuitbreakers,10:45,11:40,12:35,2:36,3:31,4:26,5:03,5:58,6:53 | ||
Las chichas superponedoras,12:35,10:45,11:40,4:26,2:36,3:31,6:53,5:03,5:58 | ||
Equestria Kids,11:40,12:35,10:45,3:31,4:26,2:36,5:58,6:53,5:03 | ||
Robotertulia,10:51,11:46,12:41,2:42,3:37,4:32,5:09,6:04,6:59 | ||
S. E. E. S.,12:41,10:51,11:46,4:32,2:42,3:37,6:59,5:09,6:04 | ||
La Mera Trompa del Tren,11:46,12:41,10:51,3:37,4:32,2:42,6:04,6:59,5:09 | ||
Syntax Algodones,10:57,11:52,12:47,2:48,3:43,4:38,5:15,6:10,7:05 | ||
Equipo 3,12:47,10:57,11:52,4:38,2:48,3:43,7:05,5:15,6:10 | ||
REBE,11:58,12:53,11:03,2:55,3:50,2:00,6:16,7:11,5:21 | ||
Atomix,11:09,12:04,12:59,2:06,3:01,3:56,5:27,6:22,7:17 | ||
Pollos Locos,12:59,11:09,12:04,3:56,2:06,3:01,7:17,5:27,6:22 | ||
JED,12:10,13:05,11:09,3:07,4:02,2:12,6:28,7:23,5:33 | ||
Spacekats ,11:15,12:10,13:05,2:12,3:07,4:02,5:33,6:28,7:23 | ||
The Best Team !,13:05,11:15,12:10,4:02,2:12,3:07,7:23,5:33,6:28 | ||
Tunas Terrier ,12:16,13:11,11:15,3:13,4:08,2:18,5:40,6:35,4:45 | ||
Capibot,11:21,12:16,13:11,2:18,3:13,4:08,4:45,5:40,6:35 | ||
Los mecxnicos del norte,13:11,11:21,12:16,4:08,2:18,3:13,6:35,4:45,5:40 | ||
Robonautas,12:22,13:17,11:21,3:19,4:14,2:24,5:46,6:41,4:51 | ||
Forexos,11:27,12:22,13:17,2:24,3:19,4:14,4:51,5:46,6:41 | ||
Paftron 3,13:17,11:27,12:22,4:14,2:24,3:19,6:41,4:51,5:46 | ||
Borregos Tim,12:28,13:23,11:27,3:25,4:20,2:30,5:52,6:47,4:57 | ||
MAZE,11:33,12:28,13:23,2:30,3:25,4:20,4:57,5:52,6:47 | ||
ByteBites,13:23,11:33,12:28,4:20,2:30,3:25,6:47,4:57,5:52 |
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,2 @@ | ||
Nombre, R1_PistaA,R1_PistaB,R1_PistaC,R2_PistaA,R2_PistaB,R2_PistaC,R3_PistaA,R3_PistaB,R3_PistaC | ||
RoBorregos,10:45,11:40,12:35,2:36,3:31,4:26,5:03,5:58,6:53 |
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
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,14 @@ | ||
import { Role } from "@prisma/client"; | ||
import { redirect } from "next/navigation"; | ||
import { getServerAuthSession } from "rbrgs/server/auth"; | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: Readonly<{ children: React.ReactNode }>) { | ||
const session = await getServerAuthSession(); | ||
|
||
if (session?.user.role !== Role.ADMIN) { | ||
redirect("/"); | ||
} | ||
return children; | ||
} |
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 @@ | ||
"use client"; | ||
|
||
import Header from "rbrgs/app/_components/header"; | ||
|
||
import { api } from "~/trpc/react"; | ||
import { toast } from "sonner"; | ||
|
||
export default function AdminPage() { | ||
const createEvaluation = api.admin.uploadTeamData.useMutation({ | ||
onSuccess() { | ||
toast("Data uploaded."); | ||
}, | ||
onError(error) { | ||
toast("Error. Check console"); | ||
console.error(error); | ||
}, | ||
}); | ||
return ( | ||
<main className="mt-[4rem] h-96 bg-black text-sm text-white md:text-base"> | ||
<div className="md:pb-20"> | ||
<Header title="Admin" subtitle="" /> | ||
</div> | ||
<div className="p-2"> | ||
<button | ||
onClick={() => { | ||
createEvaluation.mutate(); | ||
}} | ||
className="mt-9 rounded-lg bg-roboblue p-2" | ||
> | ||
Upload team data | ||
</button> | ||
</div> | ||
</main> | ||
); | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"use client"; | ||
|
||
import { SessionProvider } from "next-auth/react"; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ children: React.ReactNode }>) { | ||
return <SessionProvider>{children}</SessionProvider>; | ||
} |
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
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.