From e5debd4fab15fdb7469c89dfd9cdd598f1f5f310 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sat, 30 Nov 2024 07:08:22 +0100 Subject: [PATCH 1/2] 1805 - In ConenctionTab when there is no connection show only Create button --- .../ConnectionTabConnectionSelect.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/client/src/pages/platform/workflow-editor/components/node-details-tabs/ConnectionTabConnectionSelect.tsx b/client/src/pages/platform/workflow-editor/components/node-details-tabs/ConnectionTabConnectionSelect.tsx index 98df5f3b6b..a3e6ba0f8d 100644 --- a/client/src/pages/platform/workflow-editor/components/node-details-tabs/ConnectionTabConnectionSelect.tsx +++ b/client/src/pages/platform/workflow-editor/components/node-details-tabs/ConnectionTabConnectionSelect.tsx @@ -17,6 +17,7 @@ import {WorkflowTestConfigurationKeys} from '@/shared/queries/platform/workflowT import {useQueryClient} from '@tanstack/react-query'; import {PlusIcon} from 'lucide-react'; import {useEffect, useState} from 'react'; +import {twMerge} from 'tailwind-merge'; const ConnectionTabConnectionSelect = ({ workflowConnection, @@ -125,9 +126,11 @@ const ConnectionTabConnectionSelect = ({ value={connectionId ? connectionId.toString() : undefined} >
- - - + {connections && connections.length > 0 && ( + + + + )} {componentDefinition && ( - + } useCreateConnectionMutation={useCreateConnectionMutation} From 73c23776a68b80d51ef22f08231308934b387534 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sun, 1 Dec 2024 22:24:56 +0100 Subject: [PATCH 2/2] =?UTF-8?q?1674=20-=20client=20-=20Don=E2=80=99t=20sho?= =?UTF-8?q?w=20expression=20switch=20button=20if=20a=20switch=20is=20disab?= =?UTF-8?q?led?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Properties/Property.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx b/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx index 71b84096e0..7826a22c56 100644 --- a/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx +++ b/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx @@ -131,6 +131,7 @@ const Property = ({ controlType, custom, description, + expressionEnabled, hidden, label, languageId, @@ -737,18 +738,20 @@ const Property = ({ setShowInputTypeSwitchButton(false); } - if (controlType === 'JSON_SCHEMA_BUILDER') { - setShowInputTypeSwitchButton(true); - } + if (expressionEnabled) { + if (controlType === 'JSON_SCHEMA_BUILDER') { + setShowInputTypeSwitchButton(true); + } - if (controlType === 'SELECT') { - setShowInputTypeSwitchButton(true); + if (controlType === 'SELECT') { + setShowInputTypeSwitchButton(true); + } } if (controlType === 'NULL') { setShowInputTypeSwitchButton(false); } - }, [controlType]); + }, [controlType, expressionEnabled]); // update propertyParameterValue when workflow definition changes useEffect(() => {