Browse Source

feat: fix income duplication bug, add numbers to other questions

pull/1381/head
natdeanlewissoftwire 3 years ago
parent
commit
1f2898a3b0
  1. 9
      app/models/form/sales/questions/buyer1_income_known.rb
  2. 9
      app/models/form/sales/questions/buyer2_income_known.rb
  3. 1
      app/models/form/sales/questions/other_nationality1.rb
  4. 1
      app/models/form/sales/questions/other_ownership_type.rb
  5. 1
      app/models/form/sales/questions/property_local_authority.rb
  6. 1
      app/models/form/sales/questions/property_local_authority_known.rb

9
app/models/form/sales/questions/buyer1_income_known.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer1IncomeKnown < ::Form::Question
def initialize(id, hsh, page)
super
@id = "income1nk"
@check_answer_label = "Buyer 1’s gross annual income"
@check_answer_label = "Buyer 1’s gross annual income known?"
@header = "Do you know buyer 1’s annual income?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@ -11,6 +11,13 @@ class Form::Sales::Questions::Buyer1IncomeKnown < ::Form::Question
}
@check_answers_card_number = 1
@question_number = 67
@hidden_in_check_answers = {
"depends_on" => [
{
"income1nk" => 0,
},
],
}
end
ANSWER_OPTIONS = {

9
app/models/form/sales/questions/buyer2_income_known.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer2IncomeKnown < ::Form::Question
def initialize(id, hsh, page)
super
@id = "income2nk"
@check_answer_label = "Buyer 2’s gross annual income"
@check_answer_label = "Buyer 2’s gross annual income known?"
@header = "Do you know buyer 2’s annual income?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@ -11,6 +11,13 @@ class Form::Sales::Questions::Buyer2IncomeKnown < ::Form::Question
}
@check_answers_card_number = 2
@question_number = 69
@hidden_in_check_answers = {
"depends_on" => [
{
"income2nk" => 0,
},
],
}
end
ANSWER_OPTIONS = {

1
app/models/form/sales/questions/other_nationality1.rb

@ -6,5 +6,6 @@ class Form::Sales::Questions::OtherNationality1 < ::Form::Question
@header = "Nationality"
@type = "text"
@check_answers_card_number = 1
@question_number = 24
end
end

1
app/models/form/sales/questions/other_ownership_type.rb

@ -6,5 +6,6 @@ class Form::Sales::Questions::OtherOwnershipType < ::Form::Question
@header = "What type of sale is it?"
@type = "text"
@width = 10
@question_number = 6
end
end

1
app/models/form/sales/questions/property_local_authority.rb

@ -6,6 +6,7 @@ class Form::Sales::Questions::PropertyLocalAuthority < ::Form::Question
@header = "What is the local authority of the property?"
@type = "select"
@answer_options = ANSWER_OPTIONS
@question_number = 16
end
ANSWER_OPTIONS = {

1
app/models/form/sales/questions/property_local_authority_known.rb

@ -14,6 +14,7 @@ class Form::Sales::Questions::PropertyLocalAuthorityKnown < ::Form::Question
},
],
}
@question_number = 16
end
ANSWER_OPTIONS = {

Loading…
Cancel
Save