generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add filtering and pagination to OOS bed list for a given premises #1963
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
richpjames
approved these changes
Jul 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some minor comments
patrickjfl
force-pushed
the
APS-887-update-premises-OOS-bed-list
branch
2 times, most recently
from
July 5, 2024 09:21
4f75600
to
55358a0
Compare
Also corrects the path being extended to be the v2 premises path.
We don’t need default values for sortBy and sortDirection as distinct from what the API defaults to. But we do need to specify a perPage value so that we can ensure that we will render all currently OOS beds for an AP on a single page, by specifying 50 results per page.
This ensures that the page will display the results for all three temporalities, with pagination. We specify 50 results per page to ensure that all currently OOS beds for a given AP will display on a single page.
This includes making the API stub and the API request verification stub generic to cover fetching all OOS beds for all APs, and fetching all OOS beds for a single AP, which use the same endpoint with different query parameters.
patrickjfl
force-pushed
the
APS-887-update-premises-OOS-bed-list
branch
from
July 5, 2024 09:38
55358a0
to
1c94673
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Jira ticket: https://dsdmoj.atlassian.net/browse/APS-887
Changes in this PR
Adds filtering by temporality to the OOS beds page for a single premises. Also adds pagination, which is set to 50 per page by default. This is to all but ensure that all currently OOS beds will appear on a single page for any given AP.
Screenshots of UI changes
Before
After