mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(editor): Change tooltip for workflow with execute workflow trigger (#11374)
This commit is contained in:
@@ -7,7 +7,7 @@ import type { VNode } from 'vue';
|
||||
import { computed, h } from 'vue';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
import type { PermissionsRecord } from '@/permissions';
|
||||
import { PLACEHOLDER_EMPTY_WORKFLOW_ID } from '@/constants';
|
||||
import { EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, PLACEHOLDER_EMPTY_WORKFLOW_ID } from '@/constants';
|
||||
import WorkflowActivationErrorMessage from './WorkflowActivationErrorMessage.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -43,6 +43,17 @@ const containsTrigger = computed((): boolean => {
|
||||
return foundTriggers.length > 0;
|
||||
});
|
||||
|
||||
const containsOnlyExecuteWorkflowTrigger = computed((): boolean => {
|
||||
const foundActiveTriggers = workflowsStore.workflowTriggerNodes.filter(
|
||||
(trigger) => !trigger.disabled,
|
||||
);
|
||||
const foundTriggers = foundActiveTriggers.filter(
|
||||
(trigger) => trigger.type === EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE,
|
||||
);
|
||||
|
||||
return foundTriggers.length > 0 && foundTriggers.length === foundActiveTriggers.length;
|
||||
});
|
||||
|
||||
const isNewWorkflow = computed(
|
||||
() =>
|
||||
!props.workflowId ||
|
||||
@@ -109,7 +120,13 @@ async function displayActivationError() {
|
||||
<n8n-tooltip :disabled="!disabled" placement="bottom">
|
||||
<template #content>
|
||||
<div>
|
||||
{{ i18n.baseText('workflowActivator.thisWorkflowHasNoTriggerNodes') }}
|
||||
{{
|
||||
i18n.baseText(
|
||||
containsOnlyExecuteWorkflowTrigger
|
||||
? 'workflowActivator.thisWorkflowHasOnlyOneExecuteWorkflowTriggerNode'
|
||||
: 'workflowActivator.thisWorkflowHasNoTriggerNodes',
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
<el-switch
|
||||
|
||||
Reference in New Issue
Block a user