Skip to content

Commit

Permalink
Merge branch 'dev' into refactor/use-analytics-rich-text
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen authored Apr 25, 2024
2 parents 7b7d924 + 8fdb79a commit d7196c9
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 16 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [100.2.1](https://github.com/dhis2/dashboard-app/compare/v100.2.0...v100.2.1) (2024-04-24)


### Bug Fixes

* in paragraphs were removed in dashboard item description ([#2962](https://github.com/dhis2/dashboard-app/issues/2962)) ([783399e](https://github.com/dhis2/dashboard-app/commit/783399eb916556d1fe5723af1781d2e3c74e6f18))
* short name was not being shown in visualizations ([#2959](https://github.com/dhis2/dashboard-app/issues/2959)) ([c0fc1d6](https://github.com/dhis2/dashboard-app/commit/c0fc1d68b3fae20c1dcd3e5912a26e745fb015cb))
* **translations:** sync translations from transifex (dev) ([3651a71](https://github.com/dhis2/dashboard-app/commit/3651a716531dee8064a44c1771d74a55d6f3e4e1))

# [100.2.0](https://github.com/dhis2/dashboard-app/compare/v100.1.0...v100.2.0) (2024-04-17)


### Bug Fixes

* **translations:** sync translations from transifex (dev) ([dc1f032](https://github.com/dhis2/dashboard-app/commit/dc1f03262dde9bef167cfefe1ac5deab2ac799dc))


### Features

* add metadata support for TE (DHIS2-17242) ([#2956](https://github.com/dhis2/dashboard-app/issues/2956)) ([39bedbe](https://github.com/dhis2/dashboard-app/commit/39bedbe5b5c467d4730857ffe23f4db0c7a74db1))

# [100.1.0](https://github.com/dhis2/dashboard-app/compare/v100.0.4...v100.1.0) (2024-03-21)


Expand Down
4 changes: 2 additions & 2 deletions i18n/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ msgid "Filters not applied"
msgstr "未应用过滤器"

msgid "Only Period and Organisation unit filters can be applied to this item"
msgstr ""
msgstr "仅可对此项应用期间和组织机构过滤器"

msgid "Some filters not applied"
msgstr ""
msgstr "某些过滤器未应用"

msgid "There was a problem loading this dashboard item"
msgstr "载入仪表盘有问题"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard-app",
"version": "100.1.0",
"version": "100.2.1",
"description": "DHIS2 Dashboard app",
"private": true,
"license": "BSD-3-Clause",
Expand Down
4 changes: 4 additions & 0 deletions src/api/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export const getDimensionFields = ({ withItems, withRepetition }) =>
'programStage',
withItems ? `items[${getItemFields().join(',')}]` : ``,
withRepetition ? 'repetition' : '',
'dimensionType',
'program[id]',
'optionSet[id]',
'valueType',
])

// Axis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const IframePlugin = ({
() => ({
isVisualizationLoaded: true,
forDashboard: true,
displayProperty: userSettings.displayProperty,
displayProperty: userSettings.keyAnalysisDisplayProperty,
visualization,
onError,

Expand Down
7 changes: 5 additions & 2 deletions src/components/UserSettingsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ const UserSettingsProvider = ({ children }) => {

setSettings({
...userSettings,
displayProperty: userSettings.keyAnalysisDisplayProperty,
displayProperty:
userSettings.keyAnalysisDisplayProperty === 'name'
? 'displayName'
: 'displayShortName',
})
}
fetchData()
}, [])
}, [engine])

return (
<UserSettingsCtx.Provider
Expand Down
16 changes: 9 additions & 7 deletions src/modules/useDimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const useDimensions = (doFetch) => {
try {
const unfilteredDimensions = await apiFetchDimensions(
dataEngine,
userSettings.keyAnalysisDisplayProperty
userSettings.displayProperty
)

dispatch(
Expand All @@ -28,14 +28,16 @@ const useDimensions = (doFetch) => {
}
}

if (
!dimensions.length &&
doFetch &&
userSettings.keyAnalysisDisplayProperty
) {
if (!dimensions.length && doFetch && userSettings.displayProperty) {
fetchDimensions()
}
}, [dimensions, doFetch, userSettings.keyAnalysisDisplayProperty])
}, [
dimensions,
doFetch,
userSettings.displayProperty,
dispatch,
dataEngine,
])

return dimensions
}
Expand Down
4 changes: 1 addition & 3 deletions src/pages/view/TitleBar/FilterDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ const FilterDialog = ({
dimensionId={dimension.id}
onSelect={onSelectItems}
dimensionTitle={dimension.name}
displayNameProp={
userSettings.keyAnalysisDisplayProperty
}
displayNameProp={userSettings.displayProperty}
/>
)
}
Expand Down

0 comments on commit d7196c9

Please sign in to comment.