Fix readonly in some steps (#10121)

- readonly in titles
- readonly in code step
- update a few icons
- update event label
This commit is contained in:
Thomas Trompette
2025-02-11 15:22:18 +01:00
committed by GitHub
parent 02ced028e5
commit 6da9976193
9 changed files with 32 additions and 17 deletions

View File

@ -188,6 +188,7 @@ export const WorkflowEditActionFormSendEmail = ({
iconColor={theme.color.blue}
initialTitle={headerTitle}
headerType="Email"
disabled={actionOptions.readonly}
/>
<WorkflowStepBody>
<Select

View File

@ -217,6 +217,10 @@ export const WorkflowEditActionFormServerlessFunction = ({
};
const handleTestInputChange = async (value: any, path: string[]) => {
if (actionOptions.readonly === true) {
return;
}
const updatedTestFunctionInput = setNestedValue(
serverlessFunctionTestData.input,
path,
@ -229,6 +233,10 @@ export const WorkflowEditActionFormServerlessFunction = ({
};
const handleRunFunction = async () => {
if (actionOptions.readonly === true) {
return;
}
if (!isTesting) {
await testServerlessFunction(shouldBuildServerlessFunction);
setShouldBuildServerlessFunction(false);
@ -302,6 +310,7 @@ export const WorkflowEditActionFormServerlessFunction = ({
iconColor={theme.color.orange}
initialTitle={headerTitle}
headerType="Code"
disabled={actionOptions.readonly}
/>
<WorkflowStepBody>
{activeTabId === 'code' && (
@ -333,6 +342,7 @@ export const WorkflowEditActionFormServerlessFunction = ({
<WorkflowEditActionFormServerlessFunctionFields
functionInput={serverlessFunctionTestData.input}
onInputChange={handleTestInputChange}
readonly={actionOptions.readonly}
/>
<StyledCodeEditorContainer>
<InputLabel>Result</InputLabel>
@ -351,7 +361,7 @@ export const WorkflowEditActionFormServerlessFunction = ({
<CmdEnterActionButton
title="Test"
onClick={handleRunFunction}
disabled={isTesting || isBuilding}
disabled={isTesting || isBuilding || actionOptions.readonly}
/>,
]}
/>

View File

@ -13,7 +13,7 @@ export const RECORD_ACTIONS: Array<{
{
label: 'Update Record',
type: 'UPDATE_RECORD',
icon: 'IconRefreshDot',
icon: 'IconReload',
},
{
label: 'Delete Record',