mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Refactor nodeHelpers mixin to composable (#7810)
- Convert `nodeHelpers` mixin into composable and fix types - Replace usage of the mixin with the new composable - Add missing store imports in components that were dependent on opaque imports from nodeHelpers mixin - Refactor the `CollectionParameter` component to the modern script setup syntax Github issue / Community forum post (link here to close automatically): --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
|
||||
import { useTitleChange } from '@/composables/useTitleChange';
|
||||
@@ -24,9 +25,12 @@ import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
export const workflowRun = defineComponent({
|
||||
mixins: [workflowHelpers],
|
||||
setup() {
|
||||
const nodeHelpers = useNodeHelpers();
|
||||
|
||||
return {
|
||||
...useTitleChange(),
|
||||
...useToast(),
|
||||
nodeHelpers,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -83,7 +87,7 @@ export const workflowRun = defineComponent({
|
||||
|
||||
try {
|
||||
// Check first if the workflow has any issues before execute it
|
||||
this.refreshNodeIssues();
|
||||
this.nodeHelpers.refreshNodeIssues();
|
||||
const issuesExist = this.workflowsStore.nodesIssuesExist;
|
||||
if (issuesExist) {
|
||||
// If issues exist get all of the issues of all nodes
|
||||
@@ -265,7 +269,7 @@ export const workflowRun = defineComponent({
|
||||
},
|
||||
};
|
||||
this.workflowsStore.setWorkflowExecutionData(executionData);
|
||||
this.updateNodesExecutionIssues();
|
||||
this.nodeHelpers.updateNodesExecutionIssues();
|
||||
|
||||
const runWorkflowApiResponse = await this.runWorkflowApi(startRunData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user