Skip to content

When no available consultations email professor

Implemented a student-only feature that allows students to request a consultation slot when a professor has no active consultations scheduled.

Closes #26

Changes Made

Student Consultation Page

  • Added a consultation slot request form to the empty-state view shown when a professor has no regular or one-time consultations.
  • Added a required textarea where students provide a reason for requesting a consultation.

Controller

  • Added a new endpoint: POST /consultations/request-slot
  • Restricted the action to authenticated students.

Service Layer

  • Added a new service method for processing consultation slot requests: requestConsultationSlot(…)
  • Implemented validation to ensure that the request reason is mandatory.

Notification Service

  • Added a new notification method: notifyProfessorAboutConsultationSlotRequest(...)
  • Reused the existing email notification infrastructure.

Email Notifications

  • Added a new email subject: SUBJECT_CONSULTATION_SLOT_REQUEST
  • Added a new email template: consultation-slot-request-template
  • Included the following information in the email: Student name, student index, student email, consultation request reason

Merge request reports

Loading