Skip to content

Commit abacf1b

Browse files
authored
Merge pull request #20710 from mvdbeek/fix_click_to_edit_link
[25.0] Fix click to edit link
2 parents efd860d + f9ec53c commit abacf1b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

client/src/components/Workflow/Run/WorkflowRun.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ const workflowModel: any = ref(null);
6464
const owner = ref<string>();
6565
6666
const currentHistoryId = computed(() => historyStore.currentHistoryId);
67-
const editorLink = computed(
68-
() => `/workflows/edit?id=${props.workflowId}${props.version ? `&version=${props.version}` : ""}`
69-
);
67+
const editorLink = computed(() => {
68+
const queryArgs = {
69+
[props.instance ? "workflow_id" : "id"]: props.workflowId,
70+
...(props.version && { version: props.version }),
71+
};
72+
return router.resolve({ path: "/workflows/edit", query: queryArgs }).href;
73+
});
7074
const historyStatusKey = computed(() => `${currentHistoryId.value}_${lastUpdateTime.value}`);
7175
const isOwner = computed(() => userStore.matchesCurrentUsername(owner.value));
7276
const lastUpdateTime = computed(() => historyItemsStore.lastUpdateTime);

0 commit comments

Comments
 (0)