From b7efcd51f30cf48aaa7d51c654a229cc826be996 Mon Sep 17 00:00:00 2001 From: annabay04 <67490943+annabay04@users.noreply.github.com> Date: Sun, 10 Nov 2024 15:12:22 -0500 Subject: [PATCH] frontend admin dashboard (#7) * frontend admin dashboard * prettier --------- Co-authored-by: kygchng --- .../AdminDashboard/TempAdminDashboardPage.tsx | 246 ++++++++++++++++++ client/src/App.tsx | 2 + 2 files changed, 248 insertions(+) create mode 100644 client/src/AdminDashboard/TempAdminDashboardPage.tsx diff --git a/client/src/AdminDashboard/TempAdminDashboardPage.tsx b/client/src/AdminDashboard/TempAdminDashboardPage.tsx new file mode 100644 index 00000000..8e542336 --- /dev/null +++ b/client/src/AdminDashboard/TempAdminDashboardPage.tsx @@ -0,0 +1,246 @@ +import React from 'react'; +import { + Typography, + Grid, + Paper, + Box, + Table, + TableBody, + TableCell, + TableHead, + TableRow, +} from '@mui/material'; + +function DashboardHeader() { + return ( + + Admin Dashboard + + + Active Chapters + 50 + + + + Chapters Accepting Requests + + 35 + + + + ); +} + +function OverviewTable({ color }: { color: string }) { + return ( + + + + + Age + + + Race/ethnicity + + + + Sexual Identity + + + + Situation Being Faced + + + + + + {[ + { + age: '1-5', + ageCount: 55, + race: 'American Indian or Alaska Native', + raceCount: 55, + identity: 'Girl', + identityCount: 55, + situation: 'Foster care', + situationCount: 55, + }, + { + age: '6-9', + ageCount: 20, + race: 'Asian', + raceCount: 20, + identity: 'Boy', + identityCount: 20, + situation: 'Homelessness', + situationCount: 20, + }, + { + age: '9-12', + ageCount: 31, + race: 'Black or African American', + raceCount: 31, + identity: 'Transgender', + identityCount: 31, + situation: 'Domestic Violence', + situationCount: 31, + }, + { + age: '', + ageCount: '', + race: 'Hispanic or Latino', + raceCount: 55, + identity: 'Non-binary/non-conforming', + identityCount: 55, + situation: 'Medical Treatment', + situationCount: 55, + }, + { + age: '', + ageCount: '', + race: 'Middle Eastern or North African', + raceCount: 20, + identity: 'Prefer not to say', + identityCount: 20, + situation: 'Financial insecurity', + situationCount: 20, + }, + { + age: '', + ageCount: '', + race: 'Native Hawaiian or Pacific Islander', + raceCount: 31, + identity: 'Other', + identityCount: 31, + situation: '', + situationCount: '', + }, + { + age: '', + ageCount: '', + race: 'White', + raceCount: 55, + identity: '', + identityCount: '', + situation: '', + situationCount: '', + }, + { + age: '', + ageCount: '', + race: 'Other', + raceCount: 20, + identity: '', + identityCount: '', + situation: '', + situationCount: '', + }, + ].map((row, index) => ( + + {row.age} + {row.ageCount} + {row.race} + {row.raceCount} + {row.identity} + {row.identityCount} + {row.situation} + {row.situationCount} + + ))} + + Total + 55 + + 55 + + 55 + + 55 + + +
+
+ ); +} + +function TempAdminDashboardPage() { + return ( + + + + + Monthly Overview of Children Served + + + Jan 1 - Jan 31, 2024 + + + + + + Yearly Overview of Children Served + + + 2024 + + + + + + To Date Overview of Children Served + + + Since 2005 + + + + + ); +} + +export default TempAdminDashboardPage; \ No newline at end of file diff --git a/client/src/App.tsx b/client/src/App.tsx index a89b7802..0e9668b5 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -22,6 +22,7 @@ import EmailResetPasswordPage from './Authentication/EmailResetPasswordPage.tsx' import ResetPasswordPage from './Authentication/ResetPasswordPage.tsx'; import AlertPopup from './components/AlertPopup.tsx'; import InviteRegisterPage from './Authentication/InviteRegisterPage.tsx'; +import TempAdminDashboardPage from './AdminDashboard/TempAdminDashboardPage.tsx'; function App() { return ( @@ -36,6 +37,7 @@ function App() { {/* Routes accessed only if user is not authenticated */} }> } /> + } /> } />