Skip to content
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
59 changes: 12 additions & 47 deletions server/routes/__tests__/__snapshots__/next-steps.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -246,27 +246,6 @@ exports[`next-steps on internal should show the "Order flood risk data" for opte
<p class="govuk-body">
Find out more about <a class="govuk-link" href="/flood-zone-results-explained">flood zones and what they mean</a>
</p>

<p class="govuk-body">
When using the surface water map on the
<a class="govuk-link" href="https://check-long-term-flood-risk.service.gov.uk/map?easting=9323.5&northing=1323.5&map=SurfaceWater">
check your long term flood risk service
</a>
the following considerations apply:
</p>

<ul class="govuk-list govuk-list--bullet">
<li>
surface water extents are suitable for use in planning
</li>
<li>
surface water climate change scenarios may help to inform risk assessments,
but the available data fall short of what is required to assess planned development
</li>
<li>
surface water depth information should not be used for planning purposes
</li>
</ul>

<p class="govuk-body">
To find out about other factors that might affect the flood risk of this location, you should also check:
Expand Down Expand Up @@ -314,10 +293,12 @@ exports[`next-steps on internal should show the "Order flood risk data" for opte

<p class="govuk-body">
For help deciding what flood risk information you need,
email the Environment Agency team in Wessex at
contact the Environment Agency team in Wessex at
<a class="govuk-link" href="mailto:wessexenquiries@environment-agency.gov.uk">wessexenquiries@environment-agency.gov.uk</a>
</p>

<h3 class="govuk-heading-m"> Get flood risk data </h3>

<h3 class="govuk-heading-m">
Download a flood map for this location
</h3>
Expand Down Expand Up @@ -385,7 +366,7 @@ exports[`next-steps on internal should show the "Order flood risk data" for opte


<h3 class="govuk-heading-m">
Order flood risk data for rivers and the sea
Order detailed flood risk data
</h3>

<p class="govuk-body">Order detailed flood risk information to be used for a flood risk assessment as part of a planning application.</p>
Expand All @@ -394,7 +375,10 @@ exports[`next-steps on internal should show the "Order flood risk data" for opte
<a id="orderP4Button" href="contact?encodedPolygon=_mafqv@_m}i{F?_ibE_ibE??~hbE~hbE?" class="govuk-button" data-module="govuk-button" data-testid="order-product4">
Order flood risk data
</a>
<p class="govuk-body" >If you need to order other products, email the Environment Agency team in Wessex at wessexenquiries@environment-agency.gov.uk.</p>
<p class="govuk-body" >
If you need to order other products, contact the Environment Agency team in Wessex at
<a class="govuk-link" href="mailto:wessexenquiries@environment-agency.gov.uk">wessexenquiries@environment-agency.gov.uk</a>.
</p>
<p>
<a href="https://www.gov.uk/guidance/flood-risk-assessment-for-planning-applications#get-information-about-flood-risk-from-rivers-and-the-sea-to-help-you-to-complete-afra">
Find out what products are available
Expand Down Expand Up @@ -817,27 +801,6 @@ exports[`next-steps on public should show the "Order flood risk data" for opted
<p class="govuk-body">
Find out more about <a class="govuk-link" href="/flood-zone-results-explained">flood zones and what they mean</a>
</p>

<p class="govuk-body">
When using the surface water map on the
<a class="govuk-link" href="https://check-long-term-flood-risk.service.gov.uk/map?easting=9323.5&northing=1323.5&map=SurfaceWater">
check your long term flood risk service
</a>
the following considerations apply:
</p>

<ul class="govuk-list govuk-list--bullet">
<li>
surface water extents are suitable for use in planning
</li>
<li>
surface water climate change scenarios may help to inform risk assessments,
but the available data fall short of what is required to assess planned development
</li>
<li>
surface water depth information should not be used for planning purposes
</li>
</ul>

<p class="govuk-body">
To find out about other factors that might affect the flood risk of this location, you should also check:
Expand Down Expand Up @@ -885,10 +848,12 @@ exports[`next-steps on public should show the "Order flood risk data" for opted

<p class="govuk-body">
For help deciding what flood risk information you need,
email the Environment Agency team in Wessex at
contact the Environment Agency team in Wessex at
<a class="govuk-link" href="mailto:wessexenquiries@environment-agency.gov.uk">wessexenquiries@environment-agency.gov.uk</a>
</p>

<h3 class="govuk-heading-m"> Get flood risk data </h3>

<h3 class="govuk-heading-m">
Download a flood map for this location
</h3>
Expand Down Expand Up @@ -956,7 +921,7 @@ exports[`next-steps on public should show the "Order flood risk data" for opted


<h3 class="govuk-heading-m">
Order flood risk data for rivers and the sea
Order detailed flood risk data
</h3>

<p class="govuk-body" data-testid="order-product4-email">
Expand Down
6 changes: 5 additions & 1 deletion server/routes/next-steps.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const { config } = require('../../config')
const constants = require('../constants')
const pauseP1URL = config.functionAppUrl + '/product-one-config'
const { isRiskAdminArea } = require('../services/riskAdmin/isRiskAdminArea')
const {
getAreaInHectares,
getCentreOfPolygon,
checkParamsForPolygon
} = require('../services/shape-utils')
Expand All @@ -24,7 +26,9 @@ module.exports = [
const showOrderProduct4Button = config.appType === 'internal' || contactData.useAutomatedService === true
floodData.centreOfPolygon = getCentreOfPolygon(polygon)
floodData.isRiskAdminArea = isRiskAdmin
return h.view('next-steps', { floodData, contactData, showOrderProduct4Button, encodedPolygon, polygon, pauseP1Data })
floodData.areaInHectares = getAreaInHectares(polygon)
const over300Hectares = floodData.areaInHectares > constants.maxAreaInHectares
return h.view('next-steps', { floodData, contactData, showOrderProduct4Button, encodedPolygon, polygon, pauseP1Data, over300Hectares })
}
}
}
Expand Down
27 changes: 4 additions & 23 deletions server/views/next-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,6 @@ <h3 class="govuk-heading-m">
<p class="govuk-body">
Find out more about <a class="govuk-link" href="/flood-zone-results-explained">flood zones and what they mean</a>
</p>

<p class="govuk-body">
When using the surface water map on the
<a class="govuk-link" href="https://check-long-term-flood-risk.service.gov.uk/map?easting={{floodData.centreOfPolygon.x}}&northing={{floodData.centreOfPolygon.y}}&map=SurfaceWater">
check your long term flood risk service
</a>
the following considerations apply:
</p>

<ul class="govuk-list govuk-list--bullet">
<li>
surface water extents are suitable for use in planning
</li>
<li>
surface water climate change scenarios may help to inform risk assessments,
but the available data fall short of what is required to assess planned development
</li>
<li>
surface water depth information should not be used for planning purposes
</li>
</ul>

<p class="govuk-body">
To find out about other factors that might affect the flood risk of this location, you should also check:
Expand Down Expand Up @@ -97,18 +76,20 @@ <h3 class="govuk-heading-m">

<p class="govuk-body">
For help deciding what flood risk information you need,
email the Environment Agency team in {{ contactData.AreaName }} at
contact the Environment Agency team in {{ contactData.AreaName }} at
<a class="govuk-link" href="mailto:{{ contactData.EmailAddress }}">{{ contactData.EmailAddress }}</a>
</p>

<h3 class="govuk-heading-m"> Get flood risk data </h3>

<h3 class="govuk-heading-m">
Download a flood map for this location
</h3>

{% include "./partials/results-page/order-product-one.html" %}

<h3 class="govuk-heading-m">
Order flood risk data for rivers and the sea
Order detailed flood risk data
</h3>
{% include "./partials/results-page/order-product-four.html" %}
</div>
Expand Down
19 changes: 17 additions & 2 deletions server/views/partials/results-page/order-product-four.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<a id="orderP4Button" href="contact?encodedPolygon={{ encodedPolygon }}" class="govuk-button" data-module="govuk-button" data-testid="order-product4">
Order flood risk data
</a>
<p class="govuk-body" >If you need to order other products, email the Environment Agency team in {{ contactData.AreaName }} at {{ contactData.EmailAddress }}.</p>
<p class="govuk-body" >
If you need to order other products, contact the Environment Agency team in {{ contactData.AreaName }} at
<a class="govuk-link" href="mailto:{{ contactData.EmailAddress }}">{{ contactData.EmailAddress }}</a>.
</p>
<p>
<a href="https://www.gov.uk/guidance/flood-risk-assessment-for-planning-applications#get-information-about-flood-risk-from-rivers-and-the-sea-to-help-you-to-complete-afra">
Find out what products are available
Expand Down Expand Up @@ -42,5 +45,17 @@
<a id="backToMap" href="map?encodedPolygon={{ encodedPolygon }}" class="govuk-button" data-module="govuk-button" data-testid="order-product4">
Edit boundary
</a>
<p>If your boundary needs to be bigger than 300 hectares, contact the Environment Agency team in {{ contactData.AreaName }} at {{ contactData.EmailAddress }}.</p>
<p class="govuk-body">
If your boundary needs to be bigger than 300 hectares
{%- if showOrderProduct4Button %} or you need to order other products {%- endif -%}
, contact the Environment Agency team in {{ contactData.AreaName }} at
<a class="govuk-link" href="mailto:{{ contactData.EmailAddress }}">{{ contactData.EmailAddress }}</a>.
</p>
{% if showOrderProduct4Button -%}
<p class="govuk-body" >
<a class="govuk-link" href="https://www.gov.uk/guidance/flood-risk-assessment-for-planning-applications#get-information-about-flood-risk-from-rivers-and-the-sea-to-help-you-to-complete-afra">
Find out what products are available
</a>
</p>
{% endif -%}
{% endif %}