Skip to content

Commit

Permalink
Merge branch 'develop' into massindexer
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 authored Aug 13, 2024
2 parents f5f1658 + 8053b98 commit a26f937
Show file tree
Hide file tree
Showing 15 changed files with 516 additions and 1,027 deletions.
44 changes: 22 additions & 22 deletions frontend/cypress/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class HomePage {

goToOrderPage() {
this.openNavigationMenu();
cy.get("#menu_sample").click();
cy.get("#menu_sample_add").click();
cy.get("#menu_sample_dropdown").click();
cy.get("#menu_sample_add_nav").click();
return new OrderEntityPage();
}

Expand All @@ -32,69 +32,69 @@ class HomePage {

goToBatchOrderEntry() {
this.openNavigationMenu();
cy.get("#menu_sample").click();
cy.get("#menu_sample_batch_entry").click();
cy.get("#menu_sample_dropdown").click();
cy.get("#menu_sample_batch_entry_nav").click();
return new BatchOrderEntry();
}

goToPatientEntry() {
this.openNavigationMenu();
cy.get("#menu_patient").click();
cy.get("#menu_patient_add_or_edit").click();
cy.get("#menu_patient_dropdown").click();
cy.get("#menu_patient_add_or_edit_nav").click();
return new PatientEntryPage();
}

goToModifyOrderPage() {
this.openNavigationMenu();
cy.get("#menu_sample").click();
cy.get("#menu_sample_edit").click();
cy.get("#menu_sample_dropdown").click();
cy.get("#menu_sample_edit_nav").click();
return new ModifyOrderPage();
}
goToWorkPlanPlanByTest() {
this.openNavigationMenu();
cy.get("#menu_workplan").click();
cy.get("#menu_workplan_test").click();
cy.get("#menu_workplan_dropdown").click();
cy.get("#menu_workplan_test_nav").click();
return new WorkPlan();
}

goToWorkPlanPlanByPanel() {
this.openNavigationMenu();
cy.get("#menu_workplan").click();
cy.get("#menu_workplan_panel").click();
cy.get("#menu_workplan_dropdown").click();
cy.get("#menu_workplan_panel_nav").click();
return new WorkPlan();
}

goToWorkPlanPlanByUnit() {
this.openNavigationMenu();
cy.get("#menu_workplan").click();
cy.get("#menu_workplan_bench").click();
cy.get("#menu_workplan_dropdown").click();
cy.get("#menu_workplan_bench_nav").click();
return new WorkPlan();
}

goToWorkPlanPlanByPriority() {
this.openNavigationMenu();
cy.get("#menu_workplan").click();
cy.get("#menu_workplan_priority").click();
cy.get("#menu_workplan_dropdown").click();
cy.get("#menu_workplan_priority_nav").click();
return new WorkPlan();
}

goToReportNCE() {
this.openNavigationMenu();
cy.get("#menu_nonconformity").click();
cy.get("#menu_non_conforming_report").click();
cy.get("#menu_nonconformity_dropdown").click();
cy.get("#menu_non_conforming_report_nav").click();
return new NonConform();
}

goToViewNCE() {
this.openNavigationMenu();
cy.get("#menu_nonconformity").click();
cy.get("#menu_non_conforming_view").click();
cy.get("#menu_nonconformity_dropdown").click();
cy.get("#menu_non_conforming_view_nav").click();
return new NonConform();
}
goToCorrectiveActions() {
this.openNavigationMenu();
cy.get("#menu_nonconformity").click();
cy.get("#menu_non_conforming_corrective_actions").click();
cy.get("#menu_nonconformity_dropdown").click();
cy.get("#menu_non_conforming_corrective_actions_nav").click();
return new NonConform();
}
}
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/components/Style.css
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,18 @@ button {
padding-left: 1rem !important;
}

.cds--side-nav__link:hover {
.top-level-menu-item > a {
pointer-events: auto !important;
text-decoration: none !important;
}

.top-level-menu-item > a:hover {
background-color: var(--cds-background-hover, #072655);
}

/* .cds--side-nav__link {
#mainHeader .cds--side-nav__link {
pointer-events: none
} */
}

@media screen and (max-width: 792px) {
.banner h5 {
Expand Down
129 changes: 65 additions & 64 deletions frontend/src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,15 @@ function OEHeader(props) {
if (menuItem.menu.isActive) {
if (level === 0 && menuItem.childMenus.length > 0) {
return (
<React.Fragment key={path}>
<span id={menuItem.menu.elementId} key={path}>
<span
id={menuItem.menu.elementId}
id={menuItem.menu.elementId + "_dropdown"}
onClick={(e) => {
setMenuItemExpanded(e, menuItem, path);
}}
>
<SideNavMenu
className="top-level-menu-item"
aria-label={intl.formatMessage({
id: menuItem.menu.displayKey,
})}
Expand All @@ -200,38 +201,52 @@ function OEHeader(props) {
})}
key={"menu_" + index + "_" + level}
defaultExpanded={menuItem.expanded}
onClick={(e) => {
setMenuItemExpanded(e, menuItem, path);
}}
// onClick={(e) => { // not supported yet, but if it becomes so we can simplify the functionality here by having this here and not have a span around it
// setMenuItemExpanded(e, menuItem, path);
// }}
>
{menuItem.childMenus.map((childMenuItem, index) => {
return generateMenuItems(
childMenuItem,
index,
level + 1,
path + ".childMenus[" + index + "]",
);
})}
<span
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
}}
>
{menuItem.childMenus.map((childMenuItem, index) => {
return generateMenuItems(
childMenuItem,
index,
level + 1,
path + ".childMenus[" + index + "]",
);
})}
</span>
</SideNavMenu>
</span>
</React.Fragment>
</span>
);
} else if (level === 0) {
return (
<React.Fragment key={path}>
<span key={path} id={menuItem.menu.elementId}>
<SideNavMenuItem
id={menuItem.menu.elementId}
id={menuItem.menu.elementId + "_nav"}
href={menuItem.menu.actionURL}
target={menuItem.menu.openInNewWindow ? "_blank" : ""}
className="top-level-menu-item"
>
{renderSideNavMenuItemLabel(menuItem, level)}
</SideNavMenuItem>
</React.Fragment>
</span>
);
} else {
return (
<React.Fragment key={path}>
<SideNavMenuItem className="reduced-padding-nav-menu-item">
<span id={menuItem.menu.elementId} key={path}>
<SideNavMenuItem
className="reduced-padding-nav-menu-item"
href={menuItem.menu.actionURL}
target={menuItem.menu.openInNewWindow ? "_blank" : ""}
style={{ width: "100%" }}
rel="noreferrer"
>
<span style={{ display: "flex", width: "100%" }}>
{!menuItem.menu.actionURL &&
!hasActiveChildMenu(menuItem) &&
Expand Down Expand Up @@ -261,7 +276,7 @@ function OEHeader(props) {
</span>
);
})}
</React.Fragment>
</span>
);
}
} else {
Expand All @@ -284,27 +299,20 @@ function OEHeader(props) {
const renderSingleNavButton = (menuItem, index, level, path) => {
const marginValue = (level - 1) * 0.5 + "rem";
return (
<a
id={menuItem.menu.elementId}
href={menuItem.menu.actionURL}
target={menuItem.menu.openInNewWindow ? "_blank" : ""}
style={{ width: "100%" }}
rel="noreferrer"
<button
className={"custom-sidenav-button"}
style={{ width: "100%", marginLeft: marginValue }}
id={menuItem.menu.elementId + "_nav"}
onClick={() => {
if (menuItem.menu.openInNewWindow) {
window.open(menuItem.menu.actionURL);
} else {
window.location.href = menuItem.menu.actionURL;
}
}}
>
<button
className={"custom-sidenav-button"}
style={{ marginLeft: marginValue }}
onClick={() => {
if (menuItem.menu.openInNewWindow) {
window.open(menuItem.menu.actionURL);
} else {
window.location.href = menuItem.menu.actionURL;
}
}}
>
{renderSideNavMenuItemLabel(menuItem, level)}
</button>
</a>
{renderSideNavMenuItemLabel(menuItem, level)}
</button>
);
};

Expand All @@ -329,31 +337,24 @@ function OEHeader(props) {
const marginValue = (level - 1) * 0.5 + "rem";
return (
<>
<a
id={menuItem.menu.elementId}
href={menuItem.menu.actionURL}
target={menuItem.menu.openInNewWindow ? "_blank" : ""}
style={{ width: "100%" }}
rel="noreferrer"
>
<button
className={
menuItem.menu.actionURL
? "custom-sidenav-button"
: "custom-sidenav-button-unclickable"
<button
id={menuItem.menu.elementId + "_nav"}
className={
menuItem.menu.actionURL
? "custom-sidenav-button"
: "custom-sidenav-button-unclickable"
}
style={{ marginLeft: marginValue }}
onClick={() => {
if (menuItem.menu.openInNewWindow) {
window.open(menuItem.menu.actionURL);
} else {
window.location.href = menuItem.menu.actionURL;
}
style={{ marginLeft: marginValue }}
onClick={() => {
if (menuItem.menu.openInNewWindow) {
window.open(menuItem.menu.actionURL);
} else {
window.location.href = menuItem.menu.actionURL;
}
}}
>
{renderSideNavMenuItemLabel(menuItem, level)}
</button>
</a>
}}
>
{renderSideNavMenuItemLabel(menuItem, level)}
</button>
{menuItem.childMenus.length > 0 && (
<button
id={menuItem.menu.displayKey + "_dropdown"}
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<minor.version>8</minor.version>
<state.version>1</state.version>
<!-- 0 = alpha, 1 = beta, 2 = rc, 3 = deployable -->
<fix.version>38</fix.version>
<fix.version>39</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 Expand Up @@ -84,10 +84,10 @@
<version>2.12.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.12.3</version>
</dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.12.3</version>
</dependency>
<!-- APACHE ASSORTED DEPENDENCIES -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,6 @@ public List<Analysis> getAllAnalysisByTestsAndStatusAndCompletedDateRange(List<I
String sql = "from Analysis a where a.test.id IN (:testList) and a.statusId IN (:analysisStatusList)"
+ " and a.sampleItem.sample.statusId IN (:sampleStatusList) and a.completedDate"
+ " BETWEEN :lowDate AND :highDate order by a.sampleItem.sample.accessionNumber";

for (Integer testId : testIdList) {
testList.add(testId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public byte[] runReport() throws UnsupportedEncodingException, IOException, Ille
buffer.write(WHONETcsvRoutineColumnBuilder.getColumnNamesLine().getBytes("windows-1252"));

writeResultsToBuffer(buffer);
WHONETcsvRoutineColumnBuilder.closeResultSet();

return buffer.toByteArray();
}
Expand Down
Loading

0 comments on commit a26f937

Please sign in to comment.