(feat) : Added ward app pagination. #1270
Closed
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.
Requirements
Summary
In this PR I have added a feature that adds pagination to the ward beds. I chose a
pageSizeof 6 to begin with but this could be a configurable option. I also refactored this file a little bit to show better loading and error states and also avoid code duplication. (This was to facilitate adding the pagination functionality without breaking the existing functionality) .Screenshots
Page 1
Page 2
Video
ward-app-pagination-demo.mp4
Related Issue
https://openmrs.atlassian.net/browse/O3-3709
Other
After I had already picked up and worked on this issue , it was made aware to me on Jira by @mogoodrich that the technical design might have not been ready at the time I started working on this issue. I was however adviced to open the PR regardless.
Also I was looking for
EmptyStatecomponent in the@openmrs/esm-patient-common-liblibrary but couldn`t find it. I upgraded openmrs and it worked but I have heard in O3 community calls that submitting the package.json file in a PR is probably a bad idea. Please guide appropriately.All feedback is highly appreciated.