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

(fix) O3-2907: Always show order type filters in the order details table #1706

Merged
merged 5 commits into from
Mar 5, 2024

Conversation

mccarthyaaron
Copy link
Contributor

@mccarthyaaron mccarthyaaron commented Mar 1, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Issue: When the user selects a filter(All, Drug Order, Test Order) and there are no entries to display for the given the filter, the <EmptyState/> component is rendered which does not provide an option for the user to undo the filter and select another one.

Suggested solution: Display the component that includes the filter in both cases i.e when there are entries to display and zero entries. With entries to display, show the and with zero entries display a UI that resembles the component but without the header part of it.

Screenshots

O3-2907.mp4

Related Issue

https://openmrs.atlassian.net/browse/O3-2907

@denniskigen
Copy link
Member

denniskigen commented Mar 4, 2024

@mccarthyaaron, thanks for the PR. I think the ideal approach here is moving the Dropdown filter out of the data tile, like so:

dropdown-filters.mp4

This change gets the UI/UX in line with the rest of the app. The other thing I'd recommend is customising the empty state tiles to reflect the related order type. So, no test orders to display... for test orders and no drug orders to display for drug orders.

@denniskigen denniskigen changed the title (fix) O3-2907: Orders table displays EmptyState(when there are no orders to display) with no option to undo the filter (fix) O3-2907: Always show order type filters in the order details table Mar 4, 2024
@mccarthyaaron
Copy link
Contributor Author

Thanks @denniskigen for the feedback. Let me work on it

Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

Thanks, @mccarthyaaron!

@denniskigen denniskigen merged commit 18e2d5f into openmrs:main Mar 5, 2024
6 checks passed
@mccarthyaaron mccarthyaaron deleted the O3-2907 branch March 6, 2024 08:06
usamaidrsk pushed a commit to usamaidrsk/openmrs-esm-patient-chart that referenced this pull request Mar 11, 2024
…ble (openmrs#1706)

* Added an <EmptyData>-like component for when there are no orders to display while still allowing user to switch between filters

* Take the filter component out of the data tile

* display text for the EmptyState depends on the currently selected order type

* Remove unused imports that were previously imported and used

* Miscellaneous tweaks

- Spacing fixes for drug orders
- Add expand all toggle to TableHeader

---------

Co-authored-by: Dennis Kigen <[email protected]>
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