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

@ -1,19 +1,19 @@
import { WorkflowCronTrigger } from '@/workflow/types/Workflow';
import { useIcons } from 'twenty-ui';
import { useTheme } from '@emotion/react';
import { FormNumberFieldInput } from '@/object-record/record-field/form-types/components/FormNumberFieldInput';
import { FormTextFieldInput } from '@/object-record/record-field/form-types/components/FormTextFieldInput';
import { Select } from '@/ui/input/components/Select';
import { WorkflowStepHeader } from '@/workflow/workflow-steps/components/WorkflowStepHeader';
import { WorkflowCronTrigger } from '@/workflow/types/Workflow';
import { WorkflowStepBody } from '@/workflow/workflow-steps/components/WorkflowStepBody';
import { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';
import { isDefined } from 'twenty-shared';
import { getTriggerDefaultLabel } from '@/workflow/workflow-trigger/utils/getTriggerLabel';
import { WorkflowStepHeader } from '@/workflow/workflow-steps/components/WorkflowStepHeader';
import { CRON_TRIGGER_INTERVAL_OPTIONS } from '@/workflow/workflow-trigger/constants/CronTriggerIntervalOptions';
import { getCronTriggerDefaultSettings } from '@/workflow/workflow-trigger/utils/getCronTriggerDefaultSettings';
import { getTriggerIcon } from '@/workflow/workflow-trigger/utils/getTriggerIcon';
import { getTriggerDefaultLabel } from '@/workflow/workflow-trigger/utils/getTriggerLabel';
import { useTheme } from '@emotion/react';
import { isNumber } from '@sniptt/guards';
import cron from 'cron-validate';
import { useState } from 'react';
import { FormTextFieldInput } from '@/object-record/record-field/form-types/components/FormTextFieldInput';
import { FormNumberFieldInput } from '@/object-record/record-field/form-types/components/FormNumberFieldInput';
import { isNumber } from '@sniptt/guards';
import { getCronTriggerDefaultSettings } from '@/workflow/workflow-trigger/utils/getCronTriggerDefaultSettings';
import { isDefined } from 'twenty-shared';
import { useIcons } from 'twenty-ui';
type WorkflowEditTriggerCronFormProps = {
trigger: WorkflowCronTrigger;
@ -79,6 +79,7 @@ export const WorkflowEditTriggerCronForm = ({
iconColor={theme.font.color.tertiary}
initialTitle={headerTitle}
headerType={headerType}
disabled={triggerOptions.readonly}
/>
<WorkflowStepBody>
<Select

View File

@ -75,6 +75,7 @@ export const WorkflowEditTriggerDatabaseEventForm = ({
iconColor={theme.font.color.tertiary}
initialTitle={headerTitle}
headerType={headerType}
disabled={triggerOptions.readonly}
/>
<WorkflowStepBody>
<Select

View File

@ -70,6 +70,7 @@ export const WorkflowEditTriggerManualForm = ({
iconColor={theme.font.color.tertiary}
initialTitle={headerTitle}
headerType="Trigger · Manual"
disabled={triggerOptions.readonly}
/>
<WorkflowStepBody>
<Select

View File

@ -10,7 +10,7 @@ export const DATABASE_TRIGGER_TYPES: Array<{
{
defaultLabel: DatabaseTriggerDefaultLabel.RECORD_IS_CREATED,
type: 'DATABASE_EVENT',
icon: 'IconPlus',
icon: 'IconPlaylistAdd',
event: 'created',
},
{