From 98b1ee5351c745569d0bf19373686e269532948b Mon Sep 17 00:00:00 2001 From: elias Date: Sun, 10 Mar 2024 13:46:29 +0100 Subject: [PATCH 1/5] added routing for assignment student page --- frontend/frontend/.vite/deps/_metadata.json | 8 ++++++++ frontend/frontend/.vite/deps/package.json | 3 +++ frontend/frontend/src/main.tsx | 6 +++++- .../assignmentPage/assignmentStudentPage.tsx | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 frontend/frontend/.vite/deps/_metadata.json create mode 100644 frontend/frontend/.vite/deps/package.json create mode 100644 frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx diff --git a/frontend/frontend/.vite/deps/_metadata.json b/frontend/frontend/.vite/deps/_metadata.json new file mode 100644 index 00000000..6bc63e74 --- /dev/null +++ b/frontend/frontend/.vite/deps/_metadata.json @@ -0,0 +1,8 @@ +{ + "hash": "ea10a7bd", + "configHash": "baf76694", + "lockfileHash": "e3b0c442", + "browserHash": "89947c23", + "optimized": {}, + "chunks": {} +} \ No newline at end of file diff --git a/frontend/frontend/.vite/deps/package.json b/frontend/frontend/.vite/deps/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/frontend/frontend/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/frontend/frontend/src/main.tsx b/frontend/frontend/src/main.tsx index 4afb80d1..c6932804 100644 --- a/frontend/frontend/src/main.tsx +++ b/frontend/frontend/src/main.tsx @@ -9,7 +9,7 @@ import ErrorPage from "./pages/ErrorPage.tsx"; import {MainPage} from "./pages/mainPage/MainPage.tsx"; import {Helmet, HelmetProvider} from "react-helmet-async"; import { SubjectsStudentPage } from "./pages/subjects_page/SubjectsStudentPage.tsx"; - +import { AssignmentStudentPage } from "./pages/assignmentPage/assignmentStudentPage"; const router = createBrowserRouter([ { @@ -21,6 +21,10 @@ const router = createBrowserRouter([ path: "/subjects_student", element: , }, + { + path: "/assignment_student", + element: , + }, ]); ReactDOM.createRoot(document.getElementById("root")!).render( diff --git a/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx new file mode 100644 index 00000000..2c829ed1 --- /dev/null +++ b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx @@ -0,0 +1,18 @@ +import {Header} from "../../components/Header.tsx"; +import {Box, Stack, Typography} from "@mui/material"; + +export function AssignmentStudentPage() { + return ( + <> + +
+ + Opgave: +Lorem ipsum dolor sit amet consectetur. Nisi magna dolor et nisi nibh et velit phasellus. Aliquam semper justo posuere suspendisse amet amet nam nec. Tellus magna in proin tempor hac sit. Faucibus laoreet nulla commodo quis. Porttitor sit facilisis sit dignissim quis. Malesuada etiam tempor donec et ante. Aliquam massa donec augue aliquam semper amet blandit sed faucibus. Et elementum duis adipiscing turpis mi. Senectus eu rutrum accumsan convallis metus mattis risus. +Quam eget sapien tellus aliquam facilisi sit volutpat. Scelerisque auctor purus nam sit lacus amet ullamcorper amet. Turpis nulla quis in pretium. Maecenas aliquam ac ullamcorper suspendisse morbi cras. Mi nibh aliquet massa sit eget tristique a. Posuere pretium auctor tellus massa et eu egestas. Sit lorem proin aenean tortor morbi condimentum. Leo eu enim cursus tempus sed viverra laoreet. Nisl ornare velit molestie suspendisse. Hendrerit nibh mauris vulputate sit vitae. Tellus quisque non nibh proin nunc lacus scelerisque dui. +Aliquam fermentum libero aliquet volutpat at. Vestibulum ultrices nec felis leo nibh viverra. Hendrerit ut nunc porta egestas sit velit dictumst dis porta. Donec quam aliquam commodo mattis purus. Tellus nulla lectus fusce in fames scelerisque at. + + + + ); +} \ No newline at end of file From d2ee881330bd5d0bffd6b0385dfa70e7ab755348 Mon Sep 17 00:00:00 2001 From: elias Date: Sun, 10 Mar 2024 17:03:04 +0100 Subject: [PATCH 2/5] assignment student page done (buttons not functional) --- .../assignmentPage/assignmentStudentPage.tsx | 123 ++++++++++++++++-- 1 file changed, 113 insertions(+), 10 deletions(-) diff --git a/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx index 2c829ed1..e47987c2 100644 --- a/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx +++ b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx @@ -1,18 +1,121 @@ import {Header} from "../../components/Header.tsx"; -import {Box, Stack, Typography} from "@mui/material"; +import { AssignmentListItem } from "../../components/AssignmentListItem.tsx"; +import {List, Button, Stack, Typography, Card, Divider} from "@mui/material"; + +const text = "Lorem ipsum dolor sit amet consectetur. Nisi magna dolor et nisi nibh et velit phasellus. Aliquam semper justo posuere suspendisse amet amet nam nec. Tellus magna in proin tempor hac sit. Faucibus laoreet nulla commodo quis. Porttitor sit facilisis sit dignissim quis. Malesuada etiam tempor donec et ante. Aliquam massa donec augue aliquam semper amet blandit sed faucibus. Et elementum duis adipiscing turpis mi. Senectus eu rutrum accumsan convallis metus mattis risus. Quam eget sapien tellus aliquam facilisi sit volutpat. Scelerisque auctor purus nam sit lacus amet ullamcorper amet. Turpis nulla quis in pretium. Maecenas aliquam ac ullamcorper suspendisse morbi cras. Mi nibh aliquet massa sit eget tristique a. Posuere pretium auctor tellus massa et eu egestas. Sit lorem proin aenean tortor morbi condimentum. Leo eu enim cursus tempus sed viverra laoreet. Nisl ornare velit molestie suspendisse. Hendrerit nibh mauris vulputate sit vitae. Tellus quisque non nibh proin nunc lacus scelerisque dui. Aliquam fermentum libero aliquet volutpat at. Vestibulum ultrices nec felis leo nibh viverra. Hendrerit ut nunc porta egestas sit velit dictumst dis porta. Donec quam aliquam commodo mattis purus. Tellus nulla lectus fusce in fames scelerisque at." + +const assignments = [ + { + id: '1', + name: 'Ben Newfield', + deadline: new Date(2024, 11, 17) + }, + { + id: '2', + name: 'Alice Smith', + deadline: new Date(2024, 10, 25) + }, + { + id: '3', + name: 'John Doe', + deadline: new Date(2024, 9, 30) + }, + { + id: '4', + name: 'Emily Johnson', + deadline: new Date(2024, 8, 12) + }, + { + id: '5', + name: 'Michael Brown', + deadline: new Date(2024, 7, 8) + }, + { + id: '6', + name: 'Sarah Williams', + deadline: new Date(2024, 6, 15) + }, + { + id: '7', + name: 'David Wilson', + deadline: new Date(2024, 5, 20) + }, + { + id: '8', + name: 'Emma Garcia', + deadline: new Date(2024, 4, 10) + }, + { + id: '9', + name: 'James Martinez', + deadline: new Date(2024, 3, 28) + } +]; + + export function AssignmentStudentPage() { return ( <> - -
- - Opgave: -Lorem ipsum dolor sit amet consectetur. Nisi magna dolor et nisi nibh et velit phasellus. Aliquam semper justo posuere suspendisse amet amet nam nec. Tellus magna in proin tempor hac sit. Faucibus laoreet nulla commodo quis. Porttitor sit facilisis sit dignissim quis. Malesuada etiam tempor donec et ante. Aliquam massa donec augue aliquam semper amet blandit sed faucibus. Et elementum duis adipiscing turpis mi. Senectus eu rutrum accumsan convallis metus mattis risus. -Quam eget sapien tellus aliquam facilisi sit volutpat. Scelerisque auctor purus nam sit lacus amet ullamcorper amet. Turpis nulla quis in pretium. Maecenas aliquam ac ullamcorper suspendisse morbi cras. Mi nibh aliquet massa sit eget tristique a. Posuere pretium auctor tellus massa et eu egestas. Sit lorem proin aenean tortor morbi condimentum. Leo eu enim cursus tempus sed viverra laoreet. Nisl ornare velit molestie suspendisse. Hendrerit nibh mauris vulputate sit vitae. Tellus quisque non nibh proin nunc lacus scelerisque dui. -Aliquam fermentum libero aliquet volutpat at. Vestibulum ultrices nec felis leo nibh viverra. Hendrerit ut nunc porta egestas sit velit dictumst dis porta. Donec quam aliquam commodo mattis purus. Tellus nulla lectus fusce in fames scelerisque at. - +
+ + + {/*deadline and groep button */ } + + Deadline: 02/04/2024 +
+ + + {/*Opgave*/ } + + + Opgave + {text} + + + + {/*Indieningen*/ } + + + {assignments.map((assignment) => ( + <> + + + + ))} + + + + {/*Upload knop*/ } + + +
+ + + + ); -} \ No newline at end of file +} From 71c47caa6b4e23d00a6541c1b9f71f889b18b5e2 Mon Sep 17 00:00:00 2001 From: elias Date: Sun, 10 Mar 2024 17:13:45 +0100 Subject: [PATCH 3/5] changed names to upload ids --- .../assignmentPage/assignmentStudentPage.tsx | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx index e47987c2..d4ee8111 100644 --- a/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx +++ b/frontend/frontend/src/pages/assignmentPage/assignmentStudentPage.tsx @@ -1,53 +1,53 @@ import {Header} from "../../components/Header.tsx"; import { AssignmentListItem } from "../../components/AssignmentListItem.tsx"; -import {List, Button, Stack, Typography, Card, Divider} from "@mui/material"; +import {Box,List, Button, Stack, Typography, Card, Divider} from "@mui/material"; const text = "Lorem ipsum dolor sit amet consectetur. Nisi magna dolor et nisi nibh et velit phasellus. Aliquam semper justo posuere suspendisse amet amet nam nec. Tellus magna in proin tempor hac sit. Faucibus laoreet nulla commodo quis. Porttitor sit facilisis sit dignissim quis. Malesuada etiam tempor donec et ante. Aliquam massa donec augue aliquam semper amet blandit sed faucibus. Et elementum duis adipiscing turpis mi. Senectus eu rutrum accumsan convallis metus mattis risus. Quam eget sapien tellus aliquam facilisi sit volutpat. Scelerisque auctor purus nam sit lacus amet ullamcorper amet. Turpis nulla quis in pretium. Maecenas aliquam ac ullamcorper suspendisse morbi cras. Mi nibh aliquet massa sit eget tristique a. Posuere pretium auctor tellus massa et eu egestas. Sit lorem proin aenean tortor morbi condimentum. Leo eu enim cursus tempus sed viverra laoreet. Nisl ornare velit molestie suspendisse. Hendrerit nibh mauris vulputate sit vitae. Tellus quisque non nibh proin nunc lacus scelerisque dui. Aliquam fermentum libero aliquet volutpat at. Vestibulum ultrices nec felis leo nibh viverra. Hendrerit ut nunc porta egestas sit velit dictumst dis porta. Donec quam aliquam commodo mattis purus. Tellus nulla lectus fusce in fames scelerisque at." const assignments = [ { id: '1', - name: 'Ben Newfield', + name: '#1', deadline: new Date(2024, 11, 17) }, { id: '2', - name: 'Alice Smith', + name: '#2', deadline: new Date(2024, 10, 25) }, { id: '3', - name: 'John Doe', + name: '#3', deadline: new Date(2024, 9, 30) }, { id: '4', - name: 'Emily Johnson', + name: '#4', deadline: new Date(2024, 8, 12) }, { id: '5', - name: 'Michael Brown', + name: '#5', deadline: new Date(2024, 7, 8) }, { id: '6', - name: 'Sarah Williams', + name: '#6', deadline: new Date(2024, 6, 15) }, { id: '7', - name: 'David Wilson', + name: '#7', deadline: new Date(2024, 5, 20) }, { id: '8', - name: 'Emma Garcia', + name: '#8', deadline: new Date(2024, 4, 10) }, { id: '9', - name: 'James Martinez', + name: '#9', deadline: new Date(2024, 3, 28) } ]; @@ -91,14 +91,19 @@ export function AssignmentStudentPage() { padding: '20px' }} > + + Indiening + Datum + {assignments.map((assignment) => ( <> + - + ))} From 7bd5ff9ed911c27754117a4466a53acb6f69e5ec Mon Sep 17 00:00:00 2001 From: elias Date: Tue, 12 Mar 2024 21:03:01 +0100 Subject: [PATCH 4/5] opdrachten leerkracht pagina statisch klaar --- frontend/frontend/package-lock.json | 134 +++++++++++++---- frontend/frontend/package.json | 6 +- frontend/frontend/src/main.tsx | 5 + .../assignmentPage/assignmentTeacherPage.tsx | 138 ++++++++++++++++++ 4 files changed, 250 insertions(+), 33 deletions(-) create mode 100644 frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx diff --git a/frontend/frontend/package-lock.json b/frontend/frontend/package-lock.json index 2c201475..51152709 100644 --- a/frontend/frontend/package-lock.json +++ b/frontend/frontend/package-lock.json @@ -8,12 +8,14 @@ "name": "frontend", "version": "0.0.0", "dependencies": { - "@emotion/react": "^11.11.3", + "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.8", "@mui/icons-material": "^5.15.11", - "@mui/material": "^5.15.11", + "@mui/material": "^5.15.12", + "@mui/x-date-pickers": "^6.19.6", "axios": "^1.6.7", + "dayjs": "^1.11.10", "i18next": "^23.10.0", "i18next-browser-languagedetector": "^7.2.0", "i18next-http-backend": "^2.5.0", @@ -478,9 +480,9 @@ "integrity": "sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==" }, "node_modules/@emotion/react": { - "version": "11.11.3", - "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.3.tgz", - "integrity": "sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA==", + "version": "11.11.4", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.11.4.tgz", + "integrity": "sha512-t8AjMlF0gHpvvxk5mAtCqR4vmxiGHCeJBaQO6gncUSdklELOgtwjerNY2yuJNfwnc6vi16U/+uMF+afIawJ9iw==", "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.11.0", @@ -1166,14 +1168,14 @@ } }, "node_modules/@mui/base": { - "version": "5.0.0-beta.37", - "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.37.tgz", - "integrity": "sha512-/o3anbb+DeCng8jNsd3704XtmmLDZju1Fo8R2o7ugrVtPQ/QpcqddwKNzKPZwa0J5T8YNW3ZVuHyQgbTnQLisQ==", + "version": "5.0.0-beta.38", + "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.38.tgz", + "integrity": "sha512-AsjD6Y1X5A1qndxz8xCcR8LDqv31aiwlgWMPxFAX/kCKiIGKlK65yMeVZ62iQr/6LBz+9hSKLiD1i4TZdAHKcQ==", "dependencies": { "@babel/runtime": "^7.23.9", "@floating-ui/react-dom": "^2.0.8", "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", + "@mui/utils": "^5.15.12", "@popperjs/core": "^2.11.8", "clsx": "^2.1.0", "prop-types": "^15.8.1" @@ -1197,9 +1199,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.11.tgz", - "integrity": "sha512-JVrJ9Jo4gyU707ujnRzmE8ABBWpXd6FwL9GYULmwZRtfPg89ggXs/S3MStQkpJ1JRWfdLL6S5syXmgQGq5EDAw==", + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.12.tgz", + "integrity": "sha512-brRO+tMFLpGyjEYHrX97bzqeF6jZmKpqqe1rY0LyIHAwP6xRVzh++zSecOQorDOCaZJg4XkGT9xfD+RWOWxZBA==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" @@ -1231,16 +1233,16 @@ } }, "node_modules/@mui/material": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.11.tgz", - "integrity": "sha512-FA3eEuEZaDaxgN3CgfXezMWbCZ4VCeU/sv0F0/PK5n42qIgsPVD6q+j71qS7/62sp6wRFMHtDMpXRlN+tT/7NA==", + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.15.12.tgz", + "integrity": "sha512-vXJGg6KNKucsvbW6l7w9zafnpOp0CWc0Wx4mDykuABTpQ5QQBnZxP7+oB4yAS1hDZQ1WobbeIl0CjxK4EEahkA==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/base": "5.0.0-beta.37", - "@mui/core-downloads-tracker": "^5.15.11", - "@mui/system": "^5.15.11", + "@mui/base": "5.0.0-beta.38", + "@mui/core-downloads-tracker": "^5.15.12", + "@mui/system": "^5.15.12", "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", + "@mui/utils": "^5.15.12", "@types/react-transition-group": "^4.4.10", "clsx": "^2.1.0", "csstype": "^3.1.3", @@ -1275,12 +1277,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.11.tgz", - "integrity": "sha512-jY/696SnSxSzO1u86Thym7ky5T9CgfidU3NFJjguldqK4f3Z5S97amZ6nffg8gTD0HBjY9scB+4ekqDEUmxZOA==", + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.12.tgz", + "integrity": "sha512-cqoSo9sgA5HE+8vZClbLrq9EkyOnYysooepi5eKaKvJ41lReT2c5wOZAeDDM1+xknrMDos+0mT2zr3sZmUiRRA==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.11", + "@mui/utils": "^5.15.12", "prop-types": "^15.8.1" }, "engines": { @@ -1332,15 +1334,15 @@ } }, "node_modules/@mui/system": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.11.tgz", - "integrity": "sha512-9j35suLFq+MgJo5ktVSHPbkjDLRMBCV17NMBdEQurh6oWyGnLM4uhU4QGZZQ75o0vuhjJghOCA1jkO3+79wKsA==", + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-5.15.12.tgz", + "integrity": "sha512-/pq+GO6yN3X7r3hAwFTrzkAh7K1bTF5r8IzS79B9eyKJg7v6B/t4/zZYMR6OT9qEPtwf6rYN2Utg1e6Z7F1OgQ==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.15.11", + "@mui/private-theming": "^5.15.12", "@mui/styled-engine": "^5.15.11", "@mui/types": "^7.2.13", - "@mui/utils": "^5.15.11", + "@mui/utils": "^5.15.12", "clsx": "^2.1.0", "csstype": "^3.1.3", "prop-types": "^15.8.1" @@ -1384,9 +1386,9 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.11", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.11.tgz", - "integrity": "sha512-D6bwqprUa9Stf8ft0dcMqWyWDKEo7D+6pB1k8WajbqlYIRA8J8Kw9Ra7PSZKKePGBGWO+/xxrX1U8HpG/aXQCw==", + "version": "5.15.12", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.12.tgz", + "integrity": "sha512-8SDGCnO2DY9Yy+5bGzu00NZowSDtuyHP4H8gunhHGQoIlhlY2Z3w64wBzAOLpYw/ZhJNzksDTnS/i8qdJvxuow==", "dependencies": { "@babel/runtime": "^7.23.9", "@types/prop-types": "^15.7.11", @@ -1410,6 +1412,71 @@ } } }, + "node_modules/@mui/x-date-pickers": { + "version": "6.19.6", + "resolved": "https://registry.npmjs.org/@mui/x-date-pickers/-/x-date-pickers-6.19.6.tgz", + "integrity": "sha512-QW9AFcPi0vLpkUhmquhhyhLaBvB0AZJuu3NTrE173qNKx3Z3n51aCLY9bc7c6i4ltZMMsVRHlvzQjsve04TC8A==", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@mui/base": "^5.0.0-beta.22", + "@mui/utils": "^5.14.16", + "@types/react-transition-group": "^4.4.8", + "clsx": "^2.0.0", + "prop-types": "^15.8.1", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui" + }, + "peerDependencies": { + "@emotion/react": "^11.9.0", + "@emotion/styled": "^11.8.1", + "@mui/material": "^5.8.6", + "@mui/system": "^5.8.0", + "date-fns": "^2.25.0 || ^3.2.0", + "date-fns-jalali": "^2.13.0-0", + "dayjs": "^1.10.7", + "luxon": "^3.0.2", + "moment": "^2.29.4", + "moment-hijri": "^2.1.2", + "moment-jalaali": "^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "date-fns": { + "optional": true + }, + "date-fns-jalali": { + "optional": true + }, + "dayjs": { + "optional": true + }, + "luxon": { + "optional": true + }, + "moment": { + "optional": true + }, + "moment-hijri": { + "optional": true + }, + "moment-jalaali": { + "optional": true + } + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2243,6 +2310,11 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", diff --git a/frontend/frontend/package.json b/frontend/frontend/package.json index 884b961c..9d646fa8 100644 --- a/frontend/frontend/package.json +++ b/frontend/frontend/package.json @@ -10,12 +10,14 @@ "preview": "vite preview" }, "dependencies": { - "@emotion/react": "^11.11.3", + "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", "@fontsource/roboto": "^5.0.8", "@mui/icons-material": "^5.15.11", - "@mui/material": "^5.15.11", + "@mui/material": "^5.15.12", + "@mui/x-date-pickers": "^6.19.6", "axios": "^1.6.7", + "dayjs": "^1.11.10", "i18next": "^23.10.0", "i18next-browser-languagedetector": "^7.2.0", "i18next-http-backend": "^2.5.0", diff --git a/frontend/frontend/src/main.tsx b/frontend/frontend/src/main.tsx index c6932804..5de8e8c8 100644 --- a/frontend/frontend/src/main.tsx +++ b/frontend/frontend/src/main.tsx @@ -10,6 +10,7 @@ import {MainPage} from "./pages/mainPage/MainPage.tsx"; import {Helmet, HelmetProvider} from "react-helmet-async"; import { SubjectsStudentPage } from "./pages/subjects_page/SubjectsStudentPage.tsx"; import { AssignmentStudentPage } from "./pages/assignmentPage/assignmentStudentPage"; +import { AssignmentTeacherPage } from "./pages/assignmentPage/assignmentTeacherPage.tsx"; const router = createBrowserRouter([ { @@ -25,6 +26,10 @@ const router = createBrowserRouter([ path: "/assignment_student", element: , }, + { + path: "/assignment_teacher", + element: , + }, ]); ReactDOM.createRoot(document.getElementById("root")!).render( diff --git a/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx b/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx new file mode 100644 index 00000000..0ae9736b --- /dev/null +++ b/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx @@ -0,0 +1,138 @@ +import {Header} from "../../components/Header.tsx"; +import {Grid ,TextField,Box,List, Button, Stack, Typography, Card, Divider, ListItem, ListItemText} from "@mui/material"; +import UploadIcon from '@mui/icons-material/Upload'; +import SaveIcon from '@mui/icons-material/Save'; +import AddIcon from '@mui/icons-material/Add'; +import { LocalizationProvider } from '@mui/x-date-pickers'; +import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs' +import { DatePicker } from '@mui/x-date-pickers/DatePicker'; + +const text = "Lorem ipsum dolor sit amet consectetur. Nisi magna dolor et nisi nibh et velit phasellus. Aliquam semper justo posuere suspendisse amet amet nam nec. Tellus magna in proin tempor hac sit. Faucibus laoreet nulla commodo quis. Porttitor sit facilisis sit dignissim quis. Malesuada etiam tempor donec et ante. Aliquam massa donec augue aliquam semper amet blandit sed faucibus. Et elementum duis adipiscing turpis mi. Senectus eu rutrum accumsan convallis metus mattis risus. Quam eget sapien tellus aliquam facilisi sit volutpat. Scelerisque auctor purus nam sit lacus amet ullamcorper amet. Turpis nulla quis in pretium. Maecenas aliquam ac ullamcorper suspendisse morbi cras. Mi nibh aliquet massa sit eget tristique a. Posuere pretium auctor tellus massa et eu egestas. Sit lorem proin aenean tortor morbi condimentum. Leo eu enim cursus tempus sed viverra laoreet. Nisl ornare velit molestie suspendisse. Hendrerit nibh mauris vulputate sit vitae. Tellus quisque non nibh proin nunc lacus scelerisque dui. Aliquam fermentum libero aliquet volutpat at. Vestibulum ultrices nec felis leo nibh viverra. Hendrerit ut nunc porta egestas sit velit dictumst dis porta. Donec quam aliquam commodo mattis purus. Tellus nulla lectus fusce in fames scelerisque at." + +const restrictions = [ + { + type: 'bestandstype', + details: '.pdf .zip', + }, + { + type: 'bestandsgrootte', + details: '< 0.25 gb', + }, + { + type: 'docker test', + details: 'filename', + }, +] + +interface restrictionProps { + type: string, + details: string, +} + +export function Restriction({type,details}:restrictionProps) { + return ( + <> + + {type} + {details} + + + ); +} + + + + +export function AssignmentTeacherPage() { + return ( + <> +
+ + + {/*opdracht and upload button*/ } + + + + + Naam Opdracht: + + + + + + +
+ + + + + + + + Deadline: + + + + + + + + + + {/*Opgave*/ } + + + Opgave + {text} + + + + {/*Restricties*/ } + + + + Type restrictie + Details + + + + {restrictions.map((res) => + + )} + + + + + + + + + +
+ + + + + ); +} \ No newline at end of file From e7a1386a2aec233b48b5032ea36e67bbacb1e12c Mon Sep 17 00:00:00 2001 From: elias Date: Tue, 12 Mar 2024 21:36:09 +0100 Subject: [PATCH 5/5] statische versie van groepen pagina af --- frontend/frontend/src/main.tsx | 6 + .../assignmentPage/assignmentTeacherPage.tsx | 2 - .../src/pages/groupsPage/groupsPage.tsx | 112 ++++++++++++++++++ 3 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 frontend/frontend/src/pages/groupsPage/groupsPage.tsx diff --git a/frontend/frontend/src/main.tsx b/frontend/frontend/src/main.tsx index 5de8e8c8..0ed7e675 100644 --- a/frontend/frontend/src/main.tsx +++ b/frontend/frontend/src/main.tsx @@ -11,6 +11,7 @@ import {Helmet, HelmetProvider} from "react-helmet-async"; import { SubjectsStudentPage } from "./pages/subjects_page/SubjectsStudentPage.tsx"; import { AssignmentStudentPage } from "./pages/assignmentPage/assignmentStudentPage"; import { AssignmentTeacherPage } from "./pages/assignmentPage/assignmentTeacherPage.tsx"; +import { GroupsPage } from "./pages/groupsPage/groupsPage.tsx"; const router = createBrowserRouter([ { @@ -30,6 +31,11 @@ const router = createBrowserRouter([ path: "/assignment_teacher", element: , }, + { + path: "/groups", + element: , + }, + ]); ReactDOM.createRoot(document.getElementById("root")!).render( diff --git a/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx b/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx index 0ae9736b..fbc7653a 100644 --- a/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx +++ b/frontend/frontend/src/pages/assignmentPage/assignmentTeacherPage.tsx @@ -41,8 +41,6 @@ export function Restriction({type,details}:restrictionProps) { } - - export function AssignmentTeacherPage() { return ( <> diff --git a/frontend/frontend/src/pages/groupsPage/groupsPage.tsx b/frontend/frontend/src/pages/groupsPage/groupsPage.tsx new file mode 100644 index 00000000..99cbf84a --- /dev/null +++ b/frontend/frontend/src/pages/groupsPage/groupsPage.tsx @@ -0,0 +1,112 @@ +import {Header} from "../../components/Header.tsx"; +import {Grid ,TextField,Box,List, Button, Stack, Typography, Card, Divider, ListItem, ListItemText} from "@mui/material"; +import Switch from '@mui/material/Switch'; + + +const groups = [ + { + name: 'Jane' + }, + { + name: 'John' + }, + { + name: 'Alice' + }, + { + name: 'Bob' + }, + { + name: 'Emily' + }, + { + name: 'David' + }, + { + name: 'Sophia' + }, + { + name: 'Michael' + }, + { + name: 'Olivia' + }, + { + name: 'William' + }, +]; + + +interface GroupListItemProps { + name: string, +} + +export function GroupListItem({name}:GroupListItemProps) { + return ( + <> + + + {name} + student1, student2.. + + + + ); +} + + +export function GroupsPage() { + return ( + <> +
+ + + Groepen: + + + + + + Leden per groep: + + + + + + + + + + Willekeurige groepen: + + + + Studenten kunnen kiezen: + + + + + + :not(style)': { marginBottom: '8px' ,width: "100vh" } }}> + + Naam Student + Ingeschreven groep + + + + {groups.map((res) => + + )} + + + + + + ); +} \ No newline at end of file