Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PC-1364: Loft insulation question #398

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion help_to_heat/frontdoor/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@

loft_insulation_field = "loft_insulation"
loft_insulation_field_more_than_threshold = "I have more than 100mm of loft insulation"
loft_insulation_field_less_than_threshold = "I have up to 100mm of loft insulation"
loft_insulation_field_less_than_threshold = "I have less than or equal to 100mm of loft insulation"
loft_insulation_field_no_insulation = "I have no loft insulation"
loft_insulation_field_dont_know = field_dont_know
loft_insulation_field_no_loft = "No loft"

Expand Down
9 changes: 9 additions & 0 deletions help_to_heat/frontdoor/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
loft_field,
loft_field_no,
loft_insulation_field,
loft_insulation_field_less_than_threshold,
loft_insulation_field_no_insulation,
loft_insulation_field_no_loft,
park_home_main_residence_field,
property_subtype_field,
Expand Down Expand Up @@ -250,6 +252,13 @@ def create_referral(self, session_id):
given_answers[loft_access_field] = loft_access_field_no_loft
given_answers[loft_insulation_field] = loft_insulation_field_no_loft

# Users are given the option to select "no insulation" to improve question usability
# This and "below threshold" are functionally identical from the supplier point of view.
# They will be combined before the suppliers see it to improve supplier usability
loft_insulation = given_answers.get(loft_insulation_field)
if loft_insulation == given_answers.get(loft_insulation_field_no_insulation):
given_answers[loft_insulation_field] = loft_insulation_field_less_than_threshold

# ensure not found EPCs are displayed as such
# this will normally be set as an answer on pressing submit on 'address' page
# though this is not guaranteed, ie if user presses to enter manually
Expand Down
10 changes: 8 additions & 2 deletions help_to_heat/frontdoor/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
loft_insulation_field_dont_know,
loft_insulation_field_less_than_threshold,
loft_insulation_field_more_than_threshold,
loft_insulation_field_no_insulation,
loft_insulation_field_no_loft,
loft_insulation_page,
loft_page,
Expand Down Expand Up @@ -480,7 +481,8 @@
},
loft_insulation_field: {
loft_insulation_field_more_than_threshold: _("I have more than 100mm of loft insulation"),
loft_insulation_field_less_than_threshold: _("I have up to 100mm of loft insulation"),
loft_insulation_field_less_than_threshold: _("I have less than or equal to 100mm of loft insulation"),
loft_insulation_field_no_insulation: _("I have no loft insulation"),
loft_insulation_field_dont_know: _("I do not know"),
loft_insulation_field_no_loft: _("No loft"),
},
Expand Down Expand Up @@ -699,7 +701,11 @@
},
{
"value": loft_insulation_field_less_than_threshold,
"label": _("I have up to 100mm of loft insulation"),
"label": _("I have less than or equal to 100mm of loft insulation"),
},
{
"value": loft_insulation_field_no_insulation,
"label": _("I have no loft insulation"),
},
{
"value": loft_insulation_field_dont_know,
Expand Down
Binary file modified help_to_heat/locale/cy/LC_MESSAGES/django.mo
Binary file not shown.
Loading
Loading