Skip to content

Commit

Permalink
fix: system / user setting for display name not respected in Org Unit…
Browse files Browse the repository at this point in the history
… tree (DHIS2-15000) (#509)
  • Loading branch information
martinkrulltott authored May 13, 2024
1 parent 385feee commit a1e737d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"typescript": "^4.8.4"
},
"dependencies": {
"@dhis2/analytics": "^26.6.5",
"@dhis2/analytics": "^26.6.9",
"@dhis2/app-runtime": "^3.4.4",
"@dhis2/ui": "^9.4.2",
"@dnd-kit/core": "^5.0.3",
Expand Down
8 changes: 7 additions & 1 deletion src/components/Dialogs/FixedDimension.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
formatDimensionId,
} from '../../modules/dimensionId.js'
import { removeLastPathSegment, getOuPath } from '../../modules/orgUnit.js'
import { DERIVED_USER_SETTINGS_DISPLAY_NAME_PROPERTY } from '../../modules/userSettings.js'
import {
STATUS_ACTIVE,
STATUS_CANCELLED,
Expand Down Expand Up @@ -50,7 +51,7 @@ const FixedDimension = ({
selectedItemsIds,
inputType,
}) => {
const { rootOrgUnits } = useCachedDataQuery()
const { rootOrgUnits, currentUser } = useCachedDataQuery()
const { serverVersion } = useConfig()
const statusNames = getStatusNames()
const { programId, dimensionId } = extractDimensionIdParts(
Expand Down Expand Up @@ -244,6 +245,11 @@ const FixedDimension = ({
roots={rootOrgUnits.map(
(rootOrgUnit) => rootOrgUnit.id
)}
displayNameProp={
currentUser.settings[
DERIVED_USER_SETTINGS_DISPLAY_NAME_PROPERTY
]
}
{...dimensionProps}
/>
</div>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2034,10 +2034,10 @@
classnames "^2.3.1"
prop-types "^15.7.2"

"@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==
"@dhis2/analytics@^26.6.9":
version "26.6.9"
resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.9.tgz#932847c4bee3dd720d5d0b872c6b11eeae8b260c"
integrity sha512-AcU5FKH1Rmi8GdgqdJ1aOPqTKhztLafhzKNvGBdb5rSNR8/KS2djyTxxPhL0fdusu+1Rc04RFSkOLajq3ChVrQ==
dependencies:
"@dhis2/d2-ui-rich-text" "^7.4.1"
"@dhis2/multi-calendar-dates" "1.0.0"
Expand Down

0 comments on commit a1e737d

Please sign in to comment.