Browse Source

feat: remove 0 case and show all "do you know details" questions regardless of previous answers

CLDC-1528-person-1-relationship-to-buyer-1
natdeanlewissoftwire 2 years ago
parent
commit
e4573f8b52
  1. 1
      app/models/form/sales/pages/person1_known.rb
  2. 6
      app/models/form/sales/pages/person2_known.rb
  3. 4
      app/models/form/sales/pages/person3_known.rb
  4. 2
      app/models/form/sales/pages/person4_known.rb
  5. 1
      app/views/form/headers/_person_1_known_page.erb

1
app/models/form/sales/pages/person1_known.rb

@ -2,7 +2,6 @@ class Form::Sales::Pages::Person1Known < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "person_1_known"
@header_partial = "person_1_known_page"
@header = ""
@description = ""
@subsection = subsection

6
app/models/form/sales/pages/person2_known.rb

@ -7,9 +7,9 @@ class Form::Sales::Pages::Person2Known < ::Form::Page
@description = ""
@subsection = subsection
@depends_on = [
{ "hholdcount" => 2, "details_known_1" => 1 },
{ "hholdcount" => 3, "details_known_1" => 1 },
{ "hholdcount" => 4, "details_known_1" => 1 },
{ "hholdcount" => 2 },
{ "hholdcount" => 3 },
{ "hholdcount" => 4 },
]
end

4
app/models/form/sales/pages/person3_known.rb

@ -7,8 +7,8 @@ class Form::Sales::Pages::Person3Known < ::Form::Page
@description = ""
@subsection = subsection
@depends_on = [
{ "hholdcount" => 3, "details_known_2" => 1 },
{ "hholdcount" => 4, "details_known_2" => 1 },
{ "hholdcount" => 3 },
{ "hholdcount" => 4 },
]
end

2
app/models/form/sales/pages/person4_known.rb

@ -7,7 +7,7 @@ class Form::Sales::Pages::Person4Known < ::Form::Page
@description = ""
@subsection = subsection
@depends_on = [
{ "hholdcount" => 4, "details_known_3" => 1 },
{ "hholdcount" => 4 },
]
end

1
app/views/form/headers/_person_1_known_page.erb

@ -1 +0,0 @@
You have given us the details for 0 of the <%= log.hholdcount %> other people in the household
Loading…
Cancel
Save