-
Notifications
You must be signed in to change notification settings - Fork 24
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-16322] One Click Transfer #3519
Conversation
…ransfer # Conflicts: # i18n/en.pot # package.json # yarn.lock
...odules/capture-core/components/WidgetEnrollment/Actions/Transfer/hooks/useUpdateOwnership.js
Outdated
Show resolved
Hide resolved
...odules/capture-core/components/WidgetEnrollment/Actions/Transfer/hooks/useUpdateOwnership.js
Show resolved
Hide resolved
...odules/capture-core/components/WidgetEnrollment/TransferModal/hooks/useTransferValidation.js
Outdated
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.
@eirikhaugstulen, can you add some Cypress tests for the ownership transfer functionality? Thank you!
…_OneClickTransfer # Conflicts: # i18n/en.pot # src/core_modules/capture-core-utils/featuresSupport/support.js # src/core_modules/capture-core/components/Pages/Enrollment/EnrollmentPageDefault/EnrollmentPageDefault.component.js # src/core_modules/capture-core/components/Pages/EnrollmentAddEvent/EnrollmentAddEventPageDefault/EnrollmentAddEventPageDefault.component.js # src/core_modules/capture-core/components/Pages/EnrollmentEditEvent/EnrollmentEditEventPage.component.js
…_OneClickTransfer
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.
Found a couple of things in addition to the code comments:
- The app crashes whenever the same orgunit search text used a second time (found it while checking if the caching of search results had any noticeable performance impact).
- You have added a new file
EnrollmentPageDefault.component.js
, which is empty.
...odules/capture-core/components/WidgetEnrollment/TransferModal/hooks/useTransferValidation.js
Show resolved
Hide resolved
...odules/capture-core/components/WidgetEnrollment/TransferModal/hooks/useTransferValidation.js
Show resolved
Hide resolved
...re-core/components/WidgetEnrollment/TransferModal/OrgUnitField/useSearchScopeWithFallback.js
Show resolved
Hide resolved
...re-core/components/WidgetEnrollment/TransferModal/OrgUnitField/useSearchScopeWithFallback.js
Outdated
Show resolved
Hide resolved
...apture-core/components/WidgetEnrollment/TransferModal/OrgUnitField/OrgUnitField.component.js
Show resolved
Hide resolved
...odules/capture-core/components/WidgetEnrollment/Actions/Transfer/hooks/useUpdateOwnership.js
Outdated
Show resolved
Hide resolved
Thanks for the feedback @superskip - should be fixed now! |
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.
LGTM!
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.
Bug resolved! ⭐
The search goes smoother when hitting a cached result 👍
When not hitting a cached result the search field loses focus though, possibly because the component unmounts. Probably a bit annoying for the users, so I think we should try to fix that as well before moving on.
...odules/capture-core/components/WidgetEnrollment/TransferModal/hooks/useTransferValidation.js
Outdated
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.
Thanks @eirikhaugstulen, it looks and works very well now.
I just have one final request: to remove the two lines of code that you see in the comment below 👇
...re-core/components/WidgetEnrollment/TransferModal/OrgUnitField/useSearchScopeWithFallback.js
Outdated
Show resolved
Hide resolved
…_OneClickTransfer # Conflicts: # yarn.lock
🚀 Deployed on https://deploy-preview-3519--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.
(I put the test for breaking the glass back in today, but it seems it isn't working, feel free to comment it out if it is making trouble for you..)
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.
A few last minute comments... one bug we should definitely fix
...ules/capture-core/components/WidgetEnrollment/TransferModal/InfoBoxes/InfoBoxes.component.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetEnrollment/Actions/Actions.container.js
Outdated
Show resolved
Hide resolved
...odules/capture-core/components/WidgetEnrollment/Actions/Transfer/hooks/useUpdateOwnership.js
Show resolved
Hide resolved
Thanks @JoakimSM! Implemented all 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.
Looks great!
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.4,2.39.6,2.38.7 versions
# [100.59.0](v100.58.0...v100.59.0) (2024-03-05) ### Features * [DHIS2-16322] One Click Transfer ([#3519](#3519)) ([b115ee8](b115ee8))
🎉 This PR is included in version 100.59.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
TECH-summary: