Skip to content

[Sprint 2 - Task 4] Coordinator Approval & Rejection with Email Notifications + Logging#80

Merged
Kamal-Poshala merged 88 commits intoteam-a/developmentfrom
teama/4
Apr 13, 2025
Merged

[Sprint 2 - Task 4] Coordinator Approval & Rejection with Email Notifications + Logging#80
Kamal-Poshala merged 88 commits intoteam-a/developmentfrom
teama/4

Conversation

@Kamal-Poshala
Copy link
Contributor

✨ Summary

This pull request implements Task 4 from Sprint 2 for Team A:

  • ✅ Adapted approval and rejection functionality from the supervisor dashboard
  • ✅ Integrated confirmation dialogs and required rejection reason (via prompt)
  • ✅ Triggered email notifications to:
    • Student (ouEmail)
    • Academic Advisor (academicAdvisor)
    • Coordinator (hardcoded: coordinator@ipms.edu)
  • ✅ Logged all approvals and rejections in server/logs/coordinatorActions.log

🛠️ Implementation Highlights

  • Replaced dummy request logic with MongoDB integration using usertokenrequests collection
  • Updated backend endpoints:
    • POST /api/coordinator/requests/:id/approve
    • POST /api/coordinator/requests/:id/reject
  • Used existing emailService.js to handle outgoing notifications
  • Created a new log file to track all coordinator actions

🧪 Testing

  • Tested both approval and rejection flows with:
    • Local MongoDB data
    • Valid email .env configuration
  • Verified log file updates and email success responses
  • Checked error handling for invalid IDs and empty rejection reasons

📂 Files Modified

  • server/routes/coordinator.js
  • client/src/pages/CoordinatorDashboard.js
  • server/logs/coordinatorActions.log

📌 Notes

  • Coordinator email is currently hardcoded (coordinator@ipms.edu)

Ready for review and merge into team-a/development branch ✅

DHANUSHWI and others added 30 commits March 31, 2025 19:46
…ropdown styling and adjusted role card padding
…: - Renamed form fields to match DB field names, - Updated API payload to include semester and academicAdvisor, - Reset all form fields after successful signup
@Kamal-Poshala Kamal-Poshala self-assigned this Apr 11, 2025
@Kamal-Poshala Kamal-Poshala added the Group A Coordinator Approval label Apr 11, 2025
@Kamal-Poshala
Copy link
Contributor Author

i will update this branch with latest changes. i didn't notice as the changes were made just yesterday.

@Kamal-Poshala Kamal-Poshala merged commit 1eeae10 into team-a/development Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Group A Coordinator Approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.