From 1f7bfd1ea8d1837246b49dd32338f35433892d9d Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 12:28:09 -0700 Subject: [PATCH 1/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- .../web/onprc_ehr/panel/RoomLayoutPanel.js | 96 +++++++++++++------ 1 file changed, 65 insertions(+), 31 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index e8cf1f826..fcc170027 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -148,7 +148,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { 'Cages are colored Green when they are empty.
' + 'Cages are colored Yellow when they are flagged as \"Unavailable\".
' + 'Cages are colored Orange when they are flagged as \"Transfer Pending\".
' + - 'Cages are colored light blue when they are flagged as \"Held for Colony\".' + 'Cages are colored light blue when they are flagged as \"Held for Colony\".' + + 'Cages are colored Brown when they are flagged as \"Epen Caging\".'+ + 'Cages are colored Pink when they are flagged as \"Surgery Recovery\".' }); } @@ -289,9 +291,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { animalItems.push({ html: '' + animals.length + ' animals', border: false, - bodyStyle: { - 'background-color': 'transparent' - } + // bodyStyle: { + // 'background-color': 'transparent' + // } }); } else if (animals.length){ @@ -300,9 +302,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { html: '' + animal + '' + (config.animalMap[animal] ? ': ' + Ext4.util.Format.round(config.animalMap[animal].getValue('Id/mostRecentWeight/mostRecentWeight'), 1) : '') + '', animal: animal, border: false, - bodyStyle: { - 'background-color': 'transparent' - }, + // bodyStyle: { + // 'background-color': 'transparent' + // }, listeners: { scope: this, afterrender: function(cmp){ @@ -333,7 +335,7 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { var prevCage = (colIdx > 1) ? cages[colIdx - 1] : null; var cageType = row.get('cage_type'); var status = row.get('status'); - var colorcage = row.get('uuid') //redfined as cage color background Modified 11-12-2023 R. Blasa + var colorcage = row.get('uuid') //redefined as cage color background Modified 11-12-2023 R. Blasa var cageAnimals = row.get('totalAnimals/animals'); if (prevCage){ var prevDividerInfo = config.dividerMap[prevCage.get('divider')] || {}; @@ -342,32 +344,32 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { var prevIsSeparate = prevDividerInfo.countAsSeparate; var prevAnimals = prevCage.get('totalAnimals/animals'); - if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = 'red'; - if (prevIsSeparate && Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (prevIsSeparate && Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = emptyCageColor; - if (!prevIsSeparate && Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(prevAnimals) && cageType != 'Unavailable Location') + if (!prevIsSeparate && Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && Ext4.isEmpty(prevAnimals) && cageType != 'Unavailable Location') bgColor = emptyCageColor; if (cageType == 'No Cage'){ - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = 'red'; else { //NOTE: this used to use no color. i'm not sure why bgColor = 'grey'; } } - else if (cageType == 'Unavailable Location') { + else if (cageType == 'Unavailable Location' && colorcage != emptyCageColor) { bgColor = 'white'; } - else if (status == 'Unavailable') { + else if (status == 'Unavailable'&& colorcage != emptyCageColor) { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending') + else if (colorcage == 'Transfer Pending' && colorcage != emptyCageColor) { - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = ''; else bgColor = 'orange'; @@ -375,13 +377,29 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { } else if (colorcage == 'Held for Colony') { - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = ''; else bgColor = '#54daff'; } - else if (colorcage == 'Empty') + else if (colorcage == 'Epen Caging' && colorcage != emptyCageColor) + { + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + bgColor = ''; + else + bgColor = 'brown'; + + } + else if (colorcage == 'Surgery Recovery' && colorcage != emptyCageColor) + { + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + bgColor = ''; + else + bgColor = 'pink'; + + } + else if (colorcage == 'Empty' && colorcage != emptyCageColor) { if (Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = emptyCageColor; @@ -390,47 +408,63 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { } else { //flag cage if empty - if (Ext4.isEmpty(row.get('totalAnimals/animals')) && cageType != 'Unavailable Location'){ + if (Ext4.isEmpty(row.get('totalAnimals/animals')) && colorcage != emptyCageColor && cageType != 'Unavailable Location'){ bgColor = emptyCageColor; } //also if no cage present if (cageType == 'No Cage'){ - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = 'red'; else bgColor = 'grey'; } - else if (status == 'Unavailable') + else if (status == 'Unavailable' && colorcage != emptyCageColor) { - if (bgColor = emptyCageColor) { + if (bgColor = emptyCageColor && colorcage != emptyCageColor) { bgColor = 'white'; } } - else if (status == 'Unavailable' && cageType != 'Unavailable Location') + else if (status == 'Unavailable' && colorcage != emptyCageColor & cageType != 'Unavailable Location') { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending') + else if (colorcage == 'Transfer Pending' && colorcage != emptyCageColor) { - if (!Ext4.isEmpty(cageAnimals)) + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor) bgColor = ''; else bgColor = 'orange'; } - else if (colorcage == 'Held for Colony') + else if (colorcage == 'Held for Colony' && colorcage != emptyCageColor) { - if (!Ext4.isEmpty(cageAnimals)) + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor) bgColor = ''; else bgColor = '#54daff'; + } + else if (colorcage == 'Epen Caging' && colorcage != emptyCageColor) + { + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + bgColor = ''; + else + bgColor = 'brown'; + + } + else if (colorcage == 'Surgery Recovery' && colorcage != emptyCageColor) + { + if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + bgColor = ''; + else + bgColor = 'pink'; + } else if (colorcage == 'Empty') { - if (Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') bgColor = emptyCageColor; } @@ -770,9 +804,9 @@ Ext4.define('ONPRC.window.CageDetailsWindow', { itemId: 'cagecolortype', store: { type: 'labkey-store', - schemaName: 'onprc_ehr', - queryName: 'CagesBackgroundcolor', - // filterArray: [LABKEY.Filter.create('datedisabled', null, LABKEY.Filter.Types.ISBLANK)], + schemaName: 'ehr_lookups', + queryName: 'cage_background', + filterArray: [LABKEY.Filter.create('datedisabled', null, LABKEY.Filter.Types.ISBLANK)], autoLoad: true, sort: 'sort_order' } From aaf59dbbd1e514385d7a317d18dced6ea9a06fea Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 13:20:02 -0700 Subject: [PATCH 2/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- .../web/onprc_ehr/panel/RoomLayoutPanel.js | 79 +++++++++---------- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index fcc170027..9bbe70e36 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -291,9 +291,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { animalItems.push({ html: '' + animals.length + ' animals', border: false, - // bodyStyle: { - // 'background-color': 'transparent' - // } + bodyStyle: { + 'background-color': 'transparent' + } }); } else if (animals.length){ @@ -302,9 +302,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { html: '' + animal + '' + (config.animalMap[animal] ? ': ' + Ext4.util.Format.round(config.animalMap[animal].getValue('Id/mostRecentWeight/mostRecentWeight'), 1) : '') + '', animal: animal, border: false, - // bodyStyle: { - // 'background-color': 'transparent' - // }, + bodyStyle: { + 'background-color': 'transparent' + }, listeners: { scope: this, afterrender: function(cmp){ @@ -344,32 +344,32 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { var prevIsSeparate = prevDividerInfo.countAsSeparate; var prevAnimals = prevCage.get('totalAnimals/animals'); - if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = 'red'; - if (prevIsSeparate && Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (prevIsSeparate && Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = emptyCageColor; - if (!prevIsSeparate && Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && Ext4.isEmpty(prevAnimals) && cageType != 'Unavailable Location') + if (!prevIsSeparate && Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(prevAnimals) && cageType != 'Unavailable Location') bgColor = emptyCageColor; if (cageType == 'No Cage'){ - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = 'red'; else { - //NOTE: this used to use no color. i'm not sure why + //NOTE: this used to use no color. I'm not sure why bgColor = 'grey'; } } - else if (cageType == 'Unavailable Location' && colorcage != emptyCageColor) { + else if (cageType == 'Unavailable Location' ) { bgColor = 'white'; } - else if (status == 'Unavailable'&& colorcage != emptyCageColor) { + else if (status == 'Unavailable' && cageType != 'Unavailable Location' ) { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending' && colorcage != emptyCageColor) + else if (colorcage == 'Transfer Pending' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = ''; else bgColor = 'orange'; @@ -377,86 +377,79 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { } else if (colorcage == 'Held for Colony') { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') - bgColor = ''; - else + if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = '#54daff'; } - else if (colorcage == 'Epen Caging' && colorcage != emptyCageColor) + else if (colorcage == 'Epen Caging' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') - bgColor = ''; - else + if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = 'brown'; } - else if (colorcage == 'Surgery Recovery' && colorcage != emptyCageColor) + else if (colorcage == 'Surgery Recovery' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') - bgColor = ''; - else + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = 'pink'; } - else if (colorcage == 'Empty' && colorcage != emptyCageColor) + else if (colorcage == 'Empty' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location' ) { - if (Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = emptyCageColor; - } } else { //flag cage if empty - if (Ext4.isEmpty(row.get('totalAnimals/animals')) && colorcage != emptyCageColor && cageType != 'Unavailable Location'){ + if (Ext4.isEmpty(row.get('totalAnimals/animals')) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location'){ bgColor = emptyCageColor; } //also if no cage present if (cageType == 'No Cage'){ - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = 'red'; else bgColor = 'grey'; } - else if (status == 'Unavailable' && colorcage != emptyCageColor) + else if (status == 'Unavailable' ) { - if (bgColor = emptyCageColor && colorcage != emptyCageColor) { + if (bgColor = emptyCageColor ) { bgColor = 'white'; } } - else if (status == 'Unavailable' && colorcage != emptyCageColor & cageType != 'Unavailable Location') + else if (status == 'Unavailable' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending' && colorcage != emptyCageColor) + else if (colorcage == 'Transfer Pending' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor) + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) ) bgColor = ''; else bgColor = 'orange'; } - else if (colorcage == 'Held for Colony' && colorcage != emptyCageColor) + else if (colorcage == 'Held for Colony' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor) + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) ) bgColor = ''; else bgColor = '#54daff'; } - else if (colorcage == 'Epen Caging' && colorcage != emptyCageColor) + else if (colorcage == 'Epen Caging' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = ''; else bgColor = 'brown'; } - else if (colorcage == 'Surgery Recovery' && colorcage != emptyCageColor) + else if (colorcage == 'Surgery Recovery' ) { - if (!Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = ''; else bgColor = 'pink'; @@ -464,7 +457,7 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { } else if (colorcage == 'Empty') { - if (Ext4.isEmpty(cageAnimals) && colorcage != emptyCageColor && cageType != 'Unavailable Location') + if (Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = emptyCageColor; } From 695b95f2e9b7d5b3d33b7a653f09d2034fb176de Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 13:26:03 -0700 Subject: [PATCH 3/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index 9bbe70e36..8d0bb150c 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -344,7 +344,7 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { var prevIsSeparate = prevDividerInfo.countAsSeparate; var prevAnimals = prevCage.get('totalAnimals/animals'); - if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') + if (!prevIsSeparate && !Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = 'red'; if (prevIsSeparate && Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') @@ -387,9 +387,9 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { bgColor = 'brown'; } - else if (colorcage == 'Surgery Recovery' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location' ) + else if (colorcage == 'Surgery Recovery' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') + if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = 'pink'; } From 95d1e7b14143c9c5f58be79877842057639b1399 Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 13:28:14 -0700 Subject: [PATCH 4/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index 8d0bb150c..aaf903d57 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -148,8 +148,8 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { 'Cages are colored Green when they are empty.
' + 'Cages are colored Yellow when they are flagged as \"Unavailable\".
' + 'Cages are colored Orange when they are flagged as \"Transfer Pending\".
' + - 'Cages are colored light blue when they are flagged as \"Held for Colony\".' + - 'Cages are colored Brown when they are flagged as \"Epen Caging\".'+ + 'Cages are colored light blue when they are flagged as \"Held for Colony\".
\'' + + 'Cages are colored Brown when they are flagged as \"Epen Caging\".
\''+ 'Cages are colored Pink when they are flagged as \"Surgery Recovery\".' }); } From 224306069e607beb0df542c3be15117251eaf22e Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 15:04:23 -0700 Subject: [PATCH 5/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- .../web/onprc_ehr/panel/RoomLayoutPanel.js | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index aaf903d57..d56a8ac10 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -412,46 +412,34 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { else bgColor = 'grey'; } - else if (status == 'Unavailable' ) + else if (status == 'Unavailable' && cageType != 'Unavailable Location' ) { - if (bgColor = emptyCageColor ) { + if (bgColor = emptyCageColor && Ext4.isEmpty(colorcage) ) { bgColor = 'white'; } } - else if (status == 'Unavailable' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') + else if (status == 'Unavailable' && cageType != 'Unavailable Location') { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending' ) + else if (colorcage == 'Transfer Pending' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) ) - bgColor = ''; - else bgColor = 'orange'; } - else if (colorcage == 'Held for Colony' ) + else if (colorcage == 'Held for Colony' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) ) - bgColor = ''; - else bgColor = '#54daff'; } - else if (colorcage == 'Epen Caging' ) + else if (colorcage == 'Epen Caging' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') - bgColor = ''; - else bgColor = 'brown'; } else if (colorcage == 'Surgery Recovery' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') - bgColor = ''; - else bgColor = 'pink'; } From 09e5fbbb175b2c315470f3ec621005b813935b1b Mon Sep 17 00:00:00 2001 From: blasar Date: Wed, 17 Jun 2026 16:10:45 -0700 Subject: [PATCH 6/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- .../web/onprc_ehr/panel/RoomLayoutPanel.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index d56a8ac10..5f353d46d 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -367,35 +367,28 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { else if (status == 'Unavailable' && cageType != 'Unavailable Location' ) { bgColor = 'yellow'; } - else if (colorcage == 'Transfer Pending' ) + else if (colorcage == 'Transfer Pending' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') - bgColor = ''; - else bgColor = 'orange'; } - else if (colorcage == 'Held for Colony') + else if (colorcage == 'Held for Colony' && cageType != 'Unavailable Location') { - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') - bgColor = '#54daff'; + bgColor = '#54daff'; } - else if (colorcage == 'Epen Caging' ) + else if (colorcage == 'Epen Caging' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') - bgColor = 'brown'; + bgColor = 'brown'; } else if (colorcage == 'Surgery Recovery' && cageType != 'Unavailable Location' ) { - if (!Ext4.isEmpty(cageAnimals) && cageType != 'Unavailable Location') bgColor = 'pink'; } else if (colorcage == 'Empty' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location' ) { - if (Ext4.isEmpty(cageAnimals) && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location') bgColor = emptyCageColor; } } From 4e1a341ae2daebdb418c289b7fec302bc47b32d0 Mon Sep 17 00:00:00 2001 From: blasar Date: Thu, 18 Jun 2026 08:46:23 -0700 Subject: [PATCH 7/7] Modified Room Layout cage background color based on user selection definition to be applied to the cage. --- onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js index 5f353d46d..db0620603 100644 --- a/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js +++ b/onprc_ehr/resources/web/onprc_ehr/panel/RoomLayoutPanel.js @@ -387,7 +387,7 @@ Ext4.define('ONPRC.panel.RoomLayoutPanel', { bgColor = 'pink'; } - else if (colorcage == 'Empty' && Ext4.isEmpty(colorcage) && cageType != 'Unavailable Location' ) + else if (colorcage == 'Empty' && cageType != 'Unavailable Location' ) { bgColor = emptyCageColor; }