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:
Pavan Nambi
2025-08-08 19:56:07 +05:30
committed by GitHub
parent 4523ee45bc
commit 858391492b
4 changed files with 47 additions and 42 deletions
@@ -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,