Skip to content

Commit

Permalink
Merge pull request I-TECH-UW#1255 from mozzy11/develop
Browse files Browse the repository at this point in the history
Agg system roles end point and other minor fixes
  • Loading branch information
mozzy11 authored Aug 29, 2024
2 parents c4f5710 + 538f266 commit b8bd969
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 16 deletions.
1 change: 0 additions & 1 deletion frontend/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = defineConfig({
"cypress/e2e/report.cy.js",
"cypress/e2e/batchOrderEntry.cy.js",
"cypress/e2e/dashboard.cy.js",

];
return config;
},
Expand Down
3 changes: 0 additions & 3 deletions frontend/cypress/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import StudyReportPage from "./StudyReportPage";

import DashBoardPage from "./DashBoard";


class HomePage {
constructor() {}

Expand Down Expand Up @@ -115,7 +114,6 @@ class HomePage {
cy.get("#menu_reports").click();
cy.get("#menu_reports_study_nav").click();
return new StudyReportPage();

}
goToPathologyDashboard() {
this.openNavigationMenu();
Expand All @@ -129,7 +127,6 @@ class HomePage {
cy.get("#menu_immunochem_dropdown").click();
cy.get("#menu_immunochemdashboard_nav").click();
return new DashBoardPage();

}
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -332,7 +334,7 @@ const GenericConfigEdit = ({ menuType, ID }) => {
</h4>
</Column>
{!FormEntryConfig.tag && (
<Column lg={3}>
<Column lg={8}>
<TextInput
id="textInput"
value={textInputValue}
Expand All @@ -345,15 +347,15 @@ const GenericConfigEdit = ({ menuType, ID }) => {
<>
<br />
<Grid>
<Column lg={3}>
<Column lg={8}>
<TextInput
id="myInputEnglish"
labelText={<FormattedMessage id="english.label" />}
value={textInputEnglishValue}
onChange={handleInputEnglishChange}
/>
</Column>
<Column lg={3}>
<Column lg={8}>
<TextInput
id="myInputFrench"
labelText={<FormattedMessage id="french.label" />}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/reports/common/ReportByDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,13 @@ const ReportByDate = (props) => {
</div>
)}

<Button type="button" onClick={handleSubmit} disabled={!reportFormValues.startDate && !reportFormValues.endDate}>
<Button
type="button"
onClick={handleSubmit}
disabled={
!reportFormValues.startDate && !reportFormValues.endDate
}
>
<FormattedMessage
id="label.button.generatePrintableVersion"
defaultMessage="Generate printable version"
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/reports/common/ReportByID.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ function ReportByID(props) {
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Button type="button" onClick={handleSubmit} disabled={!nationalId} >
<Button
type="button"
onClick={handleSubmit}
disabled={!nationalId}
>
<FormattedMessage id="label.button.generatePrintableVersion" />
</Button>
</Section>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<minor.version>0</minor.version>
<state.version>3</state.version>
<!-- 0 = alpha, 1 = beta, 2 = rc, 3 = deployable -->
<fix.version>1</fix.version>
<fix.version>2</fix.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<liquibase.propertyFile>${project.basedir}/liquibase/liquibase.properties</liquibase.propertyFile>
<castor.version>1.4.1</castor.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -547,4 +548,11 @@ public int compare(TestDisplayBean o1, TestDisplayBean o2) {
return testItems;

}

@GetMapping(value = "systemroles", produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public List<LabelValuePair> 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());
}
}

0 comments on commit b8bd969

Please sign in to comment.