Skip to content

Commit

Permalink
PC-487: Add new British Gas unavailable screen
Browse files Browse the repository at this point in the history
  • Loading branch information
chidin194 committed Sep 19, 2023
1 parent 6d13d1e commit 35a6466
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 167 deletions.
3 changes: 0 additions & 3 deletions help_to_heat/frontdoor/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

extra_pages = (
"applications-closed",
"application-closed-utility-warehouse",
"address-select",
"address-manual",
"loft-access",
Expand All @@ -52,7 +51,6 @@
"bulb-warning-page": {"prev": "supplier", "next": "own-property"},
"utility-warehouse-warning-page": {"prev": "supplier", "next": "own-property"},
"applications-closed": {"prev": "supplier", "next": None},
"application-closed-utility-warehouse": {"prev": "supplier", "next": None},
"benefits": {"prev": "council-tax-band", "next": "household-income"},
}

Expand Down Expand Up @@ -89,7 +87,6 @@
"bulb-warning-page": ("bulb-warning-page",),
"utility-warehouse-warning-page": ("utility-warehouse-warning-page",),
"applications-closed": ("applications-closed",),
"application-closed-utility-warehouse": ("application-closed-utility-warehouse",),
"own-property": ("own_property",),
"address": ("address",),
"council-tax-band": ("council_tax_band",),
Expand Down
13 changes: 1 addition & 12 deletions help_to_heat/frontdoor/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def unavailable_supplier_redirect(session_id):
if supplier not in unavailable_suppliers:
return None

if supplier == "Utility Warehouse":
next_page_name = "application-closed-utility-warehouse"
else:
if supplier in unavailable_suppliers:
next_page_name = "applications-closed"
return redirect("frontdoor:page", session_id=session_id, page_name=next_page_name)

Expand Down Expand Up @@ -541,8 +539,6 @@ def handle_post(self, request, session_id, page_name, data, is_change_page):
next_page_name = "bulb-warning-page"
if request_supplier in unavailable_suppliers:
next_page_name = "applications-closed"
if request_supplier == "Utility Warehouse":
next_page_name = "application-closed-utility-warehouse"

if is_change_page:
if (request_supplier in converted_suppliers) or (request_supplier in unavailable_suppliers):
Expand All @@ -560,13 +556,6 @@ def get_context(self, session_id, *args, **kwargs):
return {"supplier": supplier}


@register_page("application-closed-utility-warehouse")
class UtilityWarehouseApplicationClosedPageView(PageView):
def get_context(self, session_id, *args, **kwargs):
supplier = SupplierConverter(session_id).get_supplier_on_general_pages()
return {"supplier": supplier}


@register_page("applications-closed")
class ApplicationsClosedView(PageView):
def get_context(self, session_id, *args, **kwargs):
Expand Down
Binary file modified help_to_heat/locale/cy/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 35a6466

Please sign in to comment.