-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: [DHIS2-15483] assign an user when scheduling an enrollment event #3419
Conversation
🚀 Deployed on https://deploy-preview-3419--dhis2-capture.netlify.app |
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.
Hey @simonadomnisoru,
Just a quick comment, but otherwise very nice!
<div className={classes.label}>{i18n.t('Assignee')}</div> | ||
<div className={classes.field}> | ||
{/* $FlowFixMe[cannot-spread-inexact] automated comment */} | ||
<UserField inputPlaceholderText={i18n.t('Search for user')} value={assignee} {...passOnProps} /> |
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.
Do you think this field would benefit from having a No suggestions
-state.
If a user types in a user that does not exist in the system, you should get a message that says something like Could not find...
or No user found...
etc. In the current functionality, it looks that it has not searched if you type quickly enough. Do you think this could be implemented?
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.
Hey @eirikhaugstulen
I agree that the users will benefit from a No suggestions
-state (the design team also liked the idea). I added it in the last commits.
Regarding the second point, if the user types very fast, the search is prevented on purpose. Within the UserField.component, the DebounceField is used to introduce a delay between search requests. Input debouncing serves the purpose of limiting the frequency of API calls and enhancing overall performance.
Thanks!
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.
When saving the event to the enrollmentDomain in the Redux store, let's make sure we also include displayName, username, firstName and surname like we do when we initially fetch the events. This way it will be easier when we are going to display the assigned user in stages and events later. I think we also use the enrollmentDomain event data directly in the assignee Widget.
Hey @JoakimSM, |
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.
Looks good @simonadomnisoru 👍 Thanks for implementing the changes!
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.
Tested successfully on 2.41,2.40.2,2.39.4,2.38.6 versions
# [100.44.0](v100.43.0...v100.44.0) (2023-11-01) ### Features * [DHIS2-15483] assign an user when scheduling an enrollment event ([#3419](#3419)) ([556884f](556884f))
🎉 This PR is included in version 100.44.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# [100.44.0](v100.43.0...v100.44.0) (2023-11-01) ### Features * [DHIS2-15483] assign an user when scheduling an enrollment event ([#3419](#3419)) ([556884f](556884f))
DHIS2-15483
Tech summary
No results found
message if a searched user does not exist in the systemassignedUser
properties in theenrollmentDomain
in the redux store