Skip to content

Commit

Permalink
⚡ Saving template id when downloading and copy/pasting a workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Dec 19, 2023
1 parent dbf5e95 commit 7725df8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/editor-ui/src/Interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@ export interface IWorkflowDataUpdate {
}

export interface IWorkflowToShare extends IWorkflowDataUpdate {
meta?: {
instanceId: string;
};
meta?: WorkflowMetadata;
}

export interface IWorkflowTemplateNode
Expand Down Expand Up @@ -274,6 +272,7 @@ export interface INewWorkflowData {
export interface WorkflowMetadata {
onboardingId?: string;
templateId?: string;
instanceId?: string;
}

// Almost identical to cli.Interfaces.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ export default defineComponent({
const exportData: IWorkflowToShare = {
...data,
meta: {
...(this.workflowsStore.workflow.meta || {}),
instanceId: this.rootStore.instanceId,
},
tags: (tags || []).map((tagId) => {
Expand Down
1 change: 1 addition & 0 deletions packages/editor-ui/src/views/NodeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ export default defineComponent({
void this.getNodesToSave(nodes).then((data) => {
const workflowToCopy: IWorkflowToShare = {
meta: {
...(this.workflowsStore.workflow.meta ?? {}),
instanceId: this.rootStore.instanceId,
},
...data,
Expand Down

0 comments on commit 7725df8

Please sign in to comment.