-
Notifications
You must be signed in to change notification settings - Fork 248
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-2655: Record Vitals: Error message for invalid values pops up only once #1578
Conversation
1a0e51d
to
1b87ca0
Compare
@denniskigen Hello Sir, Could you please review my PR ? |
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.
Nice work, @usamaidrsk. Could you add a test?
I think that's @psworld . |
Thanks. |
Hello @denniskigen , Tests added:
If there are any changes required, please let me know |
Excellent work! Thanks, @psworld! |
Thankyou so much. It means a lot to me 🙏 |
Requirements
Summary
There were two issue:
showErrorMessage
was missing from<VitalsAndBiometricsInput />
component.hasInvalidVitals
did not change when we again pressed the save form button and hence no re-render was triggered. To fix it, I set theonClose
property on the<InlineNotification />
tosetHasInvalidVitals(false)
. This make sure that the re-render occur when I again press the submit button.Screenshots
Input field validation
Before
No input field error is shown when Blood pressure and Heart rate have invalid values.
After
Inline Notification
Before
Untitled.video.-.Made.with.Clipchamp.mp4
After
Untitled.video.-.Made.with.Clipchamp.2.mp4
Related Issue
Link to JIRA ticket: https://openmrs.atlassian.net/browse/O3-2655