From 0078959b4b678d9cda44401f07ab938eeac351c5 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Fri, 3 May 2024 14:54:11 +0300 Subject: [PATCH] fix: opened flow in new tab [WTEL-4509] --- .../routing/modules/flow/components/opened-flow.vue | 11 ++++++++++- .../diagram/components/opened-flow-diagram.vue | 7 ++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/modules/routing/modules/flow/components/opened-flow.vue b/src/modules/routing/modules/flow/components/opened-flow.vue index 3351ad80f..e76afcb07 100644 --- a/src/modules/routing/modules/flow/components/opened-flow.vue +++ b/src/modules/routing/modules/flow/components/opened-flow.vue @@ -195,7 +195,16 @@ export default { }, mounted() { this.initType(); - if(!this.isDiagram) this.addCheckingUnsavedChanges(); + if(!this.isDiagram) { + this.addCheckingUnsavedChanges(); + } else { + + // [https://webitel.atlassian.net/browse/WTEL-4509] + // Temporary solution - open in a new browser tab Flow diagram and clear itemInstance + + this.resetState(); + this.closePage(); + } }, }; diff --git a/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue b/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue index 2c607755c..c551db1ca 100644 --- a/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue +++ b/src/modules/routing/modules/flow/modules/diagram/components/opened-flow-diagram.vue @@ -11,7 +11,12 @@ export default { const flowId = this.$route.params.id || 'new'; const flowType = this.$route.query.type || ''; const redirectUrl = `${import.meta.env.VITE_FLOW_DIAGRAM_URL}/${flowId}/${flowType}`; - window.location.replace(redirectUrl); + + // [https://webitel.atlassian.net/browse/WTEL-4509] + // Temporary solution - open in a new browser tab Flow diagram + + // window.location.replace(redirectUrl); + window.open(redirectUrl, '_blank'); }, };