Browse Source

Backfill scharge

pull/1254/head
Kat 3 years ago
parent
commit
05d389444d
  1. 6
      app/models/form/lettings/pages/rent_4_weekly.rb
  2. 6
      app/models/form/lettings/pages/rent_bi_weekly.rb
  3. 6
      app/models/form/lettings/pages/rent_monthly.rb
  4. 6
      app/models/form/lettings/pages/rent_weekly.rb
  5. 19
      app/models/form/lettings/questions/scharge_4_weekly.rb
  6. 19
      app/models/form/lettings/questions/scharge_bi_weekly.rb
  7. 2
      app/models/form/lettings/questions/scharge_monthly.rb
  8. 19
      app/models/form/lettings/questions/scharge_weekly.rb

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

@ -8,6 +8,10 @@ class Form::Lettings::Pages::Rent4Weekly < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::Brent4Weekly.new(nil, nil, self), Form::Lettings::Questions::Scharge.new(nil, nil, self), Form::Lettings::Questions::Pscharge.new(nil, nil, self), Form::Lettings::Questions::Supcharg.new(nil, nil, self), Form::Lettings::Questions::Tcharge.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::Brent4Weekly.new(nil, nil, self),
Form::Lettings::Questions::Scharge4Weekly.new(nil, nil, self),
Form::Lettings::Questions::Pscharge.new(nil, nil, self),
Form::Lettings::Questions::Supcharg.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
end end
end end

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

@ -8,6 +8,10 @@ class Form::Lettings::Pages::RentBiWeekly < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::BrentBiWeekly.new(nil, nil, self), Form::Lettings::Questions::Scharge.new(nil, nil, self), Form::Lettings::Questions::Pscharge.new(nil, nil, self), Form::Lettings::Questions::Supcharg.new(nil, nil, self), Form::Lettings::Questions::Tcharge.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::BrentBiWeekly.new(nil, nil, self),
Form::Lettings::Questions::SchargeBiWeekly.new(nil, nil, self),
Form::Lettings::Questions::Pscharge.new(nil, nil, self),
Form::Lettings::Questions::Supcharg.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
end end
end end

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

@ -8,6 +8,10 @@ class Form::Lettings::Pages::RentMonthly < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::BrentMonthly.new(nil, nil, self), Form::Lettings::Questions::Scharge.new(nil, nil, self), Form::Lettings::Questions::Pscharge.new(nil, nil, self), Form::Lettings::Questions::Supcharg.new(nil, nil, self), Form::Lettings::Questions::Tcharge.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::BrentMonthly.new(nil, nil, self),
Form::Lettings::Questions::SchargeMonthly.new(nil, nil, self),
Form::Lettings::Questions::Pscharge.new(nil, nil, self),
Form::Lettings::Questions::Supcharg.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
end end
end end

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

@ -8,6 +8,10 @@ class Form::Lettings::Pages::RentWeekly < ::Form::Page
end end
def questions def questions
@questions ||= [Form::Lettings::Questions::BrentWeekly.new(nil, nil, self), Form::Lettings::Questions::Scharge.new(nil, nil, self), Form::Lettings::Questions::Pscharge.new(nil, nil, self), Form::Lettings::Questions::Supcharg.new(nil, nil, self), Form::Lettings::Questions::Tcharge.new(nil, nil, self)] @questions ||= [Form::Lettings::Questions::BrentWeekly.new(nil, nil, self),
Form::Lettings::Questions::SchargeWeekly.new(nil, nil, self),
Form::Lettings::Questions::Pscharge.new(nil, nil, self),
Form::Lettings::Questions::Supcharg.new(nil, nil, self),
Form::Lettings::Questions::Tcharge.new(nil, nil, self)]
end end
end end

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

@ -0,0 +1,19 @@
class Form::Lettings::Questions::Scharge4Weekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@check_answer_label = "Service charge"
@header = "What is the service charge?"
@type = "numeric"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 4 weeks"
end
end

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

@ -0,0 +1,19 @@
class Form::Lettings::Questions::SchargeBiWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@check_answer_label = "Service charge"
@header = "What is the service charge?"
@type = "numeric"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every 2 weeks"
end
end

2
app/models/form/lettings/questions/scharge.rb → app/models/form/lettings/questions/scharge_monthly.rb

@ -1,4 +1,4 @@
class Form::Lettings::Questions::Scharge < ::Form::Question class Form::Lettings::Questions::SchargeMonthly < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "scharge" @id = "scharge"

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

@ -0,0 +1,19 @@
class Form::Lettings::Questions::SchargeWeekly < ::Form::Question
def initialize(id, hsh, page)
super
@id = "scharge"
@check_answer_label = "Service charge"
@header = "What is the service charge?"
@type = "numeric"
@width = 5
@check_answers_card_number = 0
@min = 0
@hint_text = "For example, for cleaning. Households may receive housing benefit or Universal Credit towards the service charge."
@step = 0.01
@fields_to_add = %w[brent scharge pscharge supcharg]
@result_field = "tcharge"
@hidden_in_check_answers = true
@prefix = "£"
@suffix = " every week"
end
end
Loading…
Cancel
Save