Do not use JS to initialize the schedule
- Only use JS for the drag&drop functionality and to the set/alter the time and rooms of the EventSchedule object. - Introduce has_many :events, through: :event_schedules association to get unscheduled event easily
This commit is contained in:
parent
cb9253ff07
commit
af75334353
12 changed files with 63 additions and 125 deletions
|
|
@ -23,7 +23,7 @@ module Admin
|
|||
@schedule_id = params[:id].to_i
|
||||
schedule = Schedule.find(@schedule_id)
|
||||
@event_schedules = schedule.event_schedules
|
||||
@unscheduled_events = @program.events - schedule.event_schedules
|
||||
@unscheduled_events = @program.events - schedule.events
|
||||
@selected_schedule_id = @conference.program.selected_schedule.try(:id)
|
||||
@dates = @conference.start_date..@conference.end_date
|
||||
@rooms = (@venue && @venue.rooms.any?) ? @venue.rooms : [Room.new(name: 'No Rooms!', size: 0)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue