-
Notifications
You must be signed in to change notification settings - Fork 6
Group b/sprint3 #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rithwik-d
wants to merge
23
commits into
main
Choose a base branch
from
GroupB/Sprint3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Group b/sprint3 #142
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
539baff
Added Id, Name and Address to Form A.3
rithwik-d fc7648f
Merge branch 'GroupB/development' of https://github.com/IPMS-Project/…
rithwik-d 1c5db44
Updated emailIntegration for Form A.3
rithwik-d 04457fe
Read Only Fields for Internship Advisor Details
lumry c5f64c9
Read Only Fields for Internship Advisor Details
lumry 93f8b24
Implemented A.3 form reminder system with daily cron job
subhashchandra001 b7806b0
Read Only Fields for Internship Advisor Details
rithwik-d 48c0619
Merge branch 'GroupB/development' of https://github.com/IPMS-Project/…
rithwik-d 4f47cd5
Sprint 3: Evaluation Submission Flow implemented (Form A.3)
ttabirami12062 9ddeb57
Updated Evaluation.js schema for Sprint 3: Form A.3 submission flow
ttabirami12062 e230980
Merged GroupB/development into GroupB/ReminderSystem
subhashchandra001 a6f349f
Resolve conflict 1
rithwik-d 9b4743a
Resolved Conflicts
rithwik-d 2280da1
Merge branch 'main' into GroupB/Sprint3
rithwik-d 8903b40
Build Error
rithwik-d 5cef0c2
Deleted package.json
rithwik-d 81826e4
Resolved Conflicts in index.js and Evaluation.js
rithwik-d 6ac1a53
Merge branch 'main' into GroupB/Sprint3
rithwik-d de910d4
Resolved Error
rithwik-d a5d8cfa
Merge branch 'GroupB/Sprint3' of https://github.com/IPMS-Project/IPMS…
rithwik-d b530184
Merge remote-tracking branch 'origin/main' into GroupB/Sprint3
rithwik-d 31ab27e
resolved conflicts
rithwik-d 30cde38
Merge branch 'main' into GroupB/Sprint3
subhashchandra001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,12 @@ const fourWeekReportRoutes = require("./routes/fourWeekReportRoutes"); | |
| const path = require("path"); | ||
|
|
||
|
|
||
|
|
||
| const cronJobRoutes = require("./routes/cronJobRoutes"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. u are not using these imports anywhere in the file. so remove. |
||
|
|
||
| // Author Subhash Chandra: Form A3 Reminder Job Logic | ||
| const { registerReminderA3Job } = require("./utils/reminderA3Utils"); | ||
|
|
||
| const app = express(); | ||
| app.use(express.json()); | ||
| app.use(cors()); | ||
|
|
@@ -94,9 +100,7 @@ app.post("/api/createUser", async (req, res) => { | |
| res.status(201).json({ message: "User created successfully", user }); | ||
| } catch (error) { | ||
| console.error("Error creating user:", error); | ||
| res | ||
| .status(500) | ||
| .json({ message: "Failed to create user", error: error.message }); | ||
| res.status(500).json({ message: "Failed to create user", error: error.message }); | ||
| } | ||
| }); | ||
|
|
||
|
|
@@ -139,9 +143,6 @@ app.post("/api/evaluation", async (req, res) => { | |
| } | ||
| }); | ||
|
|
||
|
|
||
|
|
||
|
|
||
| //Form A.4 | ||
| const presentationRoutes = require("./routes/presentationRoutes"); | ||
| app.use("/api/presentation", presentationRoutes); | ||
|
|
@@ -159,4 +160,4 @@ process.on("SIGINT", async () => { | |
| }); | ||
|
|
||
| const PORT = process.env.PORT || 5001; | ||
| app.listen(PORT, () => console.log(`Server running on port ${PORT}`)); | ||
| app.listen(PORT, () => console.log(`Server running on port ${PORT}`)); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,12 @@ | ||
| const CronJob = require("../models/CronJob"); | ||
| const { coordinatorReminder, supervisorReminder } = require("./reminderEmail"); | ||
|
|
||
| // Import ALL required reminder jobs from all branches | ||
| const { | ||
| coordinatorReminder, | ||
| supervisorReminder, | ||
| evaluationReminder, | ||
| } = require("./reminderEmail"); | ||
|
|
||
| const { checkAndSendReminders } = require("./tokenExpiryCheck"); | ||
| const autoDeactivateCronjobs = require("./autoDeactivateCronjobs"); | ||
|
|
||
|
|
@@ -26,6 +33,10 @@ async function getCronJobs() { | |
| schedule: job.schedule, | ||
| job: async () => { | ||
| try { | ||
| await CronJob.findByIdAndUpdate(job._id, { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. repeated twice |
||
| lastRun: new Date(), | ||
| }); | ||
| await jobFunctions[job.name](); | ||
| // Update last execution time | ||
| await CronJob.findByIdAndUpdate(job._id, { | ||
| lastRun: new Date(), | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| const express = require('express'); | ||
| const router = express.Router(); | ||
| const Evaluation = require('../models/Evaluation'); | ||
|
|
||
| // POST: Submit Evaluation Form A.3 | ||
| router.post('/submit', async (req, res) => { | ||
| try { | ||
| const data = req.body; | ||
|
|
||
| // Basic validation: required fields check | ||
| if ( | ||
| !data.interneeName || | ||
| !data.interneeID || | ||
| !data.interneeEmail || | ||
| !data.evaluations || | ||
| data.evaluations.length !== 3 | ||
| ) { | ||
| return res.status(400).json({ message: 'Missing required fields or invalid number of evaluations' }); | ||
| } | ||
|
|
||
| const evaluation = new Evaluation({ | ||
| interneeName: data.interneeName, | ||
| interneeID: data.interneeID, | ||
| interneeEmail: data.interneeEmail, | ||
| evaluations: data.evaluations, | ||
| advisorSignature: data.advisorSignature, | ||
| advisorAgreement: data.advisorAgreement, | ||
| coordinatorSignature: data.coordinatorSignature, | ||
| coordinatorAgreement: data.coordinatorAgreement, | ||
| status: 'submitted', | ||
| submittedAt: new Date() | ||
| }); | ||
|
|
||
| await evaluation.save(); | ||
| res.status(201).json({ message: 'Evaluation submitted successfully' }); | ||
|
|
||
| } catch (err) { | ||
| console.error('Error submitting evaluation:', err); | ||
| res.status(500).json({ error: 'Internal server error' }); | ||
| } | ||
| }); | ||
|
|
||
| module.exports = router; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess u are not using this, so remove.