From 0e81608c2b44578461adc876af54fc5b2d633982 Mon Sep 17 00:00:00 2001 From: Geeth Gunnampalli Date: Mon, 17 Apr 2023 22:11:48 -0500 Subject: [PATCH 01/13] feat(addJudgePage) create front end --- client/src/admin/add-judges.tsx | 10 +++-- .../admin/addJudge/AddJudgeStat.tsx | 12 ++++++ .../admin/addJudge/AddJudgeStatsPanel.tsx | 15 +++++++ .../admin/addJudge/AddJudgesPanel.tsx | 18 ++++++++ .../admin/addJudge/NewJudgeForm.tsx | 32 +++++++++++++++ .../admin/addJudge/UploadCSVForm.tsx | 41 +++++++++++++++++++ 6 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 client/src/components/admin/addJudge/AddJudgeStat.tsx create mode 100644 client/src/components/admin/addJudge/AddJudgeStatsPanel.tsx create mode 100644 client/src/components/admin/addJudge/AddJudgesPanel.tsx create mode 100644 client/src/components/admin/addJudge/NewJudgeForm.tsx create mode 100644 client/src/components/admin/addJudge/UploadCSVForm.tsx diff --git a/client/src/admin/add-judges.tsx b/client/src/admin/add-judges.tsx index 51d1a36..08bc567 100644 --- a/client/src/admin/add-judges.tsx +++ b/client/src/admin/add-judges.tsx @@ -1,8 +1,12 @@ +import JuryHeader from '../components/JuryHeader'; +import AddJudgesPanel from '../components/admin/addJudge/AddJudgesPanel'; + const AddJudges = () => { return ( -
-

Add Judges

-
+ <> + + + ); }; diff --git a/client/src/components/admin/addJudge/AddJudgeStat.tsx b/client/src/components/admin/addJudge/AddJudgeStat.tsx new file mode 100644 index 0000000..b68136e --- /dev/null +++ b/client/src/components/admin/addJudge/AddJudgeStat.tsx @@ -0,0 +1,12 @@ +import { twMerge } from 'tailwind-merge'; + +const AddJudgeStat = (props: { name: string; value: string | number; className?: string }) => { + return ( +
+
{props.value}
+
{props.name}
+
+ ); +}; + +export default AddJudgeStat; diff --git a/client/src/components/admin/addJudge/AddJudgeStatsPanel.tsx b/client/src/components/admin/addJudge/AddJudgeStatsPanel.tsx new file mode 100644 index 0000000..613847c --- /dev/null +++ b/client/src/components/admin/addJudge/AddJudgeStatsPanel.tsx @@ -0,0 +1,15 @@ +import AddJudgeStat from './AddJudgeStat'; + +const AddJudgeStatsPanel = () => { + return ( +
+
+ + + +
+
+ ); +}; + +export default AddJudgeStatsPanel; diff --git a/client/src/components/admin/addJudge/AddJudgesPanel.tsx b/client/src/components/admin/addJudge/AddJudgesPanel.tsx new file mode 100644 index 0000000..a46b0d1 --- /dev/null +++ b/client/src/components/admin/addJudge/AddJudgesPanel.tsx @@ -0,0 +1,18 @@ +import AddJudgeStatsPanel from './AddJudgeStatsPanel'; +import UploadCSVForm from './UploadCSVForm'; +import NewJudgeForm from './NewJudgeForm'; + +const AddJudgesPanel = () => { + return ( +
+

Add Judges

+ +
+ + +
+
+ ); +}; + +export default AddJudgesPanel; diff --git a/client/src/components/admin/addJudge/NewJudgeForm.tsx b/client/src/components/admin/addJudge/NewJudgeForm.tsx new file mode 100644 index 0000000..806210e --- /dev/null +++ b/client/src/components/admin/addJudge/NewJudgeForm.tsx @@ -0,0 +1,32 @@ +const NewJudgeForm = () => { + return ( + <> +
+
+

Add New Judges

+
+
+ + +
+