From 3cd149c2096da2ee14c3266fb7634ee86e446619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Fri, 8 May 2026 00:50:52 +0200 Subject: [PATCH 1/3] fix: handle new bundled app endpoint format --- i18n/en.pot | 12 ++++++++++-- src/components/AppDataProvider/AppDataProvider.jsx | 4 +++- .../AppDataProvider/useBundledAppsQuery.js | 8 +++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 433ce3533..e3bb1c7e9 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2025-10-28T16:09:41.600Z\n" -"PO-Revision-Date: 2025-10-28T16:09:41.601Z\n" +"POT-Creation-Date: 2026-05-07T22:45:54.825Z\n" +"PO-Revision-Date: 2026-05-07T22:45:54.825Z\n" msgid "Untitled dashboard" msgstr "Untitled dashboard" @@ -783,3 +783,11 @@ msgstr "1 minute per slide" msgid "2 minutes per slide" msgstr "2 minutes per slide" + +msgctxt "Application title" +msgid "__MANIFEST_APP_TITLE" +msgstr "Dashboard" + +msgctxt "Application description" +msgid "__MANIFEST_APP_DESCRIPTION" +msgstr "DHIS2 Dashboard app" diff --git a/src/components/AppDataProvider/AppDataProvider.jsx b/src/components/AppDataProvider/AppDataProvider.jsx index c2907f44d..6941993cd 100644 --- a/src/components/AppDataProvider/AppDataProvider.jsx +++ b/src/components/AppDataProvider/AppDataProvider.jsx @@ -123,7 +123,9 @@ const useInstalledAppVersion = (appKey) => { const { apps, bundledApps } = useContext(AppDataCtx) return ( apps.find((app) => app.key === appKey)?.version ?? - bundledApps.find((app) => app.name === appKey)?.version ?? + bundledApps.find( + (app) => app.name === appKey || app.name === `${appKey}-app` + )?.version ?? '0.0.0' ) } diff --git a/src/components/AppDataProvider/useBundledAppsQuery.js b/src/components/AppDataProvider/useBundledAppsQuery.js index 503d2ec25..d89b70ec1 100644 --- a/src/components/AppDataProvider/useBundledAppsQuery.js +++ b/src/components/AppDataProvider/useBundledAppsQuery.js @@ -19,7 +19,13 @@ export function useBundledAppsQuery() { throw new Error('Fetch response not OK') } else { const data = await response.json() - return data + if (Array.isArray(data)) { + return data + } + if (Array.isArray(data?.apps)) { + return data.apps + } + return [] } }, [baseUrl]) From 7a181f78dfe517588c81e5c4e4331050f02da33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Fri, 8 May 2026 01:00:37 +0200 Subject: [PATCH 2/3] chore: set 2.41 min version --- d2.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2.config.js b/d2.config.js index 0185028f7..096fe2d2c 100644 --- a/d2.config.js +++ b/d2.config.js @@ -5,7 +5,7 @@ const config = { coreApp: true, id: '8a05188c-5b2d-496d-a08e-595810748d52', - minDHIS2Version: '2.40', + minDHIS2Version: '2.41', direction: 'auto', From 2badd56a9ccdb9614aff8df67876e2944f35a6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Henrik=20=C3=98verland?= Date: Fri, 8 May 2026 01:14:14 +0200 Subject: [PATCH 3/3] chore: keep min version 2.40 --- d2.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2.config.js b/d2.config.js index 096fe2d2c..0185028f7 100644 --- a/d2.config.js +++ b/d2.config.js @@ -5,7 +5,7 @@ const config = { coreApp: true, id: '8a05188c-5b2d-496d-a08e-595810748d52', - minDHIS2Version: '2.41', + minDHIS2Version: '2.40', direction: 'auto',