From 0109614f4dd2b1501a5531bec4b8c9d91315c116 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Wed, 27 Sep 2023 15:08:38 -0400 Subject: [PATCH 1/3] Redirect to completed if request was completed --- src/components/task.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/task.vue b/src/components/task.vue index 80536e494..b02148849 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -167,6 +167,9 @@ export default { this.taskId = this.task.id; this.nodeId = this.task.element_id; this.listenForParentChanges(); + if (this.task.process_request.status === 'COMPLETED') { + this.$emit('completed', this.task.process_request.id); + } }, }, From e7e1f9ccd4d17a01f575b0907903a3dc899ffb59 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 2 Oct 2023 14:45:40 -0400 Subject: [PATCH 2/3] if no current screen show the interstitial screen if exists --- src/components/task.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/task.vue b/src/components/task.vue index b02148849..fcc559b4e 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -164,6 +164,10 @@ export default { task: { handler() { + if (!this.screen) { + // if no current screen show the interstitial screen if exists + this.screen = this.task && this.task.interstitial_screen; + } this.taskId = this.task.id; this.nodeId = this.task.element_id; this.listenForParentChanges(); @@ -528,6 +532,16 @@ export default { this.nodeId = this.initialNodeId; this.requestData = this.value; this.loopContext = this.initialLoopContext; + if ( + this.$parent.task && + !this.$parent.task.screen && + this.$parent.task.allow_interstitial && + this.$parent.task.interstitial_screen + ) { + // if interstitial screen exists, show it + console.log(this.$parent.task.interstitial_screen); + this.screen = this.$parent.task.interstitial_screen; + } }, destroyed() { this.unsubscribeSocketListeners(); From ee836a2ebef0a74122cc0a6b05b4ef77b968e854 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 2 Oct 2023 14:48:20 -0400 Subject: [PATCH 3/3] Remove debug code --- src/components/task.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/task.vue b/src/components/task.vue index fcc559b4e..87402c9fd 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -539,7 +539,6 @@ export default { this.$parent.task.interstitial_screen ) { // if interstitial screen exists, show it - console.log(this.$parent.task.interstitial_screen); this.screen = this.$parent.task.interstitial_screen; } },