Skip to content

Commit

Permalink
Merge pull request #2965 from dhis2/dev
Browse files Browse the repository at this point in the history
fix: merge to master
  • Loading branch information
jenniferarnesen authored Apr 24, 2024
2 parents 2acf033 + 783399e commit b561df5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
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
Expand Up @@ -5,7 +5,7 @@
"private": true,
"license": "BSD-3-Clause",
"dependencies": {
"@dhis2/analytics": "^26.6.0",
"@dhis2/analytics": "^26.6.5",
"@dhis2/app-runtime": "^3.10.2",
"@dhis2/app-runtime-adapter-d2": "^1.1.0",
"@dhis2/d2-i18n": "^1.1.3",
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
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2245,10 +2245,10 @@
classnames "^2.3.1"
prop-types "^15.7.2"

"@dhis2/analytics@^26.6.0":
version "26.6.0"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.0.tgz#1d70463fca8a4d5f5838928e9ab6c5c07873715f"
integrity sha512-fO8ozVfnTulXQptPcT3W/y+Ru6sN/Qjhr6dWHL4LsG2siL1v8QOWKcnM/yScClJtRZvsbEnQ6vX47c7ujRsGUA==
"@dhis2/analytics@^26.6.5":
version "26.6.5"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.5.tgz#44ee29a279c37f3969096d859bc0f07d953e3f42"
integrity sha512-ob6kNEEkIAC50RtKuUZWi8Y04uwsPHK/EiYhzxZkSOdS5wFm8X+88KZrD//fILXQjwMhJvl/4+F/T0qVxOF/jQ==
dependencies:
"@dhis2/d2-ui-rich-text" "^7.4.1"
"@dhis2/multi-calendar-dates" "1.0.0"
Expand Down

0 comments on commit b561df5

Please sign in to comment.