The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Hide Input and Test tabs for app logic function nodes (#21671)
Raphaël Bosi637ae65e9fb5
diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsxindex b64423e5cc4..ebc9dcc6389 100644--- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx+++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/logic-function-action/components/WorkflowEditActionLogicFunction.tsx@@ -1,3 +1,4 @@+import { useIsThirdPartyApplication } from '@/applications/hooks/useIsThirdPartyApplication';import { LogicFunctionExecutionResult } from '@/logic-functions/components/LogicFunctionExecutionResult';import { LogicFunctionLogs } from '@/logic-functions/components/LogicFunctionLogs';import { LogicFunctionTestInputInitEffect } from '@/logic-functions/components/LogicFunctionTestInputInitEffect';@@ -75,6 +76,10 @@ export const WorkflowEditActionLogicFunction = ({id: logicFunctionId,});+ const isThirdPartyApp = useIsThirdPartyApplication(+ logicFunction?.applicationId,+ );+const activeTabId = useAtomComponentStateValue(activeTabIdComponentState,WORKFLOW_LOGIC_FUNCTION_ACTION_TAB_LIST_COMPONENT_ID,@@ -183,6 +188,8 @@ export const WorkflowEditActionLogicFunction = ({const hasInputFields = Object.keys(functionInput).length > 0;+ const isTestTabActive = !isThirdPartyApp && activeTabId === TEST_TAB_ID;+const tabs = [{id: INPUT_TAB_ID,@@ -199,17 +206,19 @@ export const WorkflowEditActionLogicFunction = ({return (<><LogicFunctionTestInputInitEffect logicFunctionId={logicFunctionId} />- <StyledTabListContainer>- <TabList- tabs={tabs}- behaveAsLinks={false}- componentInstanceId={- WORKFLOW_LOGIC_FUNCTION_ACTION_TAB_LIST_COMPONENT_ID- }- />- </StyledTabListContainer>+ {!isThirdPartyApp && (+ <StyledTabListContainer>+ <TabList+ tabs={tabs}+ behaveAsLinks={false}+ componentInstanceId={+ WORKFLOW_LOGIC_FUNCTION_ACTION_TAB_LIST_COMPONENT_ID+ }+ />+ </StyledTabListContainer>+ )}<WorkflowStepBody>- {activeTabId === TEST_TAB_ID ? (+ {isTestTabActive ? (<><WorkflowEditActionCodeFieldsfunctionInput={testInput}@@ -262,7 +271,7 @@ export const WorkflowEditActionLogicFunction = ({<WorkflowStepFooterstepId={action.id}additionalActions={- activeTabId === TEST_TAB_ID+ isTestTabActive? [<WorkflowStepCmdEnterButtontitle={t`Test`}