From 90afa9a69c510007fc34f35226811ac23fc1319b Mon Sep 17 00:00:00 2001 From: LeviCameron1 Date: Tue, 26 Aug 2025 13:22:15 -0500 Subject: [PATCH 1/3] Added top and bottom room objects --- .../postgresql/cageui-25.001-25.002.sql | 23 +++++++++++++++++++ CageUI/resources/web/CageUI/static/bottom.svg | 11 +++++++++ CageUI/resources/web/CageUI/static/top.svg | 8 +++++++ CageUI/src/client/types/typings.ts | 2 ++ .../src/org/labkey/cageui/CageUIModule.java | 2 +- 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 CageUI/resources/schemas/dbscripts/postgresql/cageui-25.001-25.002.sql create mode 100644 CageUI/resources/web/CageUI/static/bottom.svg create mode 100644 CageUI/resources/web/CageUI/static/top.svg diff --git a/CageUI/resources/schemas/dbscripts/postgresql/cageui-25.001-25.002.sql b/CageUI/resources/schemas/dbscripts/postgresql/cageui-25.001-25.002.sql new file mode 100644 index 000000000..3e80bdeb4 --- /dev/null +++ b/CageUI/resources/schemas/dbscripts/postgresql/cageui-25.001-25.002.sql @@ -0,0 +1,23 @@ +/* + * + * * Copyright (c) 2025 Board of Regents of the University of Wisconsin System + * * + * * Licensed under the Apache License, Version 2.0 (the "License"); + * * you may not use this file except in compliance with the License. + * * You may obtain a copy of the License at + * * + * * http://www.apache.org/licenses/LICENSE-2.0 + * * + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, + * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * See the License for the specific language governing permissions and + * * limitations under the License. + * + */ + +insert into ehr_lookups.lookups (set_name,container,value, category, title) +select setname, container, 105 as value, 'Room Object' as category, 'Top' as title from ehr_lookups.lookup_sets where setname='cageui_item_types'; + +insert into ehr_lookups.lookups (set_name,container,value, category, title) +select setname, container, 106 as value, 'Room Object' as category, 'Bottom' as title from ehr_lookups.lookup_sets where setname='cageui_item_types'; diff --git a/CageUI/resources/web/CageUI/static/bottom.svg b/CageUI/resources/web/CageUI/static/bottom.svg new file mode 100644 index 000000000..0734f6915 --- /dev/null +++ b/CageUI/resources/web/CageUI/static/bottom.svg @@ -0,0 +1,11 @@ + + + + B + O + T + T + OM + + \ No newline at end of file diff --git a/CageUI/resources/web/CageUI/static/top.svg b/CageUI/resources/web/CageUI/static/top.svg new file mode 100644 index 000000000..caa7663a6 --- /dev/null +++ b/CageUI/resources/web/CageUI/static/top.svg @@ -0,0 +1,8 @@ + + + + T + OP + + \ No newline at end of file diff --git a/CageUI/src/client/types/typings.ts b/CageUI/src/client/types/typings.ts index 5f1ef0a79..80e793ca9 100644 --- a/CageUI/src/client/types/typings.ts +++ b/CageUI/src/client/types/typings.ts @@ -52,6 +52,8 @@ export enum RoomObjectTypes { Door = 102, GateClosed = 103, GateOpen = 104, + Top = 104, + Bottom = 104, } // value in the cage modifications table in EHR diff --git a/CageUI/src/org/labkey/cageui/CageUIModule.java b/CageUI/src/org/labkey/cageui/CageUIModule.java index c4fac97eb..f4099aeda 100644 --- a/CageUI/src/org/labkey/cageui/CageUIModule.java +++ b/CageUI/src/org/labkey/cageui/CageUIModule.java @@ -60,7 +60,7 @@ public String getName() @Override public @Nullable Double getSchemaVersion() { - return 25.001; + return 25.002; } @Override From 78cdb403b8803c50e26c69d48e8b5f804fde094a Mon Sep 17 00:00:00 2001 From: LeviCameron1 Date: Tue, 26 Aug 2025 14:17:33 -0500 Subject: [PATCH 2/3] add top and bottom to editor --- CageUI/src/client/components/layoutEditor/Editor.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CageUI/src/client/components/layoutEditor/Editor.tsx b/CageUI/src/client/components/layoutEditor/Editor.tsx index 5168db6d7..12e4d7628 100644 --- a/CageUI/src/client/components/layoutEditor/Editor.tsx +++ b/CageUI/src/client/components/layoutEditor/Editor.tsx @@ -810,6 +810,18 @@ const Editor: FC = ({roomSize}) => {
+ + + + + + Date: Tue, 26 Aug 2025 14:19:32 -0500 Subject: [PATCH 3/3] Bug fix for incorrect cage numbering search --- CageUI/src/client/components/layoutEditor/Editor.tsx | 2 +- CageUI/src/client/utils/LayoutEditorHelpers.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CageUI/src/client/components/layoutEditor/Editor.tsx b/CageUI/src/client/components/layoutEditor/Editor.tsx index 12e4d7628..4853fa326 100644 --- a/CageUI/src/client/components/layoutEditor/Editor.tsx +++ b/CageUI/src/client/components/layoutEditor/Editor.tsx @@ -216,7 +216,7 @@ const Editor: FC = ({roomSize}) => { textElement.setAttribute('contentEditable', 'true'); (textElement.children[0] as SVGTSpanElement).style.cursor = "pointer"; (textElement.children[0] as SVGTSpanElement).style.pointerEvents = "auto"; - const cageGroupElement = textElement.closest(`[id^=${roomItemToString(updateItemType)}]`) as SVGGElement; + const cageGroupElement = textElement.closest(`[id=${roomItemToString(updateItemType)}]`) as SVGGElement; setupEditCageEvent(cageGroupElement, setSelectedObj, contextMenuRef,setCtxMenuStyle, roomItemToString(updateItemType) as RackStringType); }); }else{ diff --git a/CageUI/src/client/utils/LayoutEditorHelpers.ts b/CageUI/src/client/utils/LayoutEditorHelpers.ts index 28ef42c07..8ddc1d989 100644 --- a/CageUI/src/client/utils/LayoutEditorHelpers.ts +++ b/CageUI/src/client/utils/LayoutEditorHelpers.ts @@ -458,10 +458,10 @@ export async function mergeRacks(props: MergeProps) { } if (action !== 'cancel') { let targetRackShape: d3.Selection - = layoutSvg.select(`[id^=${targetRack.itemId}]`); + = layoutSvg.select(`[id=${targetRack.itemId}]`); let draggedRackShape: d3.Selection - = layoutSvg.select(`[id^=${draggedRack.itemId}]`); + = layoutSvg.select(`[id=${draggedRack.itemId}]`); let newGroup: d3.Selection;