-
Notifications
You must be signed in to change notification settings - Fork 231
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
base: main
Are you sure you want to change the base?
Conversation
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.
It's a great idea but your implementation doesn't make any sense (yet).
packages/esm-service-queues-app/src/patient-queue-metrics/clinic-metrics.component.tsx
Show resolved
Hide resolved
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.
Great work @kb019 , just one suggestion for further simplification
const queueUpdateListener = useCallback(() => { | ||
refetchAllData(); | ||
}, [refetchAllData]); | ||
const queueUpdateListener = useCallback(() => { |
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.
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.
Requirements
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