From 17cfa59c4a7f893d8c84eaf5f2cb5598b82f8e19 Mon Sep 17 00:00:00 2001
From: Leonardo Christino <leomilho@gmail.com>
Date: Wed, 25 Oct 2023 11:16:45 +0200
Subject: [PATCH] fix(logic): fix connection type detection for strings

---
 .../lib/data-access/socket/broker/index.tsx    | 18 +++---------------
 .../queryBuilderLogicPillsPanel.tsx            |  4 +++-
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/libs/shared/lib/data-access/socket/broker/index.tsx b/libs/shared/lib/data-access/socket/broker/index.tsx
index cd47d1921..4f56a0a40 100644
--- a/libs/shared/lib/data-access/socket/broker/index.tsx
+++ b/libs/shared/lib/data-access/socket/broker/index.tsx
@@ -44,27 +44,15 @@ export default class Broker {
         this.catchAllListener(jsonObject, routingKey);
       }
       Object.values(this.listeners[routingKey]).forEach((listener) => listener(jsonObject, routingKey));
-      console.debug(
-        `message processed with routing key %c${routingKey}`,
-        'font-weight:bold; color: blue; background-color: white;',
-        jsonObject
-      );
+      console.debug(routingKey, `message processed with routing key`, jsonObject);
     }
     // If there are no listeners, log the message
     else {
       if (this.catchAllListener) {
         this.catchAllListener(jsonObject, routingKey);
-        console.debug(
-          `catch all used for message with routing key %c${routingKey}`,
-          'font-weight:bold; color: blue; background-color: white;',
-          jsonObject
-        );
+        console.debug(routingKey, `catch all used for message with routing key`, jsonObject);
       } else {
-        console.debug(
-          `no listeners for message with routing key %c${routingKey}`,
-          'font-weight:bold; color: blue; background-color: white;',
-          jsonObject
-        );
+        console.debug(routingKey, `no listeners for message with routing key`, jsonObject);
       }
     }
   }
diff --git a/libs/shared/lib/querybuilder/panel/querysidepanel/queryBuilderLogicPillsPanel.tsx b/libs/shared/lib/querybuilder/panel/querysidepanel/queryBuilderLogicPillsPanel.tsx
index 08fef79fd..9f8b9b1c8 100644
--- a/libs/shared/lib/querybuilder/panel/querysidepanel/queryBuilderLogicPillsPanel.tsx
+++ b/libs/shared/lib/querybuilder/panel/querysidepanel/queryBuilderLogicPillsPanel.tsx
@@ -20,7 +20,9 @@ export const QueryBuilderLogicPillsPanel = (props: {
   } | null;
 }) => {
   let filterType = (props.connection?.params?.handleId ? toHandleData(props.connection.params.handleId).attributeType : null) as string;
-  filterType = filterType && filterType === 'float' || 'int' ? 'number' : filterType;
+  if (!filterType) return <></>;
+  else if (filterType === 'string') filterType = 'string';
+  else if (filterType === 'int' || filterType === 'float') filterType = 'number';
 
   const dataOps = [
     {
-- 
GitLab