From 1f874e0b3dcf1933c25f88fd741f3715dd3d90a8 Mon Sep 17 00:00:00 2001 From: Rose Wang <51464298+rosewang01@users.noreply.github.com> Date: Tue, 21 May 2024 22:11:47 -0400 Subject: [PATCH] main functionalities with imported data --- .../src/AdminDashboard/AdminDashboardPage.tsx | 2 +- client/src/App.tsx | 8 +- client/src/Authentication/LoginPage.tsx | 6 +- client/src/Home/AboutThisProjectPage.tsx | 14 +- client/src/Question/QuestionPage.tsx | 32 ++- client/src/Question/ResourceComponent.tsx | 2 + client/src/Question/ResourcePage.tsx | 21 -- client/src/components/Footer.tsx | 7 +- client/src/components/ResourceDropdown.tsx | 35 ++- .../src/components/sidebar/SidebarContent.tsx | 3 + client/src/util/types/answer.ts | 5 +- server/src/controllers/admin.controller.ts | 7 +- server/src/controllers/question.controller.ts | 9 +- server/src/controllers/resource.controller.ts | 24 -- server/src/models/answer.model.ts | 19 +- server/src/models/definition.model.ts | 4 +- server/src/models/question.model.ts | 28 ++- server/src/models/resource.model.ts | 27 --- server/src/models/temp-question.model.ts | 35 --- server/src/routes/resource.route.ts | 9 - server/src/routes/routers.ts | 5 - server/src/services/definition.service.ts | 6 +- server/src/services/question.service.ts | 208 ++++-------------- server/src/services/resource.service.ts | 26 --- 24 files changed, 173 insertions(+), 369 deletions(-) delete mode 100644 client/src/Question/ResourcePage.tsx delete mode 100644 server/src/controllers/resource.controller.ts delete mode 100644 server/src/models/resource.model.ts delete mode 100644 server/src/models/temp-question.model.ts delete mode 100644 server/src/routes/resource.route.ts delete mode 100644 server/src/services/resource.service.ts diff --git a/client/src/AdminDashboard/AdminDashboardPage.tsx b/client/src/AdminDashboard/AdminDashboardPage.tsx index 5e1b7984..3e93eb53 100644 --- a/client/src/AdminDashboard/AdminDashboardPage.tsx +++ b/client/src/AdminDashboard/AdminDashboardPage.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Typography, Grid } from '@mui/material'; +import { Typography, Grid, AppBar } from '@mui/material'; import ScreenGrid from '../components/ScreenGrid'; // import UserTable from './QuestionTable'; import QuestionTable from './QuestionTable'; diff --git a/client/src/App.tsx b/client/src/App.tsx index 9c3ee70c..95c7f28d 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -58,12 +58,10 @@ function App() { path="/reset-password/:token" element={} /> - {/* }> */} - {/* } /> */} - {/* */} + } /> + } /> {/* Routes accessed only if user is authenticated */} - {/* }> */} }> } /> - } /> } /> - } /> {/* Route which is accessed if no other route is matched */} } /> diff --git a/client/src/Authentication/LoginPage.tsx b/client/src/Authentication/LoginPage.tsx index c930499b..9ac7af28 100644 --- a/client/src/Authentication/LoginPage.tsx +++ b/client/src/Authentication/LoginPage.tsx @@ -134,7 +134,7 @@ function LoginPage() { - Log In + Administrator Log In @@ -177,11 +177,11 @@ function LoginPage() { Forgot password? - + {/* Sign up - + */} diff --git a/client/src/Home/AboutThisProjectPage.tsx b/client/src/Home/AboutThisProjectPage.tsx index 5ecca407..7632c7b5 100644 --- a/client/src/Home/AboutThisProjectPage.tsx +++ b/client/src/Home/AboutThisProjectPage.tsx @@ -21,14 +21,14 @@ function AboutThisProjectPage() { direction="row" justifyContent="space-between" alignItems="flex-start" - height="100%" + height="100vh" fit-content="100%" > - + Guide to Interpersonal Resources at Penn @@ -130,7 +130,15 @@ function AboutThisProjectPage() { - +