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: Restricting view options of dashboard items (DHIS2-7630) #1472

Merged
merged 6 commits into from
Feb 15, 2021

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Jan 27, 2021

This pull request implements PEFPAR's suggestion for restricting view options from within dashboard items (https://jira.dhis2.org/browse/DHIS2-7630) using newly added system settings.

visualTypeConstraintsDemo

@benguaraldi benguaraldi changed the title DHIS2 7630 Restricting view options of dashboard items (DHIS2-7630) Jan 27, 2021
@benguaraldi benguaraldi changed the title Restricting view options of dashboard items (DHIS2-7630) feat: Restricting view options of dashboard items (DHIS2-7630) Jan 27, 2021
@jenniferarnesen
Copy link
Collaborator

@benguaraldi I'll be looking at this Thur or Fri this week :)

@benguaraldi
Copy link

@jenniferarnesen Great, thanks!


const { baseUrl } = useConfig()

const { item, visualization, onSelectActiveType, activeType } = props

const { settings } = useSystemSettings()
const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about doing this renaming at the point of the response, so it will be consistent throughout the app? It would probably be done in SystemSettingsProvider. (And then update the names throughout the app where systemSettings is used)

Copy link
Member Author

@tomzemp tomzemp Feb 11, 2021

Choose a reason for hiding this comment

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

Sounds good. I've refactored and put the logic for the remappings in api/settings (applied in SystemSettingsProvider). Let me know if this is okay, or if you'd like me to implement some other way
tomzemp@bf04217

@jenniferarnesen jenniferarnesen merged commit e74ee29 into dhis2:master Feb 15, 2021
dhis2-bot added a commit that referenced this pull request Feb 15, 2021
# [31.11.0](v31.10.9...v31.11.0) (2021-02-15)

### Features

* Restricting view options of dashboard items (DHIS2-7630) ([#1472](#1472)) ([e74ee29](e74ee29))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@benguaraldi
Copy link

Thanks, @jenniferarnesen and @tomzemp!

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

Successfully merging this pull request may close these issues.

4 participants