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: option for data approval level #657

Merged
merged 19 commits into from
Feb 17, 2020
Merged

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Feb 12, 2020

This is a special option, only shown if the user has authority to see unapproved data and the analytics system setting "Max number of years to hide unapproved data in analytics" is set.

In that case the approvalLevel with the value set via the UI should be sent as query parameter in the analytics request.

@edoardo
Copy link
Member Author

edoardo commented Feb 13, 2020

In order to test the feature, a analytic system setting must be changed:
Screenshot 2020-02-13 at 09 28 51

With that, and if the user has the F_VIEW_UNAPPROVED_DATA authority set to true, the option becomes available for PT:
Screenshot 2020-02-13 at 09 30 31

The authorities values are store within the user object in the store
This is a special type of option, as it's not always available in the UI
and it should not be saved in the AO.
It should be passed to the analytics api also when downloading the data.
The const is defined in the ApprovalLevel option component and imported
in App.js.
@edoardo edoardo force-pushed the feat/data-approval-level-option branch from 1671209 to 26b5a31 Compare February 13, 2020 09:26
Copy link
Contributor

@martinkrulltott martinkrulltott left a comment

Choose a reason for hiding this comment

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

Except for comments the code LGTM. Haven't pulled and tested though.

Copy link
Contributor

@martinkrulltott martinkrulltott left a comment

Choose a reason for hiding this comment

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

LGTM

@edoardo edoardo merged commit 3b7d274 into master Feb 17, 2020
@edoardo edoardo deleted the feat/data-approval-level-option branch February 17, 2020 15:57
dhis2-bot added a commit that referenced this pull request Feb 17, 2020
# [34.2.0](v34.1.0...v34.2.0) (2020-02-17)

### Features

* option for data approval level ([#657](#657)) ([3b7d274](3b7d274))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 34.2.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
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants