Skip to content
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

Adds display error for scheduler #223

Closed
wants to merge 1 commit into from

Conversation

TimothyClayton
Copy link

@TimothyClayton TimothyClayton commented Jun 10, 2019

WIP
Displays error for patchTimeSlot calls (TimeSlotsController#update)

Testing Notes:

To force error on drag/drop, replace the update action in staff/grids/time_slots_controller with the below:

  def update
    @time_slot.errors.add(:conference_day, "is unavailable")
    @time_slot.errors.add(:start_time, "is too early in the morning")

    respond_to do |format|
      format.json { render json: update_response.merge({ errors: @time_slot.errors.full_messages, status: :bad_request }) }
    end
  rescue StandardError => e
    render json: update_response.merge({errors: ["There was a problem updating this time slot."], status: 500})
  end

@TimothyClayton TimothyClayton added the WIP Work In Progress label Jun 10, 2019
@TimothyClayton TimothyClayton added WIP Work In Progress and removed WIP Work In Progress labels Jun 10, 2019
@TimothyClayton
Copy link
Author

For whatever reason, this pull request was not registering my commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants