From 3a89c3b1918d990d25863ade111c918449f0cf90 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 19 Jan 2026 09:57:40 -0600 Subject: [PATCH] hitfix for the greater than operator not being flipped for display on a node diff subtype where node one is higher than node 2 the operators and value need to be 'flipped' since that is how the interactions are stored example: node 2 -> node 1 the user enters greater than 10 then what is sent down for the interaction is if node 2 minus node 1 is less than -10 so the display needs to flip them back to 'greater than' and +10 --- src/pages/Device.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Device.tsx b/src/pages/Device.tsx index ee4ae56..d96a05c 100644 --- a/src/pages/Device.tsx +++ b/src/pages/Device.tsx @@ -131,7 +131,7 @@ export default function DevicePage() { //flip operator and send negative comparitor to save interaction.settings.conditions.forEach(condition => { //coming back from the backend as a string for some reason - if (condition.comparison.toString() === "RELATIONAL_OPERATOR_GREATER_THAN") { + if (condition.comparison === quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN) { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_LESS_THAN; } else { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN;