Browse Source

fix routing

pull/213/head
Kat 4 years ago
parent
commit
e9abf48486
  1. 1
      app/models/case_log.rb
  2. 2
      app/models/form/page.rb
  3. 79
      config/forms/2021_2022.json

1
app/models/case_log.rb

@ -136,6 +136,7 @@ class CaseLog < ApplicationRecord
enum la_known: POLAR, _suffix: true
enum net_income_known: NET_INCOME_KNOWN, _suffix: true
enum nocharge: POLAR3, _suffix: true
enum is_carehome: POLAR, _suffix: true
AUTOGENERATED_FIELDS = %w[id status created_at updated_at discarded_at].freeze
OPTIONAL_FIELDS = %w[postcode_known la_known first_time_property_let_as_social_housing].freeze

2
app/models/form/page.rb

@ -34,7 +34,7 @@ private
depends_on.any? do |conditions_set|
conditions_set.all? do |question, value|
!case_log[question].nil? && case_log[question] == value
value.nil? ? case_log[question] == value : !case_log[question].nil? && case_log[question] == value
end
end
end

79
config/forms/2021_2022.json

@ -2291,6 +2291,55 @@
"period": "9. Weekly for 46 weeks",
"nocharge": null,
"is_carehome": "No"
},
{
"period": "1. Weekly for 52 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "1. Weekly for 52 weeks",
"nocharge": null,
"is_carehome": null
},{
"period": "5. Weekly for 50 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "5. Weekly for 50 weeks",
"nocharge": null,
"is_carehome": null
},{
"period": "6. Weekly for 49 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "6. Weekly for 49 weeks",
"nocharge": null,
"is_carehome": null
},{
"period": "7. Weekly for 48 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "7. Weekly for 48 weeks",
"nocharge": null,
"is_carehome": null
},{
"period": "8. Weekly for 47 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "8. Weekly for 47 weeks",
"nocharge": null,
"is_carehome": null
},{
"period": "9. Weekly for 46 weeks",
"nocharge": "Yes",
"is_carehome": null
},{
"period": "9. Weekly for 46 weeks",
"nocharge": null,
"is_carehome": null
}
]
},
@ -2367,6 +2416,15 @@
"nocharge": null,
"period": "2. Every 2 weeks",
"is_carehome": "No"
},
{
"nocharge": "Yes",
"period": "2. Every 2 weeks",
"is_carehome": null
},{
"nocharge": null,
"period": "2. Every 2 weeks",
"is_carehome": null
}]
},
"rent_4_weekly": {
@ -2442,6 +2500,15 @@
"nocharge": null,
"period": "3. Every 4 weeks",
"is_carehome": "No"
},
{
"nocharge": "Yes",
"period": "3. Every 4 weeks",
"is_carehome": null
},{
"nocharge": null,
"period": "3. Every 4 weeks",
"is_carehome": null
}]
},
"rent_monthly": {
@ -2517,7 +2584,17 @@
"nocharge": null,
"period": "4. Every calendar month",
"is_carehome": "No"
}]
},
{
"nocharge": "Yes",
"period": "4. Every calendar month",
"is_carehome": null
},{
"nocharge": null,
"period": "4. Every calendar month",
"is_carehome": null
}
]
},
"rent_shortfall":{
"header": "",

Loading…
Cancel
Save