mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Improve handling of manual executions with wait nodes (#11750)
Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
committed by
GitHub
parent
d5ba1a059b
commit
61696c3db3
@@ -6,7 +6,7 @@ import {
|
||||
type IPinData,
|
||||
type IRunData,
|
||||
} from 'n8n-workflow';
|
||||
import type { ExecutionFilterType, ExecutionsQueryFilter } from '@/Interface';
|
||||
import type { ExecutionFilterType, ExecutionsQueryFilter, INodeUi } from '@/Interface';
|
||||
import { isEmpty } from '@/utils/typesUtils';
|
||||
import { FORM_NODE_TYPE, FORM_TRIGGER_NODE_TYPE } from '../constants';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
@@ -136,18 +136,17 @@ export function displayForm({
|
||||
}
|
||||
}
|
||||
|
||||
export const waitingNodeTooltip = () => {
|
||||
export const waitingNodeTooltip = (node: INodeUi | null | undefined) => {
|
||||
if (!node) return '';
|
||||
try {
|
||||
const lastNode =
|
||||
useWorkflowsStore().workflowExecutionData?.data?.executionData?.nodeExecutionStack[0]?.node;
|
||||
const resume = lastNode?.parameters?.resume;
|
||||
const resume = node?.parameters?.resume;
|
||||
|
||||
if (resume) {
|
||||
if (!['webhook', 'form'].includes(resume as string)) {
|
||||
return i18n.baseText('ndv.output.waitNodeWaiting');
|
||||
}
|
||||
|
||||
const { webhookSuffix } = (lastNode.parameters.options ?? {}) as { webhookSuffix: string };
|
||||
const { webhookSuffix } = (node.parameters.options ?? {}) as { webhookSuffix: string };
|
||||
const suffix = webhookSuffix && typeof webhookSuffix !== 'object' ? `/${webhookSuffix}` : '';
|
||||
|
||||
let message = '';
|
||||
@@ -168,13 +167,13 @@ export const waitingNodeTooltip = () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (lastNode?.type === FORM_NODE_TYPE) {
|
||||
if (node?.type === FORM_NODE_TYPE) {
|
||||
const message = i18n.baseText('ndv.output.waitNodeWaitingForFormSubmission');
|
||||
const resumeUrl = `${useRootStore().formWaitingUrl}/${useWorkflowsStore().activeExecutionId}`;
|
||||
return `${message}<a href="${resumeUrl}" target="_blank">${resumeUrl}</a>`;
|
||||
}
|
||||
|
||||
if (lastNode?.parameters.operation === SEND_AND_WAIT_OPERATION) {
|
||||
if (node?.parameters.operation === SEND_AND_WAIT_OPERATION) {
|
||||
return i18n.baseText('ndv.output.sendAndWaitWaitingApproval');
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user