Class: Achoo::Achievo::HourRegistrationFormRanged

Inherits:
HourRegistrationForm show all
Defined in:
lib/achoo/achievo/hour_registration_form_ranged.rb

Instance Method Summary collapse

Methods inherited from HourRegistrationForm

#all_projects, #billing=, #billing_options, #collect_options, #get_all_projects, #hours=, #phase, #phase=, #phases_for_selected_project, #print_values, #project, #project=, #recent_projects, #remark=, #submit, #workperiod=, #worktime_periods

Constructor Details

#initializeHourRegistrationFormRanged

Returns a new instance of HourRegistrationFormRanged.



9
10
11
12
13
14
15
16
# File 'lib/achoo/achievo/hour_registration_form_ranged.rb', line 9

def initialize
  super
  @page = AGENT.get(atk_submit_to_url(@page.link_with(:text => 'Select range').href))
  @form = @page.form('entryform')

  # Need to preselect this for some reason. FIX duplicated in super 
  @form.field_with(:name => 'billpercent').options.first.select
end

Instance Method Details

#dateObject



23
24
25
# File 'lib/achoo/achievo/hour_registration_form_ranged.rb', line 23

def date
  [super, to_date()]
end

#date=(date_range) ⇒ Object



18
19
20
21
# File 'lib/achoo/achievo/hour_registration_form_ranged.rb', line 18

def date=(date_range)
  super(date_range[0])
  self.to_date = date_range[1]
end