From 68b43580845a0851fed2398380bad3f150502e56 Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Wed, 21 Aug 2024 12:45:56 +0100 Subject: [PATCH] Revert "Always display persons Sex and conditionally display Gender Identity" --- cypress_shared/components/placeContextHeader.ts | 3 +-- server/views/components/place-context-header/macro.njk | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress_shared/components/placeContextHeader.ts b/cypress_shared/components/placeContextHeader.ts index 363a46afb..ac0a9f790 100644 --- a/cypress_shared/components/placeContextHeader.ts +++ b/cypress_shared/components/placeContextHeader.ts @@ -26,12 +26,11 @@ export default class PlaceContextHeaderComponent extends Component { .next() .should('contain', DateFormats.isoDateToUIDate(person.dateOfBirth, { format: 'short' })) - cy.root().contains('Sex:').next().should('contain', person.sex) - if (person.genderIdentity) { cy.root().contains('Gender identity:').next().should('contain', person.genderIdentity) cy.root().should('not.contain', 'Sex') } else { + cy.root().contains('Sex:').next().should('contain', person.sex) cy.root().should('not.contain', 'Gender identity') } } diff --git a/server/views/components/place-context-header/macro.njk b/server/views/components/place-context-header/macro.njk index 57fb3027e..a526b7f8f 100644 --- a/server/views/components/place-context-header/macro.njk +++ b/server/views/components/place-context-header/macro.njk @@ -19,15 +19,16 @@
Date of birth:
{{ formatDate(person.dateOfBirth, {format: 'short'}) }}
-
-
Sex:
-
{{ person.sex }}
-
{% if person.genderIdentity %}
Gender identity:
{{ person.genderIdentity }}
+ {% else %} +
+
Sex:
+
{{ person.sex }}
+
{% endif %} {% endif %}