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

(refactor) O3-3806: Refactor Service queue entries api call using OpenMrs Fetch All #1394

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

kb019
Copy link
Contributor

@kb019 kb019 commented Dec 2, 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

To use hooks already present in esm-core to fetch all the queue entries.

388370799-867ef32b-fb36-4a01-a49b-c5fbf7d3b0ff.webm

Related Issue

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

Other

Copy link
Contributor

@brandones brandones left a comment

Choose a reason for hiding this comment

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

It's a great idea but your implementation doesn't make any sense (yet).

Copy link
Contributor

@brandones brandones left a comment

Choose a reason for hiding this comment

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

Great work @kb019 , just one suggestion for further simplification

const queueUpdateListener = useCallback(() => {
refetchAllData();
}, [refetchAllData]);
const queueUpdateListener = useCallback(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we simplify this further. I think we can get rid of all the queueUpdateListener and queue-entry-updated stuff, and whatever function it is that triggers the queue-entry-updated event. We can simply expose the mutate function and use that.

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