-
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
fix: [DHIS2-16994] Image and File DE and TEA not Displayed in Changelog #3837
fix: [DHIS2-16994] Image and File DE and TEA not Displayed in Changelog #3837
Conversation
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
Outdated
Show resolved
Hide resolved
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
...modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useChangelogData.js
Outdated
Show resolved
Hide resolved
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
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.
...modules/capture-core/components/WidgetsChangelog/common/utils/getSubValueForChangelogData.js
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
🚀 Deployed on https://deploy-preview-3837.capture.netlify.dhis2.org |
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 looks good overall @henrikmv 👍
Made some comments in one of the files.
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
src/core_modules/capture-core/components/WidgetsChangelog/common/hooks/useClientDataValues.js
Outdated
Show resolved
Hide resolved
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
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.42,2.41.3 versions
…DisplayedInChangelog
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
…angelog' of https://github.com/dhis2/capture-app into hv/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
…/fix/DHIS2-16994_ImageAndFileDEAndTEANotDisplayedInChangelog
## [101.16.2](v101.16.1...v101.16.2) (2024-11-19) ### Bug Fixes * [DHIS2-16994] Image and File DE and TEA not Displayed in Changelog ([#3837](#3837)) ([9327210](9327210))
🎉 This PR is included in version 101.16.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
DHIS2-16994:
Added support for displaying files and images in the changelog for events and tracked entities.
Added asynchronous fetching of previous and current values for files and images in changelog entries using
useEffect
.Created a new helper file
getSubValueForChangelogData.js
to handle fetching sub-values for files and images based on the entity type (event
,trackedEntity
).Fixed a bug where values in the changelog do not utilize available space if the previous value is short and the current value is long.
Compared the changelog data to the event/tracked entity data to find out which image or file is the latest