Skip to content

Commit

Permalink
Merge pull request #1062 from ministryofjustice/revert-1061-CAS-555-a…
Browse files Browse the repository at this point in the history
…mend-the-person-identifier

Revert "Always display persons Sex and conditionally display Gender Identity"
  • Loading branch information
aliuk2012 authored Aug 21, 2024
2 parents aba9993 + 68b4358 commit 0db73b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cypress_shared/components/placeContextHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}
Expand Down
9 changes: 5 additions & 4 deletions server/views/components/place-context-header/macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@
<dt class="place-context-header__key">Date of birth: </dt>
<dd class="place-context-header__value">{{ formatDate(person.dateOfBirth, {format: 'short'}) }}</dd>
</div>
<div class="place-context-header__row">
<dt class="place-context-header__key">Sex: </dt>
<dd class="place-context-header__value">{{ person.sex }}</dd>
</div>
{% if person.genderIdentity %}
<div class="place-context-header__row">
<dt class="place-context-header__key">Gender identity: </dt>
<dd class="place-context-header__value">{{ person.genderIdentity }}</dd>
</div>
{% else %}
<div class="place-context-header__row">
<dt class="place-context-header__key">Sex: </dt>
<dd class="place-context-header__value">{{ person.sex }}</dd>
</div>
{% endif %}
{% endif %}

Expand Down

0 comments on commit 0db73b4

Please sign in to comment.