From 875792681e9256214acada8e0e6fe51ea191b50e Mon Sep 17 00:00:00 2001
From: taiphlosion
Date: Wed, 1 Nov 2023 14:32:20 -0400
Subject: [PATCH 01/13] Initial setup
---
client/package.json | 2 +-
client/yarn.lock | 2 +-
.../documentation/documentation/1.0.0/full_documentation.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/package.json b/client/package.json
index 5a7735fa2..c3c012061 100644
--- a/client/package.json
+++ b/client/package.json
@@ -42,7 +42,7 @@
},
"devDependencies": {
"@types/w3c-web-serial": "^1.0.3",
- "@vitejs/plugin-react-swc": "^3.2.0",
+ "@vitejs/plugin-react-swc": "^3.4.0",
"parse-full-name": "^1.2.6"
}
}
diff --git a/client/yarn.lock b/client/yarn.lock
index a18b81215..bc0ade870 100644
--- a/client/yarn.lock
+++ b/client/yarn.lock
@@ -331,7 +331,7 @@
resolved "https://registry.yarnpkg.com/@types/w3c-web-serial/-/w3c-web-serial-1.0.5.tgz#09ed1265b642703c7f5556f36717bf4b1eddb10c"
integrity sha512-gpWNghA1RjPc92puT2HRRRFjv0MDVcpS9yTjJPLwCRU+w1YQTmJommTEL1w7l6Llq5/2cbzH1B4jHx/EP0PcjQ==
-"@vitejs/plugin-react-swc@^3.2.0":
+"@vitejs/plugin-react-swc@^3.4.0":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react-swc/-/plugin-react-swc-3.4.0.tgz#53ca6a07423abadec92f967e188d5ba49b350830"
integrity sha512-m7UaA4Uvz82N/0EOVpZL4XsFIakRqrFKeSNxa1FBLSXGvWrWRBwmZb4qxk+ZIVAZcW3c3dn5YosomDgx62XWcQ==
diff --git a/server/extensions/documentation/documentation/1.0.0/full_documentation.json b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
index 49963424f..9755b1675 100755
--- a/server/extensions/documentation/documentation/1.0.0/full_documentation.json
+++ b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
@@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
- "x-generation-date": "10/12/2023 1:28:43 PM"
+ "x-generation-date": "10/29/2023 10:26:22 PM"
},
"x-strapi-config": {
"path": "/documentation",
From 2258659aa16f077f339f6ac6e87138d9d434620f Mon Sep 17 00:00:00 2001
From: taiphlosion
Date: Mon, 6 Nov 2023 22:46:35 -0500
Subject: [PATCH 02/13] Initial setup
---
client/src/App.jsx | 9 ++
client/src/views/MissedClass/MissedClass.jsx | 93 +++++++++++++++++++
client/src/views/MissedClass/MissedClass.less | 43 +++++++++
client/src/views/Student/Student.jsx | 28 ++++++
4 files changed, 173 insertions(+)
create mode 100644 client/src/views/MissedClass/MissedClass.jsx
create mode 100644 client/src/views/MissedClass/MissedClass.less
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 3efe80918..f8ae95685 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -19,6 +19,7 @@ import StudentLogin from './views/StudentLogin/StudentLogin';
import ForgetPassword from './views/TeacherLogin/ForgetPassword';
import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
+import MissedClass from './views/MissedClass/MissedClass';
const App = () => {
return (
@@ -80,6 +81,14 @@ const App = () => {
}
/>
+
+
+
+ }
+ />
{
+ return (
+
+
Lecture Materials
+ {resources.map((resource, index) => (
+
+ ))}
+
+ );
+ };
+
+
+ const Announcements = ({ announcements }) => {
+ if (!Array.isArray(announcements)) {
+ // Handle the case where announcements is not an array
+ return No announcements available.
;
+ }
+
+ return (
+
+
Announcements
+ {announcements.map((announcement, index) => (
+
+
{announcement.content}
+
Last updated: {announcement.lastUpdated}
+
+ ))}
+
+ );
+ };
+
+
+const MissedClassDetails = () => {
+ const missedDetails = {
+ date: 'YYYY-MM-DD',
+ topic: 'The topic covered in the missed',
+ resources: [
+ {
+ title: 'Lecture Video',
+ url: 'http://example.com/lecture',
+ lastUpdated: '2023-08-21',
+ },
+ {
+ title: 'Reading Material',
+ url: 'http://example.com/reading',
+ lastUpdated: '2023-04-21',
+ },
+ {
+ title: 'Homework Assignment',
+ url: 'http://example.com/homework',
+ lastUpdated: '2023-12-21',
+ }
+ ],
+ announcements: [
+ {
+ content: 'Midterm grades have been posted.',
+ lastUpdated: '2023-08-09',
+ },
+ {
+ content: `Next week's class will be held in a different room.`,
+ lastUpdated: '2023-05-01',
+ }
+ ]
+ };
+
+ return(
+
+ );
+};
+
+export default MissedClassDetails;
\ No newline at end of file
diff --git a/client/src/views/MissedClass/MissedClass.less b/client/src/views/MissedClass/MissedClass.less
new file mode 100644
index 000000000..a72722fc1
--- /dev/null
+++ b/client/src/views/MissedClass/MissedClass.less
@@ -0,0 +1,43 @@
+@import "../../assets/style";
+
+#missed-class-container {
+ position: absolute;
+ top: 53vh;
+ left: 10vw;
+ margin: -40vh auto 0 auto;
+ height: 85vh;
+ width: 80vw;
+ background-color: #colors[tertiary];
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+}
+
+.column {
+ flex: 1;
+ margin: 10px;
+ padding: 20px;
+ border: 1px solid #ccc;
+ min-height: 300px;
+}
+
+#divider{
+ width: 50px;
+ background-color: #000;
+ margin: 0 20px;
+}
+
+#header {
+ width: 50%;
+ min-height: 4vh;
+ font-size: 2.25vh;
+ font-weight: none;
+ position: relative;
+ top: -20px;
+ left: -30px;
+ line-height: 45px;
+ text-align: left;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
\ No newline at end of file
diff --git a/client/src/views/Student/Student.jsx b/client/src/views/Student/Student.jsx
index 1a03837e7..baa6448dd 100644
--- a/client/src/views/Student/Student.jsx
+++ b/client/src/views/Student/Student.jsx
@@ -3,11 +3,15 @@ import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import NavBar from '../../components/NavBar/NavBar';
import { getStudentClassroom } from '../../Utils/requests';
+import { Modal } from 'antd';
import './Student.less';
function Student() {
const [learningStandard, setLessonModule] = useState({});
const navigate = useNavigate();
+ const [showMissedClassPrompt, setShowMissedClassPrompt] = useState(
+ !sessionStorage.getItem('missedClassPromptDismissed')
+ );
useEffect(() => {
const fetchData = async () => {
@@ -32,9 +36,33 @@ function Student() {
navigate('/workspace');
};
+ const dismissPrompt = () => {
+ setShowMissedClassPrompt(false);
+ sessionStorage.setItem('missedClassPromptDismissed', 'true');
+ };
+
return (
+
+ {showMissedClassPrompt && (
+
{
+ dismissPrompt();
+ navigate('/missed-class');
+ }}
+ onCancel={() => {
+ dismissPrompt();
+ }}
+ okText = "Yes"
+ cancelText="No"
+ >
+ Did you miss yesterday's class?
+
+ )}
+
);
};
diff --git a/client/src/views/MissedClass/MissedClass.less b/client/src/views/MissedClass/MissedClass.less
index a72722fc1..23f211b35 100644
--- a/client/src/views/MissedClass/MissedClass.less
+++ b/client/src/views/MissedClass/MissedClass.less
@@ -11,18 +11,23 @@
border-radius: 15px;
border: 4px solid;
border-color: #colors[secondary];
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+ justify-content: center; //bruh
}
.column {
- flex: 1;
- margin: 10px;
- padding: 20px;
- border: 1px solid #ccc;
+ flex: 1; // Each column flexes equally
+ padding: 20px; // Padding inside the columns
+ box-sizing: border-box; // Include padding and border in the width and height
min-height: 300px;
+ overflow: auto; // Add scrollbars if content overflows
}
#divider{
- width: 50px;
+ flex: none;
+ width: 2px;
background-color: #000;
margin: 0 20px;
}
@@ -40,4 +45,22 @@
display: flex;
align-items: center;
justify-content: center;
- }
\ No newline at end of file
+}
+
+#class-content{
+ display: flex; // Make it a flex container
+ flex-direction: column; // Lay out children in a
+ flex: 1; // Allow it to fill the available space
+ height: calc(100% - 4vh);
+}
+
+#class-content::after {
+ content: ''; // Required for the pseudo-element to work
+ display: block; // Makes it a block element
+ height: 1px; // Height of the divider line
+ width: 100%; // Full width of the container
+ background-color: black; // Color of the divider
+ position: absolute; // Absolute positioning
+ left: 0; // Starts at the left edge of the container
+ top: 50%; // Position it in the middle of the container vertically
+}
\ No newline at end of file
From 0f7167a69b17edfb65a4f006e9b5266baa0879e6 Mon Sep 17 00:00:00 2001
From: gab0link
Date: Tue, 7 Nov 2023 07:13:19 -0500
Subject: [PATCH 04/13] Implemented Parent Sign Up route and view
---
client/src/App.jsx | 2 +
client/src/components/NavBar/NavBar.jsx | 19 +
.../src/components/NavBar/NavBarConfig.json | 6 +-
.../src/views/ParentSignUp/ParentSignUp.jsx | 93 +++++
.../src/views/ParentSignUp/ParentSignUp.less | 364 ++++++++++++++++++
5 files changed, 482 insertions(+), 2 deletions(-)
create mode 100644 client/src/views/ParentSignUp/ParentSignUp.jsx
create mode 100644 client/src/views/ParentSignUp/ParentSignUp.less
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 3efe80918..2feafb6e8 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -19,6 +19,7 @@ import StudentLogin from './views/StudentLogin/StudentLogin';
import ForgetPassword from './views/TeacherLogin/ForgetPassword';
import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
+import ParentSignUp from './views/ParentSignUp/ParentSignUp';
const App = () => {
return (
@@ -27,6 +28,7 @@ const App = () => {
} />
} />
} />
+ } />
} />
} />
} />
diff --git a/client/src/components/NavBar/NavBar.jsx b/client/src/components/NavBar/NavBar.jsx
index 3896c3159..13ca6bf68 100644
--- a/client/src/components/NavBar/NavBar.jsx
+++ b/client/src/components/NavBar/NavBar.jsx
@@ -8,6 +8,7 @@ import { DownOutlined } from '@ant-design/icons';
import { removeUserSession } from '../../Utils/AuthRequests';
import { useGlobalState } from '../../Utils/userState';
+
export default function NavBar() {
const [value] = useGlobalState('currUser');
let currentRoute = window.location.pathname;
@@ -99,6 +100,24 @@ export default function NavBar() {
Sign Out
) : null}
+ {shouldShowRoute('ParentSignUp') ? (
+
+
+ null == null ? (
+ handleRouteChange(routes.ParentSignUp)}>
+
+ Parent Sign Up
+
+ ) : (
+ handleRouteChange(routes.ParentLogin)}>
+
+ Parent Login
+
+ )
+
+
+ ) : null}
+
);
diff --git a/client/src/components/NavBar/NavBarConfig.json b/client/src/components/NavBar/NavBarConfig.json
index 27282d536..b11401341 100644
--- a/client/src/components/NavBar/NavBarConfig.json
+++ b/client/src/components/NavBar/NavBarConfig.json
@@ -9,12 +9,14 @@
"AccountInfo": "/account",
"ContentCreatorDashboard": "/ccdashboard",
"ResearcherDashboard": "/report",
- "BugReport": "/bugreport"
+ "BugReport": "/bugreport",
+ "ParentSignUp": "/parentsignup",
+ "ParentLogin": "parentlogin"
},
"users": {
"DefaultUser": ["Home", "TeacherLogin", "Sandbox", "About"],
"Mentor": ["Dashboard", "AccountInfo", "SignOut", "Sandbox", "BugReport"],
- "Student": ["SignOut"],
+ "Student": ["SignOut", "ParentSignUp", "ParentLogin"],
"ContentCreator": [
"ContentCreatorDashboard",
"AccountInfo",
diff --git a/client/src/views/ParentSignUp/ParentSignUp.jsx b/client/src/views/ParentSignUp/ParentSignUp.jsx
new file mode 100644
index 000000000..6834cb333
--- /dev/null
+++ b/client/src/views/ParentSignUp/ParentSignUp.jsx
@@ -0,0 +1,93 @@
+import { message } from 'antd';
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import NavBar from '../../components/NavBar/NavBar';
+import { postUser, setUserSession } from '../../Utils/AuthRequests';
+import './ParentSignUp.less';
+
+
+const useFormInput = (initialValue) => {
+ const [value, setValue] = useState(initialValue);
+
+ const handleChange = (e) => {
+ setValue(e.target.value);
+ };
+ return {
+ value,
+ onChange: handleChange,
+ };
+ };
+
+
+export default function ParentSignUp() {
+ const email = useFormInput('');
+ const password = useFormInput('');
+ const rewritePassword = useFormInput('');
+ const [loading, setLoading] = useState(false);
+ const navigate = useNavigate();
+
+ const handleSignUp = () => {
+ setLoading(true);
+ let body = { identifier: email.value, password: password.value };
+
+ postUser(body)
+ .then((response) => {
+ setUserSession(response.data.jwt, JSON.stringify(response.data.user));
+ setLoading(false);
+ if (response.data.user.role.name === 'Content Creator') {
+ navigate('/ccdashboard');
+ } else if (response.data.user.role.name === 'Researcher') {
+ navigate('/report');
+ } else {
+ navigate('/dashboard');
+ }
+ })
+ .catch((error) => {
+ setLoading(false);
+ message.error('Sign Up failed. Please input a valid email and password.');
+ });
+ };
+
+ return (
+
+ );
+
+}
\ No newline at end of file
diff --git a/client/src/views/ParentSignUp/ParentSignUp.less b/client/src/views/ParentSignUp/ParentSignUp.less
new file mode 100644
index 000000000..3e37b7a75
--- /dev/null
+++ b/client/src/views/ParentSignUp/ParentSignUp.less
@@ -0,0 +1,364 @@
+@import '../../assets/style.less';
+
+.container {
+ background-color: #colors[primary];
+ height: 100%;
+ min-height: 100vh;
+ width: 100%;
+ min-width: 100vw;
+ text-align: center;
+}
+
+#content-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#box {
+ width: 300px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+}
+
+#box-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.5em;
+ font-weight: bold;
+ position: relative;
+ top: -60px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#box input[type='text'],
+#box input[type='email'],
+#box input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 200px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+}
+
+#box input[type='text']:focus,
+#box input[type='email']:focus,
+#box input[type='password']:focus {
+ width: 220px;
+}
+
+#box input[type='button'] {
+ background: darken(#colors[tertiary], 30%);
+ width: 80%;
+ display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ background-color: #colors[quaternary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ cursor: pointer;
+ transition: 0.25s;
+ position: relative;
+ bottom: -65px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ color: #colors[text-primary];
+ }
+}
+
+#box #forgot-password {
+ margin-top: 5px;
+ margin-bottom: 0px;
+ float: right;
+ margin-right: 2rem;
+
+ &:hover {
+ cursor: pointer;
+ }
+}
+
+//ForgetPassword
+
+#forgot-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#forgot-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#forgot-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input,
+ textarea {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+}
+
+//ResetPassword
+
+#reset-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#reset-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#reset-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+}
+
+#forgot-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='email'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+
+
+}
+
+
+//ResetPassword
+
+#reset-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#reset-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#reset-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+
+}
+
+
+
\ No newline at end of file
From 52e04e4cc151140ea4cb243e4a5130ee88b4a509 Mon Sep 17 00:00:00 2001
From: Allen Zheng
Date: Tue, 7 Nov 2023 07:30:22 -0500
Subject: [PATCH 05/13] Added parent signup form
---
client/src/App.jsx | 2 +
.../src/views/ParentAccount/ParentSignup.jsx | 77 ++++
.../src/views/ParentAccount/ParentSignup.less | 364 ++++++++++++++++++
.../1.0.0/full_documentation.json | 2 +-
4 files changed, 444 insertions(+), 1 deletion(-)
create mode 100644 client/src/views/ParentAccount/ParentSignup.jsx
create mode 100644 client/src/views/ParentAccount/ParentSignup.less
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 3efe80918..afdf093f3 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -19,6 +19,7 @@ import StudentLogin from './views/StudentLogin/StudentLogin';
import ForgetPassword from './views/TeacherLogin/ForgetPassword';
import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
+import ParentSignup from './views/ParentAccount/ParentSignup';
const App = () => {
return (
@@ -27,6 +28,7 @@ const App = () => {
} />
} />
} />
+ } />
} />
} />
} />
diff --git a/client/src/views/ParentAccount/ParentSignup.jsx b/client/src/views/ParentAccount/ParentSignup.jsx
new file mode 100644
index 000000000..1108eede3
--- /dev/null
+++ b/client/src/views/ParentAccount/ParentSignup.jsx
@@ -0,0 +1,77 @@
+import { message } from 'antd';
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import NavBar from '../../components/NavBar/NavBar';
+import './ParentSignup.less';
+
+const useFormInput = (initialValue) => {
+ const [value, setValue] = useState(initialValue);
+
+ const handleChange = (e) => {
+ setValue(e.target.value);
+ };
+
+ return {
+ value,
+ onChange: handleChange,
+ };
+};
+
+export default function ParentSignup() {
+ const name = useFormInput('');
+ const email = useFormInput('');
+ const password = useFormInput('');
+ const confirmPassword = useFormInput('');
+ const [loading, setLoading] = useState(false);
+ const navigate = useNavigate();
+
+ const handleSignup = () => {
+ //TODO: Handle backend to allow parent account signup
+ };
+
+ return (
+
+ );
+}
diff --git a/client/src/views/ParentAccount/ParentSignup.less b/client/src/views/ParentAccount/ParentSignup.less
new file mode 100644
index 000000000..0e11d8704
--- /dev/null
+++ b/client/src/views/ParentAccount/ParentSignup.less
@@ -0,0 +1,364 @@
+@import '../../assets/style.less';
+
+.container {
+ background-color: #colors[primary];
+ height: 100%;
+ min-height: 100vh;
+ width: 100%;
+ min-width: 100vw;
+ text-align: center;
+}
+
+#content-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#box {
+ width: 300px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+}
+
+#box-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.3em;
+ font-weight: bold;
+ position: relative;
+ top: -60px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#box input[type='text'],
+#box input[type='email'],
+#box input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 200px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+}
+
+#box input[type='text']:focus,
+#box input[type='email']:focus,
+#box input[type='password']:focus {
+ width: 220px;
+}
+
+#box input[type='button'] {
+ background: darken(#colors[tertiary], 30%);
+ width: 80%;
+ display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ background-color: #colors[quaternary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ cursor: pointer;
+ transition: 0.25s;
+ position: relative;
+ bottom: -65px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ color: #colors[text-primary];
+ }
+}
+
+#box #forgot-password {
+ margin-top: 5px;
+ margin-bottom: 0px;
+ float: right;
+ margin-right: 2rem;
+
+ &:hover {
+ cursor: pointer;
+ }
+}
+
+//ForgetPassword
+
+#forgot-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#forgot-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#forgot-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input,
+ textarea {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+}
+
+//ResetPassword
+
+#reset-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#reset-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#reset-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+}
+
+#forgot-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='email'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+
+
+}
+
+
+//ResetPassword
+
+#reset-pass-wrapper {
+ margin: 12vh auto 8vh auto;
+ display: inline-block;
+}
+
+#reset-pass-title {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 80%;
+ min-height: 8%;
+ color: #colors[text-secondary];
+ font-size: 1.4em;
+ font-weight: bold;
+ position: relative;
+ top: 25px;
+ left: -40px;
+ line-height: 50px;
+ text-align: center;
+}
+
+#reset-pass-form {
+ width: 400px;
+ padding: 40px 20px;
+ background-color: #colors[tertiary];
+ text-align: center;
+ border-radius: 15px;
+ border: 4px solid;
+ border-color: #colors[secondary];
+
+ input[type='password'] {
+ display: block;
+ background: none;
+ margin: 20px auto 0px;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 10px;
+ width: 300px;
+ outline: none;
+ color: #colors[text-primary];
+ border-radius: 8px;
+ transition: 0.25s;
+ }
+
+ .ant-btn-primary {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background: #colors[quaternary];
+ width: 50%;
+ // display: block;
+ margin: 0 auto;
+ border: 2px solid;
+ border-color: #colors[secondary];
+ padding: 14px 40px;
+ outline: none;
+ color: #colors[text-primary];
+ font-size: 1.2em;
+ font-weight: 500;
+ border-radius: 30px;
+ position: relative;
+ bottom: -90px;
+
+ &:hover {
+ background-color: #colors[quinary];
+ }
+ }
+
+}
+
+
+
\ No newline at end of file
diff --git a/server/extensions/documentation/documentation/1.0.0/full_documentation.json b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
index 49963424f..99c576da4 100755
--- a/server/extensions/documentation/documentation/1.0.0/full_documentation.json
+++ b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
@@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
- "x-generation-date": "10/12/2023 1:28:43 PM"
+ "x-generation-date": "11/07/2023 6:26:48 AM"
},
"x-strapi-config": {
"path": "/documentation",
From 8d2070aacf11d8d5d9305a07a29aed25b94b61df Mon Sep 17 00:00:00 2001
From: Allen Zheng
Date: Tue, 7 Nov 2023 08:17:45 -0500
Subject: [PATCH 06/13] changed routing url
---
client/src/App.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/App.jsx b/client/src/App.jsx
index afdf093f3..e50f148b9 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -28,7 +28,7 @@ const App = () => {
} />
} />
} />
- } />
+ } />
} />
} />
} />
From f14a34e6661082640232981c8eed62fb163aecc6 Mon Sep 17 00:00:00 2001
From: oliviasakellarides
Date: Tue, 7 Nov 2023 08:54:01 -0500
Subject: [PATCH 07/13] testing
---
.../documentation/documentation/1.0.0/full_documentation.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/extensions/documentation/documentation/1.0.0/full_documentation.json b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
index 49963424f..b6746b5d1 100755
--- a/server/extensions/documentation/documentation/1.0.0/full_documentation.json
+++ b/server/extensions/documentation/documentation/1.0.0/full_documentation.json
@@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
- "x-generation-date": "10/12/2023 1:28:43 PM"
+ "x-generation-date": "11/07/2023 2:41:19 AM"
},
"x-strapi-config": {
"path": "/documentation",
From a7fb2a8c4a10ec00375aa41bf5bf70fc90d08386 Mon Sep 17 00:00:00 2001
From: oliviasakellarides
Date: Tue, 7 Nov 2023 09:45:26 -0500
Subject: [PATCH 08/13] UI for share features
---
client/src/assets/share.png | Bin 0 -> 13933 bytes
client/src/views/Student/Student.jsx | 24 ++++++++++++++++-----
client/src/views/Student/Student.less | 30 +++++++++++++++++++++++++-
3 files changed, 48 insertions(+), 6 deletions(-)
create mode 100644 client/src/assets/share.png
diff --git a/client/src/assets/share.png b/client/src/assets/share.png
new file mode 100644
index 0000000000000000000000000000000000000000..7e4e7fcc7120044998299a9377d24d0acf97d009
GIT binary patch
literal 13933
zcmeHt2T)XPm*#DPm+#t{*N)Tv3L^3E@2?~-#Fo5JB
zS+ax%kt8|8z7601&HOX7RkOQOwN<-g6>`qGCp;&-f$kfwqoqti%1jDD5QVCWf*u5&
zLE?Uh@qvV~C-6D=h3_G!dXt!#cw|!hCtykLsTg@cun)g+Kd>*W5}QDH&QtNWr@ou5
zr_Wt?8_37UN6^95$;0aIJsUwcce|8jX=dOD($To7czk>e^#A+ce^=oD&kB%TsGJ0u
zAA9O)=|eC)d;-EVM8qVdWaJc-RMa%Ibo302XPM41vz%vTV~2BaUf{aO&2x#DkN>iO
zpwN}8!Xlz#;@7TANJ>e|$Rdz8uqc`|ci|Ufw>wC_n!P0f9m2hry3R9zO{U3y*jj85NC*iH&;}
z|2*MEVp4KSYFc_m=F3-E**Up+`30}v6c!biynR<%_P)HLva0$+&BxlhPoKYht#A0&
z*woz8+ScCD+4a4Sx3+h7
z_x2AC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z4S2jO44}vhQ68g1i
zF)MX9k}TQ)i_)QpRXf(7=@r
zohV}-;|P4m4h*J)8m?wHzzoOW-p~~+5km@!%cC!i-F5;;H#zK;r(F@OwE7&LLcy%~
zwjxgXxacaPkr}+$oBrl1D6Sm(dabS%+SD!ty6^X?5t0}qhE0i%=lQ}^ERCaJrO#-9
zt$b0&)M4E@yaoq3AgZFlYnb00Udt+YgrgAUgv}$|#MA{Qj$|=6a0HnXSqvf>j?9iO
z5kPK<-axCk+%f^nH5iKhEnJXrkT^U<0JHQm6o9Q+tmB6blsJ*ZJZh(c8@KhvuBrv;xgzk)NfeA_IrK$kZtzNXX9sYIxwm%iOkT_FssfI3tS4kEp1U%_yLmm
z-T>|BHMPBI!O)SDqut00r4d?U0#IG~Tzu=4)u?tmDLTpJ;Qqzk)lqkD!q0_%7UH!X
z2UWRGC16)V%h{Y{WZ4$%lpxW(yDKyTO-=eHEYy&|{QITN4DlCiy+^ekkLIE8$;JMo
zyF-QZSNDd;{FBKbmxYf#-pZyMpGUGLSRd>wHf {
const fetchData = async () => {
@@ -20,7 +22,9 @@ function Student() {
} else {
message.error(res.err);
}
- } catch {}
+ } catch (error) {
+ console.error(error);
+ }
};
fetchData();
}, []);
@@ -49,21 +53,31 @@ function Student() {
id='list-item-wrapper'
onClick={() => handleSelection(activity)}
>
- {`${learningStandard.name}: Activity ${activity.number}`}
+
+
+
+ {`${learningStandard.name}: Activity ${activity.number}`}
+
+
+
+
))
) : (
There is currently no active learning standard set.
-
- When your classroom manager selects one, it will appear here.
-
+
When your classroom manager selects one, it will appear here.
)}
+
+
+
View programs other students have shared with you
+
);
}
export default Student;
+
diff --git a/client/src/views/Student/Student.less b/client/src/views/Student/Student.less
index 5563e29e2..95870b394 100644
--- a/client/src/views/Student/Student.less
+++ b/client/src/views/Student/Student.less
@@ -13,6 +13,21 @@
border-color: #colors[secondary];
}
+#bottom-section {
+ background-color: #colors[secondary];
+ border-radius: 80px;
+ width: 40%;
+ min-height: 4vh;
+ color: #colors[text-secondary];
+ font-size: 2.25vh;
+ font-weight: bold;
+ position: relative;
+ top: 400px;
+ left: 125px;
+ line-height: 45px;
+ text-align: center;
+}
+
#header {
background-color: #colors[secondary];
border-radius: 80px;
@@ -86,4 +101,17 @@ li {
color: #colors[secondary];
}
}
-}
\ No newline at end of file
+}
+
+.activity-item {
+ display: flex;
+ align-items: center;
+}
+
+.share-icon {
+ order: 1;
+ width: 35px;
+ height: 35px;
+ margin-left: 700px;
+}
+
From 80786175d66e65743726d36519bf148bc994af99 Mon Sep 17 00:00:00 2001
From: Allen Zheng
Date: Tue, 7 Nov 2023 14:40:18 -0500
Subject: [PATCH 09/13] Added access management page
---
client/src/App.jsx | 2 +
.../{ParentSignup.less => Parent.less} | 195 ++++++++++++++++++
.../src/views/ParentAccount/ParentSignup.jsx | 2 +-
.../views/ParentAccount/RestrictAccess.jsx | 34 +++
4 files changed, 232 insertions(+), 1 deletion(-)
rename client/src/views/ParentAccount/{ParentSignup.less => Parent.less} (63%)
create mode 100644 client/src/views/ParentAccount/RestrictAccess.jsx
diff --git a/client/src/App.jsx b/client/src/App.jsx
index e50f148b9..a0fdcfbac 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -20,6 +20,7 @@ import ForgetPassword from './views/TeacherLogin/ForgetPassword';
import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
import ParentSignup from './views/ParentAccount/ParentSignup';
+import RestrictAccess from './views/ParentAccount/RestrictAccess'
const App = () => {
return (
@@ -29,6 +30,7 @@ const App = () => {
} />
} />
} />
+ } />
} />
} />
} />
diff --git a/client/src/views/ParentAccount/ParentSignup.less b/client/src/views/ParentAccount/Parent.less
similarity index 63%
rename from client/src/views/ParentAccount/ParentSignup.less
rename to client/src/views/ParentAccount/Parent.less
index 0e11d8704..518b6f625 100644
--- a/client/src/views/ParentAccount/ParentSignup.less
+++ b/client/src/views/ParentAccount/Parent.less
@@ -360,5 +360,200 @@
}
+#main-header {
+ color: #colors[text-secondary];
+ font-size: 2em;
+ font-weight: bolder;
+ margin-left: 10%;
+ margin-bottom: 3%;
+ text-align: left;
+ padding-top: 20px;
+}
+
+#classrooms-container {
+ margin: 6vh auto 4vh auto;
+ padding-top: 40px;
+ padding-bottom: 40px;
+ width: 80vw;
+ height: auto;
+ background: #colors[senary];
+ border-radius: 5px;
+ border: 2px solid #colors[secondary];
+}
+
+#dashboard-card-container {
+ display: inline-grid;
+ grid-template-columns: auto auto;
+ justify-content: center;
+ width: 80vw;
+ margin: auto auto auto 2%;
+}
+
+#dashboard-class-card {
+ display: flex;
+ flex-direction: row;
+ text-align: center;
+ width: 24vw;
+ height: auto;
+ margin: auto 6vh 6vh auto;
+ background: #colors[tertiary];
+ color: #colors[text-primary];
+ border: none;
+ border-color: #colors[secondary];
+ border-radius: 10px;
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.377);
+
+
+ #card-button-container {
+ // margin: 10% auto 0 auto;
+
+ button {
+ width: 9vw;
+ height: auto;
+ font-size: 1vw;
+ font-weight: 500;
+ border-radius: 30px;
+ margin: 10% auto auto auto;
+ background: #colors[quaternary];
+ border: none;
+ color: #colors[text-primary];
+ transition: 0.25s;
+ cursor: pointer;
+ box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.377);
+
+ &:hover {
+ width: 10vw;
+ background: #colors[quinary];
+ }
+ }
+ }
+
+ #card-left-content-container {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 72%;
+ padding: 24px 24px;
+
+ #card-title {
+ text-align: center;
+ font-size: 1.4vw;
+ margin: 10px;
+ line-height: 1.6vw;
+ }
+ }
+
+ #card-right-content-container {
+ display: flex;
+ flex-direction: column;
+ min-width: 28%;
+
+ #number {
+ font-size: 1.4vw;
+ margin: 0;
+ padding-top: 20px;
+
+ }
+
+ #label {
+ font-size: 1vw;
+ padding-bottom: 20px;
+ }
+
+ #dashboard-display-code-modal {
+ height: 49.5%;
+
+ #dashboard-display-code-btn {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ background-color: #colors[quaternary];
+ border-top-right-radius: 10px;
+ border: none;
+
+ &:hover {
+ background: #colors[quinary];
+ }
+
+ #code-display-text {
+ font-size: 15em;
+ text-align: center;
+ }
+ }
+ }
+
+ #divider {
+ background-color: #colors[tertiary];
+ height: 1%;
+ }
+
+ #student-number-container {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ width: 100%;
+ height: 49.5%;
+ background-color: #colors[quaternary];
+ border-bottom-right-radius: 10px;
+ }
+ }
+
+}
+
+.manage-access-page-container {
+ padding: 24px;
+ background-color: #f0f2f5;
+
+ .manage-access-page-title {
+ font-size: 24px;
+ margin-bottom: 20px;
+ }
+
+ .manage-access-card {
+ display: flex;
+ flex-direction: column;
+ background: #fff;
+ padding: 16px;
+ border-radius: 8px;
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1);
+ margin-bottom: 24px;
+ }
+
+ .access-card-header {
+ font-size: 20px;
+ color: #333;
+ margin-bottom: 16px;
+ }
+
+ .access-card-content {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ .access-feature-title {
+ font-size: 16px;
+ color: #666;
+ }
+
+ #access-toggle-container {
+ display: flex;
+ align-items: center;
+
+
+ .access-toggle-label {
+ font-size: 24px;
+ color: #666;
+ }
+ }
+}
+
+
\ No newline at end of file
diff --git a/client/src/views/ParentAccount/ParentSignup.jsx b/client/src/views/ParentAccount/ParentSignup.jsx
index 1108eede3..75e4a2604 100644
--- a/client/src/views/ParentAccount/ParentSignup.jsx
+++ b/client/src/views/ParentAccount/ParentSignup.jsx
@@ -2,7 +2,7 @@ import { message } from 'antd';
import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import NavBar from '../../components/NavBar/NavBar';
-import './ParentSignup.less';
+import './Parent.less';
const useFormInput = (initialValue) => {
const [value, setValue] = useState(initialValue);
diff --git a/client/src/views/ParentAccount/RestrictAccess.jsx b/client/src/views/ParentAccount/RestrictAccess.jsx
new file mode 100644
index 000000000..fe6330f75
--- /dev/null
+++ b/client/src/views/ParentAccount/RestrictAccess.jsx
@@ -0,0 +1,34 @@
+import React, { useState } from 'react';
+import { Switch } from 'antd';
+import './Parent.less';
+import NavBar from '../../components/NavBar/NavBar';
+import MentorSubHeader from '../../components/MentorSubHeader/MentorSubHeader';
+
+export default function ManageAccessPage() {
+ const [isSharingEnabled, setIsSharingEnabled] = useState(true);
+
+ const toggleSharing = (checked) => {
+ setIsSharingEnabled(checked);
+ //TODO: Add logic to handle the change in sharing access state
+ };
+
+ return (
+
+
+
+
+
+
+
+
Sharing Feature
+
+
+
+ {isSharingEnabled ? 'On' : 'Off'}
+
+
+
+
+
+ );
+}
From 9b031dc245cc4d95c90088d39aabc32b11ed89f0 Mon Sep 17 00:00:00 2001
From: gab0link
Date: Tue, 7 Nov 2023 16:39:42 -0500
Subject: [PATCH 10/13] Changed parentSignUp to parentLogins and rerouted
---
client/src/App.jsx | 4 +-
client/src/components/NavBar/NavBar.jsx | 10 +-
.../src/components/NavBar/NavBarConfig.json | 2 +-
client/src/views/ParentLogin/ParentLogin.jsx | 78 ++++++++++++++++
.../ParentLogin.less} | 0
.../src/views/ParentSignUp/ParentSignUp.jsx | 93 -------------------
6 files changed, 86 insertions(+), 101 deletions(-)
create mode 100644 client/src/views/ParentLogin/ParentLogin.jsx
rename client/src/views/{ParentSignUp/ParentSignUp.less => ParentLogin/ParentLogin.less} (100%)
delete mode 100644 client/src/views/ParentSignUp/ParentSignUp.jsx
diff --git a/client/src/App.jsx b/client/src/App.jsx
index 2feafb6e8..c777898e1 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -19,7 +19,7 @@ import StudentLogin from './views/StudentLogin/StudentLogin';
import ForgetPassword from './views/TeacherLogin/ForgetPassword';
import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
-import ParentSignUp from './views/ParentSignUp/ParentSignUp';
+import ParentLogin from './views/ParentLogin/ParentLogin';
const App = () => {
return (
@@ -28,7 +28,7 @@ const App = () => {
} />
} />
} />
- } />
+ } />
} />
} />
} />
diff --git a/client/src/components/NavBar/NavBar.jsx b/client/src/components/NavBar/NavBar.jsx
index 13ca6bf68..6503f8f46 100644
--- a/client/src/components/NavBar/NavBar.jsx
+++ b/client/src/components/NavBar/NavBar.jsx
@@ -100,18 +100,18 @@ export default function NavBar() {
Sign Out
) : null}
- {shouldShowRoute('ParentSignUp') ? (
+ {shouldShowRoute('ParentLogin') ? (
null == null ? (
- handleRouteChange(routes.ParentSignUp)}>
+ handleRouteChange(routes.ParentLogin)}>
- Parent Sign Up
+ Parent Login
) : (
- handleRouteChange(routes.ParentLogin)}>
+ handleRouteChange(routes.ParentSignUp)}>
- Parent Login
+ Parent Sign Up
)
diff --git a/client/src/components/NavBar/NavBarConfig.json b/client/src/components/NavBar/NavBarConfig.json
index b11401341..2662cb910 100644
--- a/client/src/components/NavBar/NavBarConfig.json
+++ b/client/src/components/NavBar/NavBarConfig.json
@@ -11,7 +11,7 @@
"ResearcherDashboard": "/report",
"BugReport": "/bugreport",
"ParentSignUp": "/parentsignup",
- "ParentLogin": "parentlogin"
+ "ParentLogin": "/parentlogin"
},
"users": {
"DefaultUser": ["Home", "TeacherLogin", "Sandbox", "About"],
diff --git a/client/src/views/ParentLogin/ParentLogin.jsx b/client/src/views/ParentLogin/ParentLogin.jsx
new file mode 100644
index 000000000..819662ee5
--- /dev/null
+++ b/client/src/views/ParentLogin/ParentLogin.jsx
@@ -0,0 +1,78 @@
+import { message } from 'antd';
+import React, { useState } from 'react';
+import { useNavigate } from 'react-router-dom';
+import NavBar from '../../components/NavBar/NavBar';
+import { postUser, setUserSession } from '../../Utils/AuthRequests';
+import './ParentLogin.less';
+
+const useFormInput = (initialValue) => {
+ const [value, setValue] = useState(initialValue);
+
+ const handleChange = (e) => {
+ setValue(e.target.value);
+ };
+ return {
+ value,
+ onChange: handleChange,
+ };
+};
+
+export default function ParentLogin() {
+ const email = useFormInput('');
+ const password = useFormInput('');
+ const [loading, setLoading] = useState(false);
+ const navigate = useNavigate();
+
+ const handleLogin = () => {
+ setLoading(true);
+ let body = { identifier: email.value, password: password.value };
+
+ postUser(body)
+ .then((response) => {
+ setUserSession(response.data.jwt, JSON.stringify(response.data.user));
+ setLoading(false);
+ if (response.data.user.role.name === 'Content Creator') {
+ navigate('/ccdashboard');
+ } else if (response.data.user.role.name === 'Researcher') {
+ navigate('/report');
+ } else {
+ navigate('/dashboard');
+ }
+ })
+ .catch((error) => {
+ setLoading(false);
+ message.error('Login failed. Please input a valid email and password.');
+ });
+ };
+
+ return (
+
+ );
+}
diff --git a/client/src/views/ParentSignUp/ParentSignUp.less b/client/src/views/ParentLogin/ParentLogin.less
similarity index 100%
rename from client/src/views/ParentSignUp/ParentSignUp.less
rename to client/src/views/ParentLogin/ParentLogin.less
diff --git a/client/src/views/ParentSignUp/ParentSignUp.jsx b/client/src/views/ParentSignUp/ParentSignUp.jsx
deleted file mode 100644
index 6834cb333..000000000
--- a/client/src/views/ParentSignUp/ParentSignUp.jsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { message } from 'antd';
-import React, { useState } from 'react';
-import { useNavigate } from 'react-router-dom';
-import NavBar from '../../components/NavBar/NavBar';
-import { postUser, setUserSession } from '../../Utils/AuthRequests';
-import './ParentSignUp.less';
-
-
-const useFormInput = (initialValue) => {
- const [value, setValue] = useState(initialValue);
-
- const handleChange = (e) => {
- setValue(e.target.value);
- };
- return {
- value,
- onChange: handleChange,
- };
- };
-
-
-export default function ParentSignUp() {
- const email = useFormInput('');
- const password = useFormInput('');
- const rewritePassword = useFormInput('');
- const [loading, setLoading] = useState(false);
- const navigate = useNavigate();
-
- const handleSignUp = () => {
- setLoading(true);
- let body = { identifier: email.value, password: password.value };
-
- postUser(body)
- .then((response) => {
- setUserSession(response.data.jwt, JSON.stringify(response.data.user));
- setLoading(false);
- if (response.data.user.role.name === 'Content Creator') {
- navigate('/ccdashboard');
- } else if (response.data.user.role.name === 'Researcher') {
- navigate('/report');
- } else {
- navigate('/dashboard');
- }
- })
- .catch((error) => {
- setLoading(false);
- message.error('Sign Up failed. Please input a valid email and password.');
- });
- };
-
- return (
-
- );
-
-}
\ No newline at end of file
From 4ec7b4b9d5890176c8d1fdbfb83f0c5a6ba77f17 Mon Sep 17 00:00:00 2001
From: gab0link
Date: Thu, 9 Nov 2023 09:21:32 -0500
Subject: [PATCH 11/13] Linked parent login and signup to menu dropdown Even
numbered students = login Odd numbered students = signup
---
client/src/App.jsx | 2 +-
client/src/Utils/userState.js | 1 +
client/src/components/NavBar/NavBar.jsx | 2 +-
client/src/components/NavBar/NavBarConfig.json | 2 +-
client/src/views/{ParentLogin => ParentAccount}/ParentLogin.jsx | 0
.../src/views/{ParentLogin => ParentAccount}/ParentLogin.less | 0
6 files changed, 4 insertions(+), 3 deletions(-)
rename client/src/views/{ParentLogin => ParentAccount}/ParentLogin.jsx (100%)
rename client/src/views/{ParentLogin => ParentAccount}/ParentLogin.less (100%)
diff --git a/client/src/App.jsx b/client/src/App.jsx
index eeb624b62..dde94cdd2 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -21,7 +21,7 @@ import ResetPassword from './views/TeacherLogin/ResetPassword';
import TeacherLogin from './views/TeacherLogin/TeacherLogin';
import ParentSignup from './views/ParentAccount/ParentSignup';
import RestrictAccess from './views/ParentAccount/RestrictAccess'
-import ParentLogin from './views/ParentLogin/ParentLogin';
+import ParentLogin from './views/ParentAccount/ParentLogin';
import MissedClass from './views/MissedClass/MissedClass';
diff --git a/client/src/Utils/userState.js b/client/src/Utils/userState.js
index 9f43c5930..c77c26ecf 100644
--- a/client/src/Utils/userState.js
+++ b/client/src/Utils/userState.js
@@ -11,6 +11,7 @@ export const getCurrUser = () => {
if (!result.role) {
return {
role: 'Student',
+ id: result
};
} else if (result.role.type === 'content_creator') {
return {
diff --git a/client/src/components/NavBar/NavBar.jsx b/client/src/components/NavBar/NavBar.jsx
index 6503f8f46..d19578e65 100644
--- a/client/src/components/NavBar/NavBar.jsx
+++ b/client/src/components/NavBar/NavBar.jsx
@@ -103,7 +103,7 @@ export default function NavBar() {
{shouldShowRoute('ParentLogin') ? (
- null == null ? (
+ value.id % 2 == 0 ? (
handleRouteChange(routes.ParentLogin)}>
Parent Login
diff --git a/client/src/components/NavBar/NavBarConfig.json b/client/src/components/NavBar/NavBarConfig.json
index 2662cb910..770ad46f0 100644
--- a/client/src/components/NavBar/NavBarConfig.json
+++ b/client/src/components/NavBar/NavBarConfig.json
@@ -10,7 +10,7 @@
"ContentCreatorDashboard": "/ccdashboard",
"ResearcherDashboard": "/report",
"BugReport": "/bugreport",
- "ParentSignUp": "/parentsignup",
+ "ParentSignUp": "/parent-signup",
"ParentLogin": "/parentlogin"
},
"users": {
diff --git a/client/src/views/ParentLogin/ParentLogin.jsx b/client/src/views/ParentAccount/ParentLogin.jsx
similarity index 100%
rename from client/src/views/ParentLogin/ParentLogin.jsx
rename to client/src/views/ParentAccount/ParentLogin.jsx
diff --git a/client/src/views/ParentLogin/ParentLogin.less b/client/src/views/ParentAccount/ParentLogin.less
similarity index 100%
rename from client/src/views/ParentLogin/ParentLogin.less
rename to client/src/views/ParentAccount/ParentLogin.less
From 9529773ba1900e2390e59a1fb933f669c8070474 Mon Sep 17 00:00:00 2001
From: gab0link
Date: Thu, 9 Nov 2023 09:45:14 -0500
Subject: [PATCH 12/13] Linked parent login to restrict-access
---
client/src/views/ParentAccount/ParentLogin.jsx | 3 +++
1 file changed, 3 insertions(+)
diff --git a/client/src/views/ParentAccount/ParentLogin.jsx b/client/src/views/ParentAccount/ParentLogin.jsx
index 819662ee5..688854244 100644
--- a/client/src/views/ParentAccount/ParentLogin.jsx
+++ b/client/src/views/ParentAccount/ParentLogin.jsx
@@ -65,6 +65,9 @@ export default function ParentLogin() {
navigate('/forgot-password')}>
Forgot Password?
+ navigate('/restrict-access')}>
+ skip-login
+
Date: Thu, 9 Nov 2023 09:46:53 -0500
Subject: [PATCH 13/13] typo
---
client/src/views/ParentAccount/ParentLogin.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/views/ParentAccount/ParentLogin.jsx b/client/src/views/ParentAccount/ParentLogin.jsx
index 688854244..671c7b6f4 100644
--- a/client/src/views/ParentAccount/ParentLogin.jsx
+++ b/client/src/views/ParentAccount/ParentLogin.jsx
@@ -66,7 +66,7 @@ export default function ParentLogin() {
Forgot Password?
navigate('/restrict-access')}>
- skip-login
+ Skip Login