CSC/ECE 517 Spring 2025 - E2504. Mentor-meeting management

From Expertiza_Wiki
Revision as of 20:46, 23 March 2025 by Jmwinte3 (talk | contribs)
Jump to navigation Jump to search

Background

Manual mentor assignment was inefficient. Auto-assignment was implemented.

Project Overview

Enhance mentor management in Expertiza.

Challenges

  • No email notifications for mentor assignments.
  • Poor team listing clarity.

Tasks

Email Notifications

Implement email notifications.

Mentor Meeting Management

Improve mentor meeting view.

Backend and Controller Updates

Update backend logic.

Refactor Existing Codebase

Clean and standardize code.

Testing and Validation

Test and validate changes.

Implementation

Email Notifications

  • Code and explanation for email notifications.

Mentor Meeting Management

Enhanced team table with dynamic columns and meeting management.

Backend and Controller Updates

Backend restructured for efficiency. Added destroy route and meetings controller.

  1. POST /meetings
 def create
   @team = Team.find(params[:team_id])
   @meeting = @team.meetings.new(meeting_params)
   if @meeting.save
     # TODO: Re-implement email notification for meeting creation
     render json: { status: 'success', message: 'Meeting date added' }, status: :created
   else
     render json: { status: 'error', message: 'Unable to add meeting date', errors: @meeting.errors.full_messages }, status: :unprocessable_entity
   end
 end

 # DELETE /meetings/:id
 def destroy
   puts "Team ID: #{params[:team_id]}"
   puts "Meeting ID: #{params[:id]}"
   puts "Meeting: #{@meeting.inspect}"
   if @meeting.destroy
     render json: { message: 'Meeting deleted successfully' }, status: :ok
   else
     render json: { error: 'Failed to delete meeting' }, status: :unprocessable_entity
   end
 end

The original code did not adhere to standard CRUD (Create, Read, Update, Delete) naming conventions, leading to a complete rework to align with these established practices for better maintainability and clarity.

Refactor Existing Codebase

Cleaned and standardized codebase.

Testing and Validation

Relevant Links

Team

Mentor

   Ed Gehringer

Members

   Jacob Winters
   Alex Wakefield
   John Buchanan