From c14541b2b821fafeeb084deb9c3caba741775031 Mon Sep 17 00:00:00 2001 From: Martin Ohlson Date: Mon, 6 May 2024 11:25:34 +0200 Subject: [PATCH 1/3] fix: pass displayNameProp when requesting ou groups --- src/components/OrgUnitDimension/OrgUnitDimension.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/OrgUnitDimension/OrgUnitDimension.js b/src/components/OrgUnitDimension/OrgUnitDimension.js index 3516daf46..5d2d7115a 100644 --- a/src/components/OrgUnitDimension/OrgUnitDimension.js +++ b/src/components/OrgUnitDimension/OrgUnitDimension.js @@ -40,6 +40,7 @@ const OrgUnitDimension = ({ hideLevelSelect, hideUserOrgUnits, warning, + displayNameProp, }) => { const [ouLevels, setOuLevels] = useState([]) const [ouGroups, setOuGroups] = useState([]) @@ -79,13 +80,16 @@ const OrgUnitDimension = ({ setOuLevels(result) } const doFetchOuGroups = async () => { - const result = await apiFetchOrganisationUnitGroups(dataEngine) + const result = await apiFetchOrganisationUnitGroups( + dataEngine, + displayNameProp + ) setOuGroups(result) } !hideLevelSelect && doFetchOuLevels() !hideGroupSelect && doFetchOuGroups() - }, [dataEngine, hideLevelSelect, hideGroupSelect]) + }, [dataEngine, hideLevelSelect, hideGroupSelect, displayNameProp]) const onLevelChange = (ids) => { const items = ids.map((id) => ({ @@ -369,6 +373,7 @@ OrgUnitDimension.defaultProps = { } OrgUnitDimension.propTypes = { + displayNameProp: PropTypes.string, hideGroupSelect: PropTypes.bool, hideLevelSelect: PropTypes.bool, hideUserOrgUnits: PropTypes.bool, From e46152eadd1f958e8c9d8532d660189fd27a4e6e Mon Sep 17 00:00:00 2001 From: Martin Ohlson Date: Tue, 7 May 2024 15:19:48 +0200 Subject: [PATCH 2/3] v999.9.9-ouname-alpha.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ca9354f5..da9c7565d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "26.6.8", + "version": "999.9.9-ouname-alpha.1", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": { From 784d312b7f0b00149b5624ff29ea0c6c295484b0 Mon Sep 17 00:00:00 2001 From: Martin Ohlson Date: Wed, 8 May 2024 10:26:34 +0200 Subject: [PATCH 3/3] chore: revert the alpha version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da9c7565d..6ca9354f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dhis2/analytics", - "version": "999.9.9-ouname-alpha.1", + "version": "26.6.8", "main": "./build/cjs/index.js", "module": "./build/es/index.js", "exports": {