Class: DeliveryLogistics

Inherits:
Object
  • Object
show all
Includes:
DataFactory, DateFactory, Foundry, StringFactory, Workflows
Defined in:
lib/sambal-kuali/data_objects/activity_offering.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Workflows

#go_to_academic_calendar, #go_to_calendar_search, #go_to_create_course_offerings, #go_to_create_population, #go_to_display_schedule_of_classes, #go_to_holiday_calendar, #go_to_manage_course_offerings, #go_to_manage_population, #go_to_perform_rollover, #go_to_rollover_details, #log_in, #logged_in_user

Constructor Details

#initialize(browser, opts = {}) ⇒ DeliveryLogistics

Returns a new instance of DeliveryLogistics.



386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 386

def initialize(browser, opts={})
  @browser = browser

  defaults = {
      :tba  => false,
      :days  => "MWF",
      :start_time  => "01:00",
      :start_time_ampm  => "pm",
      :end_time  => "02:00",
      :end_time_ampm  => "pm",
      :facility  => "ARM",
      :facility_long_name  => "Reckord Armory",
      :room  => "126",
      :features_list  => [],
      :process => true
  }
  options = defaults.merge(opts)
  set_options(options)
end

Instance Attribute Details

#daysObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def days
  @days
end

#end_timeObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def end_time
  @end_time
end

#end_time_ampmObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def end_time_ampm
  @end_time_ampm
end

#facilityObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def facility
  @facility
end

#facility_long_nameObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def facility_long_name
  @facility_long_name
end

#features_listObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def features_list
  @features_list
end

#processObject Also known as: process?

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def process
  @process
end

#roomObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def room
  @room
end

#start_timeObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def start_time
  @start_time
end

#start_time_ampmObject

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def start_time_ampm
  @start_time_ampm
end

#tbaObject Also known as: tba?

boolean



371
372
373
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 371

def tba
  @tba
end

Instance Method Details

#add_logistics_requestObject



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 406

def add_logistics_request
  on DeliveryLogisticsEdit do |page|
    if @tba
      page.add_tba.set
    else
      page.add_tba.clear
    end

    page.add_days.set @days
    page.add_start_time.set @start_time
    page.add_start_time_ampm.select @start_time_ampm
    page.add_end_time.set @end_time
    page.add_end_time_ampm.select @end_time_ampm
    page.add_facility.set @facility
    page.add_room.set @room
    #page.facility_features TODO: later, facility features persistence not implemented yet
    page.add
  end

end

#saveObject



433
434
435
436
437
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 433

def save
  on DeliveryLogisticsEdit do |page|
    page.save
  end
end

#save_and_processObject



427
428
429
430
431
# File 'lib/sambal-kuali/data_objects/activity_offering.rb', line 427

def save_and_process
  on DeliveryLogisticsEdit do |page|
    page.save_and_process_request
  end
end