diff --git a/frontend/cypress.config.js b/frontend/cypress.config.js index a1d7fa78c6..565db9634a 100755 --- a/frontend/cypress.config.js +++ b/frontend/cypress.config.js @@ -17,7 +17,6 @@ module.exports = defineConfig({ "cypress/e2e/report.cy.js", "cypress/e2e/batchOrderEntry.cy.js", "cypress/e2e/dashboard.cy.js", - ]; return config; }, diff --git a/frontend/cypress/pages/HomePage.js b/frontend/cypress/pages/HomePage.js index c17ed33c54..e41d863cb6 100755 --- a/frontend/cypress/pages/HomePage.js +++ b/frontend/cypress/pages/HomePage.js @@ -11,7 +11,6 @@ import StudyReportPage from "./StudyReportPage"; import DashBoardPage from "./DashBoard"; - class HomePage { constructor() {} @@ -115,7 +114,6 @@ class HomePage { cy.get("#menu_reports").click(); cy.get("#menu_reports_study_nav").click(); return new StudyReportPage(); - } goToPathologyDashboard() { this.openNavigationMenu(); @@ -129,7 +127,6 @@ class HomePage { cy.get("#menu_immunochem_dropdown").click(); cy.get("#menu_immunochemdashboard_nav").click(); return new DashBoardPage(); - } } diff --git a/frontend/src/components/admin/Admin.js b/frontend/src/components/admin/Admin.js index 179efad4fc..541f294424 100644 --- a/frontend/src/components/admin/Admin.js +++ b/frontend/src/components/admin/Admin.js @@ -40,7 +40,7 @@ import { SideNavMenuItem, } from "@carbon/react"; import { CommonProperties } from "./menu/CommonProperties"; -import ConfigMenuDisplay from "./formEntry/common/ConfigMenuDisplay"; +import ConfigMenuDisplay from "./generalConfig/common/ConfigMenuDisplay"; import ProviderMenu from "./ProviderMenu/ProviderMenu"; import BarcodeConfiguration from "./barcodeConfiguration/BarcodeConfiguration"; import AnalyzerTestName from "./analyzerTestName/AnalyzerTestName.js"; diff --git a/frontend/src/components/admin/formEntry/common/ConfigMenuDisplay.js b/frontend/src/components/admin/generalConfig/common/ConfigMenuDisplay.js similarity index 99% rename from frontend/src/components/admin/formEntry/common/ConfigMenuDisplay.js rename to frontend/src/components/admin/generalConfig/common/ConfigMenuDisplay.js index 53228ec4d9..2d4eca72a6 100644 --- a/frontend/src/components/admin/formEntry/common/ConfigMenuDisplay.js +++ b/frontend/src/components/admin/generalConfig/common/ConfigMenuDisplay.js @@ -33,7 +33,7 @@ import { import config from "../../../../config.json"; import { FormattedMessage, useIntl } from "react-intl"; import PageBreadCrumb from "../../../common/PageBreadCrumb.js"; -import GenericConfigEdit from "../../formEntry/common/GenericConfigEdit.js"; +import GenericConfigEdit from "../../generalConfig/common/GenericConfigEdit.js"; let breadcrumbs = [{ label: "home.label", link: "/" }]; function ConfigMenuDisplay(props) { diff --git a/frontend/src/components/admin/formEntry/common/GenericConfigEdit.js b/frontend/src/components/admin/generalConfig/common/GenericConfigEdit.js similarity index 97% rename from frontend/src/components/admin/formEntry/common/GenericConfigEdit.js rename to frontend/src/components/admin/generalConfig/common/GenericConfigEdit.js index 379a934a95..179139bd50 100644 --- a/frontend/src/components/admin/formEntry/common/GenericConfigEdit.js +++ b/frontend/src/components/admin/generalConfig/common/GenericConfigEdit.js @@ -98,7 +98,8 @@ const GenericConfigEdit = ({ menuType, ID }) => { setTextInputEnglishValue(newValue); updateFormEntryConfig({ localization: { - ...FormEntryConfig.localization, + id: FormEntryConfig.localization.id, + description: FormEntryConfig.localization.description, localeValues: { ...FormEntryConfig.localization.localeValues, en: newValue, @@ -112,7 +113,8 @@ const GenericConfigEdit = ({ menuType, ID }) => { setTextInputFrenchValue(newValue); updateFormEntryConfig({ localization: { - ...FormEntryConfig.localization, + id: FormEntryConfig.localization.id, + description: FormEntryConfig.localization.description, localeValues: { ...FormEntryConfig.localization.localeValues, fr: newValue, @@ -332,7 +334,7 @@ const GenericConfigEdit = ({ menuType, ID }) => { {!FormEntryConfig.tag && ( - + { <>
- + } @@ -353,7 +355,7 @@ const GenericConfigEdit = ({ menuType, ID }) => { onChange={handleInputEnglishChange} /> - + } diff --git a/frontend/src/components/layout/Header.js b/frontend/src/components/layout/Header.js index 070cea2ead..7638536d25 100644 --- a/frontend/src/components/layout/Header.js +++ b/frontend/src/components/layout/Header.js @@ -102,7 +102,7 @@ function OEHeader(props) { getFromOpenElisServer("/rest/notifications", (data) => { setReadNotifications([]); setUnReadNotifications([]); - data.forEach((element) => { + data?.forEach((element) => { if (element.readAt) { setReadNotifications((prev) => [...prev, element]); } else { diff --git a/frontend/src/components/reports/common/ReportByDate.js b/frontend/src/components/reports/common/ReportByDate.js index 6a1a2f044e..2c089446a2 100644 --- a/frontend/src/components/reports/common/ReportByDate.js +++ b/frontend/src/components/reports/common/ReportByDate.js @@ -245,7 +245,13 @@ const ReportByDate = (props) => { )} - diff --git a/frontend/src/components/utils/Utils.js b/frontend/src/components/utils/Utils.js index a35812d505..b59895d595 100644 --- a/frontend/src/components/utils/Utils.js +++ b/frontend/src/components/utils/Utils.js @@ -224,7 +224,7 @@ export const getFromOpenElisServerV2 = (url) => { if (res) { resolve(res); } else { - reject(new Error("Failed to fetch data")); + reject("Failed to fetch Subscription data"); } }); }); diff --git a/pom.xml b/pom.xml index 61880cc82b..d7db495d4a 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 0 3 - 1 + 2 UTF-8 ${project.basedir}/liquibase/liquibase.properties 1.4.1 diff --git a/src/main/java/org/openelisglobal/common/rest/DisplayListController.java b/src/main/java/org/openelisglobal/common/rest/DisplayListController.java index 074e70e521..941ef8f214 100644 --- a/src/main/java/org/openelisglobal/common/rest/DisplayListController.java +++ b/src/main/java/org/openelisglobal/common/rest/DisplayListController.java @@ -25,6 +25,7 @@ import org.openelisglobal.common.util.ConfigurationProperties.Property; import org.openelisglobal.common.util.DateUtil; import org.openelisglobal.common.util.IdValuePair; +import org.openelisglobal.common.util.LabelValuePair; import org.openelisglobal.common.util.SystemConfiguration; import org.openelisglobal.dictionary.service.DictionaryService; import org.openelisglobal.dictionary.valueholder.Dictionary; @@ -547,4 +548,11 @@ public int compare(TestDisplayBean o1, TestDisplayBean o2) { return testItems; } + + @GetMapping(value = "systemroles", produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public List getRoles(@RequestParam(required = false) String sampleType) { + return roleService.getAllActiveRoles().stream().filter(r -> !r.getGroupingRole()) + .map(r -> new LabelValuePair(r.getDescription(), r.getName())).collect(Collectors.toList()); + } }