Docs and improve trigger icon handling (#13769)
<img width="1124" height="248" alt="image" src="https://github.com/user-attachments/assets/6f35391b-0dd0-4129-ae94-b66f824533e6" /> #13757 and #13766 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -2,10 +2,15 @@ import { WorkflowTrigger } from '@/workflow/types/Workflow';
|
||||
import { splitWorkflowTriggerEventName } from '@/workflow/utils/splitWorkflowTriggerEventName';
|
||||
import { DATABASE_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/DatabaseTriggerTypes';
|
||||
import { OTHER_TRIGGER_TYPES } from '@/workflow/workflow-trigger/constants/OtherTriggerTypes';
|
||||
import { isNonEmptyString } from '@sniptt/guards';
|
||||
|
||||
export const getTriggerIcon = (
|
||||
trigger: WorkflowTrigger,
|
||||
): string | undefined => {
|
||||
if (trigger.type === 'MANUAL' && isNonEmptyString(trigger.settings.icon)) {
|
||||
return trigger.settings.icon;
|
||||
}
|
||||
|
||||
if (trigger.type === 'DATABASE_EVENT') {
|
||||
const eventName = splitWorkflowTriggerEventName(
|
||||
trigger.settings.eventName,
|
||||
|
||||
Reference in New Issue
Block a user