-
Notifications
You must be signed in to change notification settings - Fork 307
Chore/more robust refetch mechanism for service queues #3263 #1205
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
Chore/more robust refetch mechanism for service queues #3263 #1205
Conversation
…e the queue resource is edited
| return () => { | ||
| window.removeEventListener('refetchQueues', handlePatientAddedToQueue); | ||
| }; | ||
| }, []); |
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.
mutate will be added as a dependency`
|
Hi @PiusKariuki! Alongside, please note that the default queue table is only used on the service queues home page, but we have more pages in the service queues (refer to Thanks! |
|
Thanks @vasharma05 for these pointers that I had not taken into account. I am going to use them to rethink my implementation then try again. |
brandones
left a comment
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.
This needs documentation. I commented in the ticket to this effect. There is no documentation of the bug—screenshots, video, reproduction instructions, nothing. And there is no documentation that this fixes any bug (video or screenshots that show it working). Finally, if we are getting rid of useMutateQueueEntries, we should do a proper job and delete it entirely. However it's likely that if there is a bug, the thing we want to do is simply to fix useMutateQueueEntries and ensure it is used correctly everywhere.
Requirements
Summary
This PR addresses an incosistency in re-retching the table contents in the services queues page when a write operation like adding a patient, clearing the queue or transitioning the patient fails to repopulate the table with the updated data.
We achieve this by employing custom events
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-3418
Other