Browse Source

Cldc 632 fixes (#220)

* Fix up form for income and benefits

Co-authored-by: dushan-madetech <dushan@madetech.com>

* Fix subsection label for check your answers page

Co-authored-by: dushan-madetech <dushan@madetech.com>

* fix breadcrumb text

* schema update

* Fix numeric income question widths

Co-authored-by: dushan-madetech <dushan@madetech.com>
pull/223/head
kosiakkatrina 3 years ago committed by GitHub
parent
commit
c58c346c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/views/form/check_answers.html.erb
  2. 61
      config/forms/2021_2022.json
  3. 2
      db/schema.rb

4
app/views/form/check_answers.html.erb

@ -1,12 +1,12 @@
<% content_for :title, "#{subsection.id.humanize} - Check your answers" %>
<% breadcrumbs = { "Logs" => "/logs", "Log" => "/logs/" + @case_log.id.to_s, subsection.id.humanize => "" } %>
<% breadcrumbs = { "Logs" => "/logs", "Log" => "/logs/" + @case_log.id.to_s, subsection.label => "" } %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: breadcrumbs) %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters-from-desktop">
<h1 class="govuk-heading-l">
<span class="govuk-caption-l"><%= subsection.id.humanize %></span>
<span class="govuk-caption-l"><%= subsection.label %></span>
Check your answers
</h1>

61
config/forms/2021_2022.json

@ -1870,6 +1870,7 @@
"type": "numeric",
"min": 0,
"step": "1",
"width": 5,
"prefix": "£",
"suffix": "every week"
}
@ -1896,6 +1897,7 @@
"type": "numeric",
"min": 0,
"step": "1",
"width": 5,
"prefix": "£",
"suffix": "every month"
}
@ -1922,6 +1924,7 @@
"type": "numeric",
"min": 0,
"step": "1",
"width": 5,
"prefix": "£",
"suffix": "every year"
}
@ -1995,41 +1998,6 @@
"depends_on": [{ "needstype": "Supported housing" }]
},
"rent_period": {
"header": "",
"description": "",
"questions": {
"period": {
"check_answer_label": "Rent Period",
"header": "How often does the household pay rent and other charges?",
"hint_text": "",
"type": "radio",
"answer_options": {
"0": "Calendar monthly",
"1": "Fortnightly",
"2": "Four-weekly",
"3": "Weekly for 46 weeks",
"4": "Weekly for 47 weeks",
"5": "Weekly for 48 weeks",
"6": "Weekly for 49 weeks",
"7": "Weekly for 50 weeks",
"8": "Weekly for 52 weeks",
"9": "Weekly for 53 weeks"
}
}
},
"depends_on" : [{
"nocharge": "Yes"
},{
"nocharge": null
}]
}
}
},
"rent": {
"label": "Rent",
"depends_on": [{ "about_this_log": "completed" }],
"pages": {
"rent": {
"header": "",
"description": "",
"questions": {
@ -2257,6 +2225,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every week",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2269,6 +2238,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every week",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2281,6 +2251,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every week",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2293,6 +2264,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every week",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2305,6 +2277,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every week",
"readonly": true,
@ -2422,6 +2395,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 2 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2434,6 +2408,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 2 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2446,6 +2421,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 2 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2458,6 +2434,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 2 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2470,6 +2447,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 2 weeks",
"readonly": true,
@ -2506,6 +2484,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 4 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2518,6 +2497,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 4 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2530,6 +2510,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 4 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2542,6 +2523,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 4 weeks",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2554,6 +2536,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every 4 weeks",
"readonly": true,
@ -2590,6 +2573,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every month",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2602,6 +2586,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every month",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2614,6 +2599,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every month",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2626,6 +2612,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every month",
"fields-to-add": ["brent", "scharge", "pscharge", "supcharg"],
@ -2638,6 +2625,7 @@
"type": "numeric",
"min": 0,
"step": 1,
"width": 5,
"prefix": "£",
"suffix": "every month",
"readonly": true,
@ -2691,7 +2679,8 @@
"hint_text": "Give an estimated amount if you don't know the exact figure.",
"type": "numeric",
"min": 0,
"step": 1
"step": 1,
"width": 5
}
},
"depends_on": [{"has_benefits": "Yes",

2
db/schema.rb

@ -182,8 +182,8 @@ ActiveRecord::Schema.define(version: 2022_01_12_151048) do
t.integer "nocharge"
t.integer "is_carehome"
t.decimal "chcharge"
t.integer "household_charge"
t.integer "letting_in_sheltered_accomodation"
t.integer "household_charge"
t.index ["discarded_at"], name: "index_case_logs_on_discarded_at"
t.index ["managing_organisation_id"], name: "index_case_logs_on_managing_organisation_id"
t.index ["owning_organisation_id"], name: "index_case_logs_on_owning_organisation_id"

Loading…
Cancel
Save