diff --git a/client/src/App.css b/client/src/App.css
index d87bb11..b599c7c 100644
--- a/client/src/App.css
+++ b/client/src/App.css
@@ -24,9 +24,6 @@
body {
background-color:#ffffff;
/* background: linear-gradient(to right, #dab8fc, #afc2ff); */
- display: flex;
- align-items: center;
- justify-content: center;
height: 100vh;
}
body h1{
@@ -486,3 +483,10 @@ height:auto !important;
}
}
+
+.LoginPage {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100vh;
+}
\ No newline at end of file
diff --git a/client/src/App.js b/client/src/App.js
index e2242bb..e5c5bc2 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -15,11 +15,8 @@ import CourseTable from "./Pages/CourseTable";
import GenerateCSV from "./Pages/GenerateCSV";
import ConsolidatedTable from "./Pages/ConsolidatedTable";
-
function App() {
return (
-
- {/* */}
}>
} />
@@ -34,7 +31,6 @@ function App() {
} />
} />
-
);
}
diff --git a/client/src/Pages/ConsolidatedTable.jsx b/client/src/Pages/ConsolidatedTable.jsx
index 7f70b7f..264e3a1 100644
--- a/client/src/Pages/ConsolidatedTable.jsx
+++ b/client/src/Pages/ConsolidatedTable.jsx
@@ -1,8 +1,84 @@
import React, { useState, useEffect } from "react";
import axios from "axios";
import * as XLSX from "xlsx-js-style";
-import { sendEmail } from "../api";
-import { createExcelBook } from "../api";
+import { sendEmail, createExcelBook } from "../api";
+import Navbar from "./Navbar";
+
+const styles = {
+ header: {
+ background: '#003366',
+ color: 'white',
+ padding: '20px 0',
+ textAlign: 'center',
+ fontSize: '24px',
+ marginBottom: '0',
+ },
+ buttonRow: {
+ display: 'flex',
+ justifyContent: 'space-around',
+ alignItems: 'center',
+ padding: '10px 0',
+ margin: '0',
+ backgroundColor: '#003366',
+ boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)'
+ },
+ button: {
+ padding: '10px 20px',
+ borderRadius: '5px',
+ color: 'white',
+ border: 'none',
+ cursor: 'pointer',
+ fontSize: '16px',
+ flex: '1',
+ },
+ bulkDownloadButton: {
+ backgroundColor: '#3fb5a3',
+ },
+ downloadButton: {
+ backgroundColor: '#28a745',
+ },
+ emailButton: {
+ backgroundColor: '#ff6f61',
+ },
+ tableContainer: {
+ maxHeight: "70vh",
+ overflowY: "auto",
+ border: "1px solid #ccc",
+ padding: "10px",
+ borderRadius: "5px",
+ backgroundColor: "#f9f9f9",
+ marginBottom: "20px",
+ },
+ table: {
+ width: "100%",
+ marginTop: "20px",
+ borderCollapse: "collapse",
+ },
+ th: {
+ backgroundColor: "#333",
+ color: "white",
+ padding: "10px 15px",
+ },
+ td: {
+ padding: "10px",
+ textAlign: "left",
+ borderBottom: "1px solid #ddd",
+ },
+ paginationContainer: {
+ textAlign: "center",
+ marginTop: "20px",
+ },
+ paginationButton: {
+ padding: "10px 15px",
+ backgroundColor: "#007bff",
+ color: "white",
+ borderRadius: "5px",
+ border: "none",
+ },
+ main: {
+ width: "100%",
+ }
+};
const ConsolidatedTable = () => {
const [data, setData] = useState([]);
@@ -63,7 +139,7 @@ const ConsolidatedTable = () => {
};
const handleSendEmail = async (teacher, teacherData) => {
- const facultyId = teacherData[0].facultyId; // This assumes all rows for a teacher have the same facultyId
+ const facultyId = teacherData[0].facultyId;
try {
const response = await axios.get(
`http://localhost:8080/api/faculty/${facultyId}`
@@ -87,15 +163,15 @@ const ConsolidatedTable = () => {
formData.append("file", file);
try {
- const response = await sendEmail(formData);
+ const emailResponse = await sendEmail(formData);
alert(`Email sent successfully to ${facultyEmail}`);
- console.log("Response from server:", response);
- } catch (error) {
- console.error("Error sending email:", error);
+ console.log("Response from server:", emailResponse);
+ } catch (emailError) {
+ console.error("Error sending email:", emailError);
alert("Failed to send email.");
}
- } catch (error) {
- console.error("Error fetching Faculty data:", error);
+ } catch (facultyError) {
+ console.error("Error fetching Faculty data:", facultyError);
alert("Failed to fetch faculty data.");
}
};
@@ -110,66 +186,35 @@ const ConsolidatedTable = () => {
};
return (
-
-
+ <>
+
+
+
Faculty Tables with Download Options
-
-
+
+
-
-
+
{currentTeachers.map((teacher, index) => {
const teacherData = data.filter((row) => row.Name === teacher);
return (
@@ -180,93 +225,71 @@ const ConsolidatedTable = () => {
justifyContent: "space-between",
alignItems: "center",
cursor: "pointer",
- backgroundColor: "#ffffff",
- color: "white",
padding: "10px",
borderRadius: "5px",
+ backgroundColor: "#ffffff",
+ boxShadow: "0 2px 4px rgba(0,0,0,0.1)"
}}
onClick={() => setExpandedTeacher(expandedTeacher === teacher ? null : teacher)}
>
-
{teacher}'s Table
+
{teacher}'s Table
{expandedTeacher === teacher && (
-
+
- | Semester |
- Course Code |
- Course Name |
- Exam Type |
- Year |
- Marks |
- Name |
- Affiliation/College |
- Highest Qualification |
- Career Experience |
- Oral/Practical |
- Assessment |
- Reassessment |
- Paper Setting |
- Moderation |
- PwD Paper Setting |
+ Semester |
+ Course Code |
+ Course Name |
+ Exam Type |
+ Year |
+ Marks |
+ Name |
+ Affiliation/College |
+ Highest Qualification |
+ Career Experience |
+ Oral/Practical |
+ Assessment |
+ Reassessment |
+ Paper Setting |
+ Moderation |
+ PwD Paper Setting |
{teacherData.map((row, idx) => (
- | {row.semester} |
- {row.courseCode} |
- {row.courseName} |
- {row.examType} |
- {row.year} |
- {row.marks} |
- {row.Name} |
- {row.affiliation} |
- {row.qualification} |
- {row.experience} |
- {row.oralPractical} |
- {row.assessment} |
- {row.reassessment} |
- {row.paperSetting} |
- {row.moderation} |
- {row.pwdPaperSetting} |
+ {row.semester} |
+ {row.courseCode} |
+ {row.courseName} |
+ {row.examType} |
+ {row.year} |
+ {row.marks} |
+ {row.Name} |
+ {row.affiliation} |
+ {row.qualification} |
+ {row.experience} |
+ {row.oralPractical} |
+ {row.assessment} |
+ {row.reassessment} |
+ {row.paperSetting} |
+ {row.moderation} |
+ {row.pwdPaperSetting} |
))}
@@ -278,18 +301,11 @@ const ConsolidatedTable = () => {
{/* Pagination controls */}
-
+
@@ -299,19 +315,13 @@ const ConsolidatedTable = () => {
+ >
);
};
diff --git a/client/src/Pages/CourseForm.css b/client/src/Pages/CourseForm.css
index e8e4714..aa37fbb 100644
--- a/client/src/Pages/CourseForm.css
+++ b/client/src/Pages/CourseForm.css
@@ -1,130 +1,99 @@
-/* CourseForm.css */
-.form-container {
- max-width: 600px;
- margin: 50px auto;
- padding: 20px;
- border: 1px solid #ccc;
- border-radius: 10px;
- background-color: #f9f9f9;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+/* General container styles */
+.courseFormContainer {
+ display: flex ;
+ justify-content: center ;
+ align-items: center ;
+ padding: 20px ;
}
-h2 {
- text-align: center;
- color: #333;
- margin-bottom: 20px;
- font-size: 1.8rem;
+.courseFormFormContainer {
+ background: #f4f4f4 ;
+ padding: 20px ;
+ border-radius: 8px ;
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1) ;
+ width: 100% ;
+ max-width: 960px ;
}
-form {
- display: flex;
- flex-direction: column;
- gap: 15px;
+.courseFormHeader {
+ text-align: center ;
+ color: #333 ;
+ grid-column: 1 / -1 ; /* Spans the entire width */
}
-label {
- font-size: 1rem;
- font-weight: bold;
- color: #555;
- display: flex;
- flex-direction: column;
+.courseForm {
+ display: grid ;
+ grid-template-columns: repeat(3, 1fr) ; /* Creates three columns */
+ grid-gap: 20px ;
+ align-items: start ;
}
-input[type="text"] {
- padding: 10px;
- font-size: 1rem;
- border: 1px solid #ccc;
- border-radius: 5px;
- background-color: #fff;
- transition: border-color 0.3s ease;
+.courseFormLabel {
+ display: block ;
+ color: #666 ;
+ font-weight: bold ;
}
-input[type="text"]:focus {
- border-color: #007bff;
- outline: none;
+.courseFormInput, .courseFormSelect, .courseFormButton {
+ width: 100% ;
+ padding: 8px ;
+ margin-top: 5px ;
+ border: 1px solid #ddd ;
+ border-radius: 4px ;
+ box-sizing: border-box ; /* Makes sure the padding doesn't affect the final width */
}
-button {
- padding: 10px 15px;
- font-size: 1rem;
- font-weight: bold;
- color: #fff;
- background-color: #007bff;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- transition: background-color 0.3s ease;
+.courseFormReadOnly {
+ background: #eee ;
+ color: #666 ;
}
-button:hover {
- background-color: #0056b3;
+.courseFormButton {
+ padding: 10px 20px ;
+ background-color: #a71515 ;
+ color: white ;
+ border: none ;
+ border-radius: 4px ;
+ cursor: pointer ;
}
-button:active {
- background-color: #003d7a;
+.courseFormButton:hover {
+ background-color: #e14a4a ;
}
-button[type="submit"] {
- align-self: center;
- width: 50%;
+.courseFormErrorMessage {
+ color: red ;
+ font-size: 12px ;
+ grid-column: 1 / -1 ; /* Spans the entire width */
}
-.suggestions {
- list-style-type: none;
- margin: 0;
- padding: 0;
- border: 1px solid #ccc;
- max-height: 150px;
- overflow-y: auto;
- background: #fff;
- position: absolute;
- width: 100%;
- z-index: 10;
+.courseFormErrorInput, .courseFormErrorSelect {
+ border-color: red ;
}
-.suggestions li {
- padding: 8px;
- cursor: pointer;
+/* Adjusting list styles for better grid integration */
+.courseFormSuggestions, .courseFormTempList {
+ list-style: none ;
+ padding: 0 ;
+ width: 100% ;
+ position: absolute ;
+ z-index: 1000 ;
}
-.suggestions li:hover {
- background-color: #f0f0f0;
+.courseFormSuggestionsItem, .courseFormTempListItem {
+ padding: 8px ;
+ background-color: #fff ;
+ border: 1px solid #ddd ;
+ cursor: pointer ;
}
-.error-message {
- color: red;
- font-size: 12px;
+.courseFormSuggestionsItem:hover, .courseFormTempListItem:hover {
+ background-color: #f0f0f0 ;
}
-.error input {
- border-color: red;
+.courseFormRemoveFacultyBtn {
+ background: none ;
+ border: none ;
+ color: red ;
+ cursor: pointer ;
}
-
-
-@media (max-width: 768px) {
- .form-container {
- margin: 20px;
- padding: 15px;
- }
-
- h2 {
- font-size: 1.5rem;
- }
-
- button[type="submit"] {
- width: 100%;
- }
-}
-.remove-faculty-btn {
- padding: 0px 0px;
- background: none;
- border: none;
- color: red;
- cursor: pointer;
- font-size: 16px;
- margin-left: 10px;
-}
-
-.remove-faculty-btn:hover {
- color: darkred;
-}
\ No newline at end of file
diff --git a/client/src/Pages/CourseForm.jsx b/client/src/Pages/CourseForm.jsx
index 1b3490f..b1f5a60 100644
--- a/client/src/Pages/CourseForm.jsx
+++ b/client/src/Pages/CourseForm.jsx
@@ -2,6 +2,8 @@ import React, { useState, useEffect } from "react";
import { useLocation, useParams, useNavigate } from "react-router-dom";
import { fetchFaculties, saveAppointment, updateCourseStatus } from "../api";
import "./CourseForm.css";
+import "./Navbar.jsx";
+import Navbar from "./Navbar.jsx";
const CourseForm = () => {
const { id } = useParams();
@@ -146,156 +148,130 @@ const CourseForm = () => {
};
return (
-