From dd67fc69c6b39bd177c1dd6a51cdf90d4dd4a1a2 Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Fri, 26 Apr 2024 14:09:37 +0200 Subject: [PATCH 1/4] fix: avoid re-rendering an item when adding the same again (DHIS2-17016) (#2935) This also avoids an unnecessary fetch of the same visualization object. --- src/components/Item/VisualizationItem/Item.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Item/VisualizationItem/Item.js b/src/components/Item/VisualizationItem/Item.js index 4d2a67bb1..5adc38890 100644 --- a/src/components/Item/VisualizationItem/Item.js +++ b/src/components/Item/VisualizationItem/Item.js @@ -88,9 +88,13 @@ class Item extends Component { } async componentDidMount() { - this.props.setVisualization( - await apiFetchVisualization(this.props.item) - ) + // Avoid refetching the visualization already in the Redux store + // when the same dashboard item is added again. + // This also solves a flashing of all the "duplicated" dashboard items. + !this.props.visualization.id && + this.props.setVisualization( + await apiFetchVisualization(this.props.item) + ) try { if ( From a4e5340a6605db261fd2a2af1ced272d94c760dc Mon Sep 17 00:00:00 2001 From: Edoardo Sabadelli Date: Wed, 8 May 2024 14:03:39 +0200 Subject: [PATCH 2/4] fix: avoid reading from undefined error (DHIS2-17334) (#2970) When using View as with filters applied. --- src/components/Item/VisualizationItem/Item.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Item/VisualizationItem/Item.js b/src/components/Item/VisualizationItem/Item.js index 5adc38890..93f30c97b 100644 --- a/src/components/Item/VisualizationItem/Item.js +++ b/src/components/Item/VisualizationItem/Item.js @@ -232,8 +232,9 @@ class Item extends Component { } case CHART: case VISUALIZATION: { - return item.visualization.type === - VIS_TYPE_OUTLIER_TABLE && + return item.type === VISUALIZATION && + item.visualization.type === + VIS_TYPE_OUTLIER_TABLE && Object.keys(itemFilters).some( (filter) => ![ From 928b88a7a97816f0c0a8a9cf364bf7fa189c848a Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 13 May 2024 14:46:15 +0300 Subject: [PATCH 3/4] fix: system / user setting for display name not respected in Org Unit tree (DHIS2-15000) (#2971) --- package.json | 2 +- src/pages/view/TitleBar/FilterDialog.js | 1 + yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index fd392c504..44e4d9ed8 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "license": "BSD-3-Clause", "dependencies": { - "@dhis2/analytics": "^26.6.5", + "@dhis2/analytics": "^26.6.9", "@dhis2/app-runtime": "^3.10.2", "@dhis2/app-runtime-adapter-d2": "^1.1.0", "@dhis2/d2-i18n": "^1.1.3", diff --git a/src/pages/view/TitleBar/FilterDialog.js b/src/pages/view/TitleBar/FilterDialog.js index 10e15b1aa..f1586e612 100644 --- a/src/pages/view/TitleBar/FilterDialog.js +++ b/src/pages/view/TitleBar/FilterDialog.js @@ -110,6 +110,7 @@ const FilterDialog = ({ )} selected={selectedItems} onSelect={onSelectItems} + displayNameProp={userSettings.displayProperty} /> ) default: diff --git a/yarn.lock b/yarn.lock index 1ed96ddc8..4a24f6ec6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2245,10 +2245,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" From 790afd2d64e8fb8252088453cdb803735b79c4de Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 14 May 2024 15:09:47 +0300 Subject: [PATCH 4/4] fix: dimension list design (DHIS2-16270) (#2861) --- i18n/uz_UZ_Cyrl.po | 3 +++ package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/i18n/uz_UZ_Cyrl.po b/i18n/uz_UZ_Cyrl.po index 13151c4e3..7b5fb12b5 100644 --- a/i18n/uz_UZ_Cyrl.po +++ b/i18n/uz_UZ_Cyrl.po @@ -119,6 +119,9 @@ msgstr "" msgid "View as Chart" msgstr "Диаграмма сифатида кўриш" +msgid "This map can't be displayed as a table" +msgstr "Ушбу харитани жадвал сифатида кўратиб бўлмайди" + msgid "View as Pivot table" msgstr "" diff --git a/package.json b/package.json index 44e4d9ed8..46e6517b6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "license": "BSD-3-Clause", "dependencies": { - "@dhis2/analytics": "^26.6.9", + "@dhis2/analytics": "^26.6.10", "@dhis2/app-runtime": "^3.10.2", "@dhis2/app-runtime-adapter-d2": "^1.1.0", "@dhis2/d2-i18n": "^1.1.3", diff --git a/yarn.lock b/yarn.lock index 4a24f6ec6..aa8b14455 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2245,10 +2245,10 @@ classnames "^2.3.1" prop-types "^15.7.2" -"@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== +"@dhis2/analytics@^26.6.10": + version "26.6.10" + resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.10.tgz#669fab3007b609a3c1a692a8261c759198e7035f" + integrity sha512-RHBvMdAuoDpSwxcoBTSsTWlhTUy8nJbKCANbFnB3NcBjsh+XMhwFJSkCGnCKElkhWbrm9h8kZVobqv62p6W2cA== dependencies: "@dhis2/d2-ui-rich-text" "^7.4.1" "@dhis2/multi-calendar-dates" "1.0.0"