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

Show security section when there are xrays #184

Merged
merged 2 commits into from
Jun 14, 2023
Merged
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
16 changes: 10 additions & 6 deletions server/views/pages/personalPage.njk
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{% from "../macros/conditionallyShow.njk" import conditionallyShow %}
{% extends "./index.njk" %}
{% set breadCrumbs = [
{%
set breadCrumbs = [
{
text: 'Home',
href: "/" | prependBaseUrl
text: 'Home',
href: "/" | prependBaseUrl
}
] %}
]
%}
{% set showSecurity = security.interestToImmigration == "Yes" or security.travelRestrictions or security.xrays.total > 0 %}

{% block body %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-three-quarters">
Expand All @@ -27,7 +31,7 @@
{%- call conditionallyShow({condition: prisonerBelongsToUsersCaseLoad(prisonId, user.caseLoads), id: 'next-of-kin-nav'}) -%}
<li><a class="govuk-link govuk-link--no-visited-state" href="#next-of-kin">Next of kin</a></li>
{%- endcall -%}
{%- call conditionallyShow({condition: security.interestToImmigration == "Yes" or security.travelRestrictions, id: 'security-nav'}) -%}
{%- call conditionallyShow({condition: showSecurity, id: 'security-nav'}) -%}
<li><a class="govuk-link govuk-link--no-visited-state" href="#security">Security</a></li>
{%- endcall -%}
{%- call conditionallyShow({condition: prisonerBelongsToUsersCaseLoad(prisonId, user.caseLoads), id: 'property-nav'}) -%}
Expand Down Expand Up @@ -76,7 +80,7 @@
</div>
</div>
{%- endcall -%}
{%- call conditionallyShow({condition: security.interestToImmigration == "Yes" or security.travelRestrictions, id: 'security'}) -%}
{%- call conditionallyShow({condition: showSecurity, id: 'security'}) -%}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
{% include "../partials/personalPage/security.njk" %}
Expand Down