Browse Source

Always display person known pages and update headers

pull/1249/head
Kat 3 years ago
parent
commit
484e3d851b
  1. 6
      app/models/form/sales/pages/person_known.rb
  2. 1
      app/views/form/headers/_person_1_known_page.erb
  3. 2
      app/views/form/headers/_person_2_known_page.erb
  4. 2
      app/views/form/headers/_person_3_known_page.erb
  5. 2
      app/views/form/headers/_person_4_known_page.erb
  6. 1
      app/views/form/headers/_person_5_known_page.erb

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

@ -12,10 +12,6 @@ class Form::Sales::Pages::PersonKnown < Form::Sales::Pages::Person
end
def depends_on
if @person_index == 2
(@person_index..6).map { |index| { "hhmemb" => index, "jointpur" => 2 } }
else
(@person_index..6).map { |index| { "hhmemb" => index } }
end
{ "jointpur" => 2 } if @person_index == 2
end
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

2
app/views/form/headers/_person_2_known_page.erb

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

2
app/views/form/headers/_person_3_known_page.erb

@ -1 +1 @@
You have given us the details for 2 of the <%= log.hholdcount %> other people in the household
You have given us the details for <%= log.joint_purchase? ? 0 : 1 %> of the <%= log.hholdcount %> other people in the household

2
app/views/form/headers/_person_4_known_page.erb

@ -1 +1 @@
You have given us the details for 3 of the <%= log.hholdcount %> other people in the household
You have given us the details for <%= log.joint_purchase? ? 1 : 2 %> of the <%= log.hholdcount %> other people in the household

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

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