Skip to content
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-15391] preview images in working lists and on enrollment dashboard #3546

Merged
merged 20 commits into from
Mar 5, 2024

Conversation

superskip
Copy link
Contributor

@superskip superskip commented Feb 28, 2024

Feature summary:

  • TEI working list can show image attributes
  • TEI working list filtered by program stage can show image data elements
  • Event program working list can show image data elements
  • Enrollment dashboard can show image data elements marked with "Display in reports"

@superskip superskip requested a review from a team as a code owner February 28, 2024 11:16
@superskip
Copy link
Contributor Author

  • Removed dimension=small from the link url
  • Fixed the image width as well, making it centralised in a 120x80 frame.

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 👏

Copy link

github-actions bot commented Feb 29, 2024

Comment on lines 32 to 35
value: convertServerToClient(value, type),
urlPath: `/trackedEntityInstances/${tei.trackedEntity}/${id}/image`,
urlPath: featureAvailable(FEATURES.trackerImageEndpoint) ?
`/tracker/trackedEntities/${tei.trackedEntity}/attributes/${id}/image?program=${programId}&dimension=small` :
`/trackedEntityInstances/${tei.trackedEntity}/${id}/image`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only add the urlPath if it is an image? Would improve readability quite a bit.

Also, in

and others, can we have a previewUrl and fullSizedUrl instead of the single url and remove the replace statement in PreviewImage.component. Would be more robust that way and the "UI-library" will not be responsible for computing URLs.

Copy link

@geethaalwan geethaalwan left a 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 version

@superskip superskip added testing and removed testing labels Mar 4, 2024
@JoakimSM JoakimSM added testing and removed testing labels Mar 5, 2024
@JoakimSM
Copy link
Member

JoakimSM commented Mar 5, 2024

Tested successfully on 2.41 version

@superskip superskip merged commit 191c22f into master Mar 5, 2024
37 checks passed
@superskip superskip deleted the DHIS2-15391 branch March 5, 2024 11:38
dhis2-bot added a commit that referenced this pull request Mar 5, 2024
# [100.61.0](v100.60.0...v100.61.0) (2024-03-05)

### Features

* [DHIS2-15391] preview images in working lists and on enrollment dashboard ([#3546](#3546)) ([191c22f](191c22f))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.61.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants