This commit is contained in:
amNobodyyy
2025-01-24 01:17:38 +05:30
parent add7192ccf
commit 1738012aa1
2 changed files with 2 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ const ConsolidatedTable = () => {
const handleSendEmail = async (teacher, teacherData) => { 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; // This assumes all rows for a teacher have the same facultyId
console.log(facultyId);
try { try {
// Fetch email from the backend // Fetch email from the backend
const response = await axios.get( const response = await axios.get(
@@ -325,7 +325,6 @@ const ConsolidatedTable = () => {
> >
{uniqueTeachers.map((teacher, index) => { {uniqueTeachers.map((teacher, index) => {
const teacherData = data.filter((row) => row.Name === teacher); const teacherData = data.filter((row) => row.Name === teacher);
return ( return (
<div key={index} style={{ marginBottom: "20px" }}> <div key={index} style={{ marginBottom: "20px" }}>
<h2 style={{ textAlign: "center" }}>{teacher}'s Table</h2> <h2 style={{ textAlign: "center" }}>{teacher}'s Table</h2>

View File

@@ -63,7 +63,7 @@ router.get("/consolidated-table", async (req, res) => {
paperSetting: data.tasks.has("paperSetting") ? "✔" : "", paperSetting: data.tasks.has("paperSetting") ? "✔" : "",
moderation: data.tasks.has("moderation") ? "✔" : "", moderation: data.tasks.has("moderation") ? "✔" : "",
pwdPaperSetting: data.tasks.has("pwdPaperSetter") ? "✔" : "", pwdPaperSetting: data.tasks.has("pwdPaperSetter") ? "✔" : "",
key: `${data.facultyId}` facultyId: `${data.facultyId}`
})); }));
res.status(200).json(tableData); res.status(200).json(tableData);