feat(editor): Show fixed collection parameter issues in UI (#12899)

This commit is contained in:
Milorad FIlipović
2025-01-29 15:50:15 +01:00
committed by GitHub
parent 152310b7a0
commit 12d686ce52
10 changed files with 444 additions and 148 deletions

View File

@@ -4,21 +4,14 @@ import type { ILocalLoadOptionsFunctions, ResourceMapperFields } from 'n8n-workf
export async function loadSubWorkflowInputs(
this: ILocalLoadOptionsFunctions,
): Promise<ResourceMapperFields> {
const { fields, dataMode, subworkflowInfo } = await loadWorkflowInputMappings.bind(this)();
const { fields, subworkflowInfo } = await loadWorkflowInputMappings.bind(this)();
let emptyFieldsNotice: string | undefined;
if (fields.length === 0) {
const subworkflowLink = subworkflowInfo?.id
? `<a href="/workflow/${subworkflowInfo?.id}" target="_blank">sub-workflows trigger</a>`
: 'sub-workflows trigger';
switch (dataMode) {
case 'passthrough':
emptyFieldsNotice = `This sub-workflow will consume all input data passed to it. Define specific expected input in the ${subworkflowLink}.`;
break;
default:
emptyFieldsNotice = `This sub-workflow will not receive any input when called by your AI node. Define your expected input in the ${subworkflowLink}.`;
break;
}
emptyFieldsNotice = `This sub-workflow will not receive any input when called by your AI node. Define your expected input in the ${subworkflowLink}.`;
}
return { fields, emptyFieldsNotice };
}