From 84215c0edf87b52b0bcb07fe632107b48e48d582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Mon, 29 May 2023 17:41:32 +0200 Subject: [PATCH] Fix workflow error step expression editor modal not working --- .../src/components/Configurator/Error.vue | 52 ++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/client/web/workflow/src/components/Configurator/Error.vue b/client/web/workflow/src/components/Configurator/Error.vue index 59da2d252..8cb969de9 100644 --- a/client/web/workflow/src/components/Configurator/Error.vue +++ b/client/web/workflow/src/components/Configurator/Error.vue @@ -21,15 +21,38 @@ class="mb-0" > + + + + @@ -38,12 +61,20 @@ import base from './base' import ExpressionEditor from '../ExpressionEditor' export default { - components: { ExpressionEditor, }, + extends: base, + data () { + return { + expressionEditor: { + currentExpression: undefined, + }, + } + }, + created () { let args = [{ target: 'message', @@ -70,6 +101,23 @@ export default { value: `Stop workflow with error: ${value}`, force: !this.item.node.value, }) + this.$root.$emit('change-detected') + }, + + openInEditor () { + this.expressionEditor.currentExpression = this.item.config.arguments[0].expr + }, + + saveExpression () { + const { currentExpression } = this.expressionEditor + this.$set(this.item.config.arguments[0], 'expr', currentExpression) + this.$root.$emit('change-detected') + + this.resetExpression() + }, + + resetExpression () { + this.expressionEditor.currentExpression = undefined }, }, }