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

Feature/open chart as map [DHIS2-5987] #213

Merged
merged 37 commits into from
Feb 27, 2019
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9c09c3b
Api module for interacting with user data store
neeilya Feb 6, 2019
27019e0
Api methods for saving/retrieving analytical object in/from user data…
neeilya Feb 6, 2019
58cfe61
MapMenu component
neeilya Feb 6, 2019
4958517
Remove map dropdown menu, use chart type selection section instead
neeilya Feb 7, 2019
81d3b16
Globe icon asset
neeilya Feb 7, 2019
6b550f1
Define "Open as map" visualization type
neeilya Feb 7, 2019
fcf08bb
Move managing-AO-in-user-data-store requests to api/userDataStore.js
neeilya Feb 7, 2019
589d001
Move visualization type menu item into dedicated component
neeilya Feb 7, 2019
0aeec59
Enable support for "Open as: Geo Map" visualization type
neeilya Feb 7, 2019
c5f7847
Prevent url from changing on "update" button click if path = "/curren…
neeilya Feb 11, 2019
60af8b9
Remove id, name & displayName attributes from AO before putting it in…
neeilya Feb 11, 2019
ef91042
Enable support for retrieving and applying chart config from user dat…
neeilya Feb 11, 2019
aa86d6d
Correct name for create/update method in user data store api
neeilya Feb 11, 2019
5d4f8b5
prettier
neeilya Feb 11, 2019
0a33f5c
Move api related "prepareCurrentAnalyticalObject" function into api/u…
neeilya Feb 11, 2019
2f10200
Tests
neeilya Feb 12, 2019
8af839b
Tests
neeilya Feb 12, 2019
81c2a17
Tests
neeilya Feb 13, 2019
3491344
Merge branch 'master' into feature/open-chart-as-map
neeilya Feb 13, 2019
99c45b3
Append dimension items names to currentAnalyticalObject
neeilya Feb 18, 2019
c82bc6a
Set column as default chart type
neeilya Feb 19, 2019
d2c44e5
Get parent graph map from visualization function
neeilya Feb 19, 2019
ab71050
Open as map confirmation dialog component
neeilya Feb 19, 2019
c196e27
Show confirmation dialog if user opens chart as map and chart has mul…
neeilya Feb 19, 2019
6ca131d
Generate parent graph map from current analytical object
neeilya Feb 19, 2019
12c0a48
Remove open as map confirmation dialog
neeilya Feb 20, 2019
b84a907
Rename "Open as: Geo Map" chart type to "Open as: Map"
neeilya Feb 20, 2019
f7d3a49
Append names only for dimensions which have name property in metadata
neeilya Feb 20, 2019
93f5e05
Move current analytical object specifc functions to separate module
neeilya Feb 20, 2019
ba35ec8
Tests
neeilya Feb 20, 2019
35b6572
Prettier
neeilya Feb 20, 2019
38a28f2
Handle edge case when no org units are selected
neeilya Feb 22, 2019
e8b3f2a
Move styles to dedicated styles file
neeilya Feb 22, 2019
8ad9cd2
Prettier
neeilya Feb 22, 2019
7ccffce
Use procedural style in prepare current analytical object function
neeilya Feb 25, 2019
3f71e0d
Fix appendDimensionItemNamesToAnalyticalObject function, include item…
neeilya Feb 27, 2019
dd4c65b
Merge branch 'master' into feature/open-chart-as-map
neeilya Feb 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ import VisualizationTypeMenuItem from './VisualizationTypeMenuItem';

export const MAPS_APP_URL = 'dhis-web-maps';

export const prepareCurrentAnalyticalObject = current => ({
edoardo marked this conversation as resolved.
Show resolved Hide resolved
...current,
id: undefined,
name: undefined,
displayName: undefined,
});

export class VisualizationTypeSelector extends Component {
constructor(props, context) {
super(props);
Expand Down Expand Up @@ -50,7 +57,11 @@ export class VisualizationTypeSelector extends Component {
};

handleOpenChartAsMapClick = async () => {
await apiSaveAOInUserDataStore(this.props.current);
const currentAnalyticalObject = prepareCurrentAnalyticalObject(
this.props.current
);

await apiSaveAOInUserDataStore(currentAnalyticalObject);

window.location.href = `${
this.baseUrl
Expand Down