From c2a4bb1f6626fd6313bc8a8a08086bae4ad61fc5 Mon Sep 17 00:00:00 2001 From: Joy A Date: Wed, 30 Oct 2024 10:43:36 +0530 Subject: [PATCH 1/5] #1540 | Nil check for CustomDashboard activeDashboardUUID --- .../src/views/customDashboard/CustomDashboardView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js index 63c533a3c..a92ffc31c 100644 --- a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js +++ b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js @@ -332,7 +332,7 @@ class CustomDashboardView extends AbstractComponent { let filterConfigs, asOnDateFilterUUID, asOnDateFilter, asOnDateFilterValue, filters, dashboard; const hasDashboards = this.state.dashboards.length !== 0; - if (hasDashboards) { + if (hasDashboards && !_.isNil(this.state.activeDashboardUUID)) { dashboard = this.state.dashboards.find((x) => x.uuid === this.state.activeDashboardUUID); filters = dashboardFilterService.getFilters(dashboard.uuid); filterConfigs = dashboardFilterService.getFilterConfigsForDashboard(dashboard.uuid); From 633c7fdb9c5195c01c7d5fb374d95afa940edaf0 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Wed, 30 Oct 2024 14:45:20 +0530 Subject: [PATCH 2/5] #1540 - CustomDashboardView render works if there are no dashboards. So if there are no active dashboards then treat it as no dashboards. --- .../src/views/customDashboard/CustomDashboardView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js index a92ffc31c..7a77559f4 100644 --- a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js +++ b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js @@ -331,8 +331,8 @@ class CustomDashboardView extends AbstractComponent { const dashboardFilterService = this.getService(DashboardFilterService); let filterConfigs, asOnDateFilterUUID, asOnDateFilter, asOnDateFilterValue, filters, dashboard; - const hasDashboards = this.state.dashboards.length !== 0; - if (hasDashboards && !_.isNil(this.state.activeDashboardUUID)) { + const hasDashboards = this.state.dashboards.length !== 0 && !_.isNil(this.state.activeDashboardUUID); + if (hasDashboards) { dashboard = this.state.dashboards.find((x) => x.uuid === this.state.activeDashboardUUID); filters = dashboardFilterService.getFilters(dashboard.uuid); filterConfigs = dashboardFilterService.getFilterConfigsForDashboard(dashboard.uuid); From 8f9a5967c2ea92027ce009eac038fb79e9f8ce25 Mon Sep 17 00:00:00 2001 From: Joy A Date: Fri, 1 Nov 2024 17:16:29 +0530 Subject: [PATCH 3/5] #1475 | Show fixed English error message if connection to server is unavailable on first launch before translations have been synced. --- packages/openchs-android/src/views/RootView.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/openchs-android/src/views/RootView.js b/packages/openchs-android/src/views/RootView.js index 88fd79e27..dc71a3851 100644 --- a/packages/openchs-android/src/views/RootView.js +++ b/packages/openchs-android/src/views/RootView.js @@ -47,8 +47,7 @@ class RootView extends AbstractComponent { try { await authService.fetchAuthSettingsFromServer(); } catch (error) { - const i18n = this.getService(MessageService).getI18n(); - getAvniError(error, i18n).then(avniError => AlertMessage(i18n.t('Error'), avniError.getDisplayMessage(), BackHandler.exitApp)); + return AlertMessage('Error', 'Server under maintenance. Please try again after sometime.\n\nPlease kill the app and relaunch if stuck on logo screen.', BackHandler.exitApp); } } const decisionParameters = await this.nextScreenDecisionParameters(); From 98309625fb82638bad37e65e9cc0287f4ba4fa3e Mon Sep 17 00:00:00 2001 From: himeshr Date: Fri, 8 Nov 2024 19:43:25 +0530 Subject: [PATCH 4/5] #1544 | Upgrade models version --- packages/openchs-android/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openchs-android/package.json b/packages/openchs-android/package.json index fee05a5f0..eefa1e0a0 100644 --- a/packages/openchs-android/package.json +++ b/packages/openchs-android/package.json @@ -59,7 +59,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.32.16", + "openchs-models": "1.32.17", "jshashes": "1.0.8", "prop-types": "15.8.1", "react": "18.2.0", From 2233a080867b0c3981d6dc63c2fdcdeeec43d155 Mon Sep 17 00:00:00 2001 From: himeshr Date: Fri, 8 Nov 2024 20:08:07 +0530 Subject: [PATCH 5/5] #1544 | Upgrade models version --- packages/openchs-android/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openchs-android/package.json b/packages/openchs-android/package.json index eefa1e0a0..33e6584ef 100644 --- a/packages/openchs-android/package.json +++ b/packages/openchs-android/package.json @@ -59,7 +59,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.32.17", + "openchs-models": "1.32.19", "jshashes": "1.0.8", "prop-types": "15.8.1", "react": "18.2.0",