Skip to content

Commit ec236a2

Browse files
Allan KingAllan King
authored andcommitted
Make region conditional
1 parent 1203604 commit ec236a2

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

app/views/all-users/check-details.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
{% set profile = user.profile | default({}) %}
3131
{% set tasks = user.tasks | default({}) %}
3232
{% set startDate = ((profile.startMonth or '') + ' ' + (profile.startYear or '')) | trim %}
33+
{% set shouldShowRegion = profile.workplace == 'home' or profile.workplace == 'not-applicable' %}
3334
{% set selectedInterests = profile.interests | default([]) %}
3435
{% if selectedInterests.length %}
3536
{% set interestsSummary %}
@@ -85,12 +86,18 @@
8586
key: { text: "Place of work" },
8687
value: { text: profile.workplaceLabel or profile.placeSearch or 'Not provided' },
8788
actions: { items: [ { href: "/learner-profile/place-of-work", text: "Change", visuallyHiddenText: "place of work" } ] }
88-
},
89-
{
90-
key: { text: "Region" },
91-
value: { text: profile.region or 'Not provided' },
92-
actions: { items: [ { href: "/learner-profile/region", text: "Change", visuallyHiddenText: "region" } ] }
93-
},
89+
}
90+
]) %}
91+
{% if shouldShowRegion %}
92+
{% set rows = rows.concat([
93+
{
94+
key: { text: "Region" },
95+
value: { text: profile.region or 'Not provided' },
96+
actions: { items: [ { href: "/learner-profile/region", text: "Change", visuallyHiddenText: "region" } ] }
97+
}
98+
]) %}
99+
{% endif %}
100+
{% set rows = rows.concat([
94101
{
95102
key: { text: "Your interests" },
96103
value: interestsValue,

app/views/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h2 class="nhsuk-heading-m">Who it's for</h2>
4242
<p class="nhsuk-body">The prototype is for the purpose of user research and testing. </p>
4343

4444
{# <h2 class="nhsuk-heading-m">What's included</h2> #}
45-
{# <p class="nhsuk-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Fusce at dolor sit amet felis aliquam bibendum quis a libero.</p> #}
45+
{# <p class="nhsuk-body">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Fusce at dolor sit amet felis aliquam bibendum quis a libero.</p> #}
4646

4747
<div class="nhsuk-inset-text">
4848
We regularly update the prototype to reflect decision we've made based on user research.

0 commit comments

Comments
 (0)