Update trigger selection design (#9717)

https://github.com/user-attachments/assets/62bc705a-2f69-4ce7-986f-0208154c9965
This commit is contained in:
Thomas Trompette
2025-01-20 10:54:27 +01:00
committed by GitHub
parent 056cb7c66d
commit d50294d39a
13 changed files with 220 additions and 143 deletions

View File

@ -7,9 +7,9 @@ import {
WorkflowDiagramEdge,
WorkflowDiagramNode,
} from '@/workflow/workflow-diagram/types/WorkflowDiagram';
import { DATABASE_TRIGGER_EVENTS } from '@/workflow/workflow-trigger/constants/DatabaseTriggerEvents';
import { TRIGGER_STEP_ID } from '@/workflow/workflow-trigger/constants/TriggerStepId';
import { capitalize } from 'twenty-shared';
import { isDefined } from 'twenty-ui';
import { v4 } from 'uuid';
@ -70,7 +70,10 @@ export const generateWorkflowDiagram = ({
trigger.settings.eventName,
);
triggerLabel = `${capitalize(triggerEvent.objectType)} is ${capitalize(triggerEvent.event)}`;
triggerLabel =
DATABASE_TRIGGER_EVENTS.find(
(event) => event.value === triggerEvent.event,
)?.label ?? '';
break;
}