diff --git a/client/package-lock.json b/client/package-lock.json index dcc8277..7f3445e 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -18,8 +18,8 @@ "react": "^18.2.0", "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", - "react-icons": "^5.0.1", - "react-router-dom": "^6.22.3", + "react-icons": "^5.4.0", + "react-router-dom": "^6.28.0", "react-scripts": "5.0.1", "react-toastify": "^10.0.5", "web-vitals": "^2.1.4" @@ -3446,9 +3446,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", - "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz", + "integrity": "sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==", "engines": { "node": ">=14.0.0" } @@ -15474,9 +15474,9 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, "node_modules/react-icons": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", - "integrity": "sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.4.0.tgz", + "integrity": "sha512-7eltJxgVt7X64oHh6wSWNwwbKTCtMfK35hcjvJS0yxEAhPM8oUKdS3+kqaW1vicIltw+kR2unHaa12S9pPALoQ==", "peerDependencies": { "react": "*" } @@ -15500,11 +15500,11 @@ } }, "node_modules/react-router": { - "version": "6.22.3", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", - "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", + "version": "6.28.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz", + "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==", "dependencies": { - "@remix-run/router": "1.15.3" + "@remix-run/router": "1.21.0" }, "engines": { "node": ">=14.0.0" @@ -15514,12 +15514,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.3", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", - "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", + "version": "6.28.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz", + "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==", "dependencies": { - "@remix-run/router": "1.15.3", - "react-router": "6.22.3" + "@remix-run/router": "1.21.0", + "react-router": "6.28.0" }, "engines": { "node": ">=14.0.0" diff --git a/client/package.json b/client/package.json index 43cc535..67219c7 100644 --- a/client/package.json +++ b/client/package.json @@ -13,8 +13,8 @@ "react": "^18.2.0", "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", - "react-icons": "^5.0.1", - "react-router-dom": "^6.22.3", + "react-icons": "^5.4.0", + "react-router-dom": "^6.28.0", "react-scripts": "5.0.1", "react-toastify": "^10.0.5", "web-vitals": "^2.1.4" diff --git a/client/src/App.js b/client/src/App.js index ee5983c..8dbbb71 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,27 +1,33 @@ -import {BrowserRouter as Router , Route , Routes } from "react-router-dom"; +import React from "react"; +import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; +import CourseForm from "./Pages/CourseForm"; +import FacultyForm from "./Pages/FacultyForm"; import './App.css'; import Welcome from "./Pages/Welcome" -import AuthPage from "./Pages/Login"; +import AuthPage from "./Pages/Login"; import HomePage from "./Pages/HomePage"; -import ForgetPwPage from "./Pages/ForgetPw"; +import ForgetPwPage from "./Pages/ForgetPw"; import ResetPwPage from "./Pages/ResetPw"; import FilterPage from "./Pages/FilterPage"; import WelcomeWithFilter from "./Pages/WelcomeWithFilter"; - import "react-toastify/dist/ReactToastify.css"; +import "react-toastify/dist/ReactToastify.css"; function App() { return ( - - - }> - } /> - }> - }> - }> - }> - } /> - - + + {/* */} + + }> + } /> + } /> + } /> + }> + }> + }> + }> + } /> + + ); } diff --git a/client/src/Pages/CourseForm.css b/client/src/Pages/CourseForm.css new file mode 100644 index 0000000..5d8d184 --- /dev/null +++ b/client/src/Pages/CourseForm.css @@ -0,0 +1,64 @@ +/* General form container styling */ +.form-container { + max-width: 600px; + margin: 30px auto; + padding: 20px; + background-color: #f4f4f9; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + } + + h2 { + text-align: center; + font-size: 24px; + color: #333; + margin-bottom: 20px; + } + + form { + display: flex; + flex-direction: column; + gap: 20px; + } + + label { + font-size: 16px; + color: #333; + margin-bottom: 5px; + } + + input { + padding: 12px; + font-size: 16px; + border: 1px solid #ddd; + border-radius: 5px; + width: 100%; + box-sizing: border-box; + } + + input:focus { + outline: none; + border-color: #4caf50; + box-shadow: 0 0 5px rgba(0, 192, 0, 0.2); + } + + button { + padding: 12px; + font-size: 16px; + background-color: #4caf50; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + width: 100%; + box-sizing: border-box; + } + + button:hover { + background-color: #45a049; + } + + button:focus { + outline: none; + } + \ No newline at end of file diff --git a/client/src/Pages/CourseForm.jsx b/client/src/Pages/CourseForm.jsx new file mode 100644 index 0000000..4c90664 --- /dev/null +++ b/client/src/Pages/CourseForm.jsx @@ -0,0 +1,31 @@ +// CourseForm.js +import React from "react"; +import { useParams } from "react-router-dom"; +import "./CourseForm.css"; + +const CourseForm = () => { + const { id } = useParams(); // Get the course ID from the URL params + + return ( +
+

Course Info

+
+ + + + +
+
+ ); +}; + +export default CourseForm; diff --git a/client/src/Pages/FacultyForm.css b/client/src/Pages/FacultyForm.css new file mode 100644 index 0000000..5d8d184 --- /dev/null +++ b/client/src/Pages/FacultyForm.css @@ -0,0 +1,64 @@ +/* General form container styling */ +.form-container { + max-width: 600px; + margin: 30px auto; + padding: 20px; + background-color: #f4f4f9; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + } + + h2 { + text-align: center; + font-size: 24px; + color: #333; + margin-bottom: 20px; + } + + form { + display: flex; + flex-direction: column; + gap: 20px; + } + + label { + font-size: 16px; + color: #333; + margin-bottom: 5px; + } + + input { + padding: 12px; + font-size: 16px; + border: 1px solid #ddd; + border-radius: 5px; + width: 100%; + box-sizing: border-box; + } + + input:focus { + outline: none; + border-color: #4caf50; + box-shadow: 0 0 5px rgba(0, 192, 0, 0.2); + } + + button { + padding: 12px; + font-size: 16px; + background-color: #4caf50; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + width: 100%; + box-sizing: border-box; + } + + button:hover { + background-color: #45a049; + } + + button:focus { + outline: none; + } + \ No newline at end of file diff --git a/client/src/Pages/FacultyForm.jsx b/client/src/Pages/FacultyForm.jsx new file mode 100644 index 0000000..8316753 --- /dev/null +++ b/client/src/Pages/FacultyForm.jsx @@ -0,0 +1,31 @@ +// FacultyForm.js +import React from "react"; +import { useParams } from "react-router-dom"; +import "./FacultyForm.css"; + +const FacultyForm = () => { + const { id } = useParams(); // Get the faculty ID from the URL params + + return ( +
+

Faculty Info

+
+ + + + +
+
+ ); +}; + +export default FacultyForm; diff --git a/client/src/Pages/FilterPage.jsx b/client/src/Pages/FilterPage.jsx index b026251..c156a3b 100644 --- a/client/src/Pages/FilterPage.jsx +++ b/client/src/Pages/FilterPage.jsx @@ -22,7 +22,7 @@ const FilterPage = ({ onApplyFilter }) => { alert("Please select either 'Course' or 'Faculty' before applying the filter."); return; } - onApplyFilter(); // Trigger the table display + onApplyFilter(selectedOption); // Pass the selected option to the parent }; const handleSelectOption = (option) => { diff --git a/client/src/Pages/Login.jsx b/client/src/Pages/Login.jsx index 5dcaa7d..078e583 100644 --- a/client/src/Pages/Login.jsx +++ b/client/src/Pages/Login.jsx @@ -70,7 +70,7 @@ function AuthPage() { user.profilePicture = gravatarUrl; localStorage.setItem("user", JSON.stringify(user)); - window.location.href = "/Home"; + window.location.href = "/Welcom"; } catch (error) { console.error("Authentication error:", error); if ( diff --git a/client/src/Pages/Navbar.css b/client/src/Pages/Navbar.css index e69de29..5d9fdb9 100644 --- a/client/src/Pages/Navbar.css +++ b/client/src/Pages/Navbar.css @@ -0,0 +1,26 @@ +/* Navbar Container */ +.navbar { + background-color: #800000; /* Maroon background */ + height: 60px; /* Navbar height */ + width: 100%; /* Full width */ + display: flex; /* Flexbox for alignment */ + justify-content: flex-end; /* Align items to the right */ + align-items: center; /* Center vertically */ + padding: 0 20px; /* Horizontal padding for spacing */ + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Subtle shadow */ + position: fixed; /* Fix the navbar to the top */ + top: 0; + z-index: 1000; /* Place above other elements */ +} + +/* User Icon */ +.user-icon { + font-size: 30px; /* Icon size */ + color: #fff; /* White color for the icon */ + cursor: pointer; /* Pointer cursor on hover */ + transition: color 0.3s ease-in-out; /* Smooth hover effect */ +} + +.user-icon:hover { + color: #ffcccc; /* Light pink on hover */ +} diff --git a/client/src/Pages/Navbar.jsx b/client/src/Pages/Navbar.jsx index e69de29..a6a9416 100644 --- a/client/src/Pages/Navbar.jsx +++ b/client/src/Pages/Navbar.jsx @@ -0,0 +1,15 @@ +import React from "react"; +import { FaUserCircle } from "react-icons/fa"; +import "./Navbar.css"; // Navbar-specific styles + +const Navbar = () => { + return ( +
+
+ +
+
+ ); +}; + +export default Navbar; diff --git a/client/src/Pages/Welcom.jsx b/client/src/Pages/Welcom.jsx index e955afd..1f8480f 100644 --- a/client/src/Pages/Welcom.jsx +++ b/client/src/Pages/Welcom.jsx @@ -13,7 +13,7 @@ const Welcom = () => {

Welcome, John Doe

-

You’re signed in as DEC/EIC

+

You're signed in as DEC/EIC