Email css, faculty consolidated-table

This commit is contained in:
Harshitha Shetty
2025-01-29 02:52:43 +05:30
parent fbba4028cb
commit 2c1f7bec7b
4 changed files with 37 additions and 14 deletions

View File

@@ -23,7 +23,9 @@ router.get("/consolidated-table", async (req, res) => {
courseName: appointment.courseName,
semester: "",
examType: "",
year: "",
academicYear: appointment.academicYear, // Added from appointment
examPeriod: appointment.examPeriod, // Added from appointment
program: "",
marks: "100+25", // Dummy value, replace with actual logic
affiliation: "KJSCE", // Replace with actual value
qualification: "M.E.", // Replace with actual value
@@ -40,7 +42,7 @@ router.get("/consolidated-table", async (req, res) => {
if (course) {
data.semester = course.semester;
data.examType = course.scheme;
data.year = course.program;
data.program = course.program;
}
});
@@ -51,7 +53,9 @@ router.get("/consolidated-table", async (req, res) => {
courseCode: data.courseId,
courseName: data.courseName,
examType: data.examType,
year: data.year,
academicYear: data.academicYear,
examPeriod : data.examPeriod,
program : data.program,
marks: data.marks,
Name: data.facultyName,
affiliation: data.affiliation,

View File

@@ -38,17 +38,27 @@ router.post("/", upload.single("file"), async (req, res) => {
// Email options
const mailOptions = {
from: "swdc.ate@gmail.com", // Replace with your email
from: "SWDC Admin <swdc.ate@gmail.com>", // Replace with your email
to: recipientEmail,
subject: `Excel File for ${teacher}`,
text: `Attached is the Excel file for ${teacher}.`,
subject: `Examination Appointments for ${teacher}`,
text: `Dear Sir/Madam,
Please find attached the Excel sheet regarding various appointments for the May-June 2024 Examination. Kindly find the tick mark (√) for the respective appointments.
Note: Kindly download the Excel sheet to view the hidden columns referring to the Scheme and other information.
If you have any queries, please contact the H.O.D or the Examination In-charge.
Your cooperation regarding the upcoming examination duties is highly solicited.`,
attachments: [
{
filename: fileName,
path: req.file.path, // Use the uploaded file's path
},
{
filename: fileName,
path: req.file.path, // Use the uploaded file's path
},
],
};
};
try {
// Send email