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

CDPS-716 add no cell prisoners page #136

Merged
merged 1 commit into from
May 24, 2024
Merged

CDPS-716 add no cell prisoners page #136

merged 1 commit into from
May 24, 2024

Conversation

whitfield-mj
Copy link
Contributor

No description provided.

}

return null
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken directly from DPS. I assume the cells always come back with establishment prefixes.... seem to in dev

@whitfield-mj whitfield-mj force-pushed the CDPS-716-no-cell branch 2 times, most recently from 179cc51 to ec4efbd Compare May 24, 2024 09:32
const { content: cellSwapPrisoners } = await prisonerSearchClient.getCswapPrisonersInEstablishment(caseLoadId)
if (!cellSwapPrisoners?.length) return []

const prisonerNumbers = cellSwapPrisoners.map(prisoner => prisoner.prisonerNumber)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is redundant as you could just use
cellSwapPrisoners.map(async prisoner =>
and delete the const prisoner = ...
in the following Promise.all

{% else %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">{{ title }}</h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be pageTitle

@whitfield-mj whitfield-mj merged commit e8eec60 into main May 24, 2024
4 checks passed
@whitfield-mj whitfield-mj deleted the CDPS-716-no-cell branch May 24, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants