Browse Source

Backfill tcharge

pull/1254/head
Kat 3 years ago
parent
commit
1fe9a969e1
  1. 2
      app/models/form/lettings/pages/rent_4_weekly.rb
  2. 2
      app/models/form/lettings/pages/rent_bi_weekly.rb
  3. 2
      app/models/form/lettings/pages/rent_monthly.rb
  4. 2
      app/models/form/lettings/pages/rent_weekly.rb
  5. 19
      app/models/form/lettings/questions/tcharge_4_weekly.rb
  6. 19
      app/models/form/lettings/questions/tcharge_bi_weekly.rb
  7. 2
      app/models/form/lettings/questions/tcharge_monthly.rb
  8. 19
      app/models/form/lettings/questions/tcharge_weekly.rb

2
app/models/form/lettings/pages/rent_4_weekly.rb

@ -12,6 +12,6 @@ class Form::Lettings::Pages::Rent4Weekly < ::Form::Page
Form::Lettings::Questions::Scharge4Weekly.new(nil, nil, self),
Form::Lettings::Questions::Pscharge4Weekly.new(nil, nil, self),
Form::Lettings::Questions::Supcharg4Weekly.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
Form::Lettings::Questions::Tcharge4Weekly.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/rent_bi_weekly.rb

@ -12,6 +12,6 @@ class Form::Lettings::Pages::RentBiWeekly < ::Form::Page
Form::Lettings::Questions::SchargeBiWeekly.new(nil, nil, self),
Form::Lettings::Questions::PschargeBiWeekly.new(nil, nil, self),
Form::Lettings::Questions::SupchargBiWeekly.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
Form::Lettings::Questions::TchargeBiWeekly.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/rent_monthly.rb

@ -12,6 +12,6 @@ class Form::Lettings::Pages::RentMonthly < ::Form::Page
Form::Lettings::Questions::SchargeMonthly.new(nil, nil, self),
Form::Lettings::Questions::PschargeMonthly.new(nil, nil, self),
Form::Lettings::Questions::SupchargMonthly.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
Form::Lettings::Questions::TchargeMonthly.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/rent_weekly.rb

@ -12,6 +12,6 @@ class Form::Lettings::Pages::RentWeekly < ::Form::Page
Form::Lettings::Questions::SchargeWeekly.new(nil, nil, self),
Form::Lettings::Questions::PschargeWeekly.new(nil, nil, self),
Form::Lettings::Questions::SupchargWeekly.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
Form::Lettings::Questions::TchargeWeekly.new(nil, nil, self)]
end
end

19
app/models/form/lettings/questions/tcharge_4_weekly.rb

@ -0,0 +1,19 @@
class Form::Lettings::Questions::Tcharge4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@check_answer_label = "Household rent and charges"
@header = "Total charge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "This is the total for rent and all charges."
@step = 0.01
@readonly = true
@prefix = "£"
@suffix = " every 4 weeks"
@requires_js = true
@fields_added = %w[brent scharge pscharge supcharg]
end
end

19
app/models/form/lettings/questions/tcharge_bi_weekly.rb

@ -0,0 +1,19 @@
class Form::Lettings::Questions::TchargeBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@check_answer_label = "Household rent and charges"
@header = "Total charge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "This is the total for rent and all charges."
@step = 0.01
@readonly = true
@prefix = "£"
@suffix = " every 2 weeks"
@requires_js = true
@fields_added = %w[brent scharge pscharge supcharg]
end
end

2
app/models/form/lettings/questions/tcharge.rb → app/models/form/lettings/questions/tcharge_monthly.rb

@ -1,4 +1,4 @@
class Form::Lettings::Questions::Tcharge < ::Form::Question
class Form::Lettings::Questions::TchargeMonthly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"

19
app/models/form/lettings/questions/tcharge_weekly.rb

@ -0,0 +1,19 @@
class Form::Lettings::Questions::TchargeWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "tcharge"
@check_answer_label = "Household rent and charges"
@header = "Total charge"
@type = "numeric_output"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "This is the total for rent and all charges."
@step = 0.01
@readonly = true
@prefix = "£"
@suffix = " every week"
@requires_js = true
@fields_added = %w[brent scharge pscharge supcharg]
end
end
Loading…
Cancel
Save