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-764 add currently out establishment roll page #139

Merged
merged 1 commit into from
May 28, 2024

Conversation

whitfield-mj
Copy link
Contributor

No description provided.

@whitfield-mj whitfield-mj force-pushed the CDPS-764-currently-out branch from c8a9a04 to 38588c0 Compare May 28, 2024 13:21

const outPrisoners = await prisonApi.getPrisonersCurrentlyOutOfLivingUnit(livingUnitId)
const prisonerNumbers = outPrisoners.map(prisoner => prisoner.offenderNo)
if (!outPrisoners || !outPrisoners?.length) return []
Copy link
Contributor

Choose a reason for hiding this comment

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

Could move this up one line to avoid calling map on empty array, etc

@whitfield-mj whitfield-mj merged commit eb23132 into main May 28, 2024
4 checks passed
@whitfield-mj whitfield-mj deleted the CDPS-764-currently-out branch May 28, 2024 15:06
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