Skip to content

Commit

Permalink
Merge pull request #1443 from ProcessMaker/bugfix/FOUR-10311
Browse files Browse the repository at this point in the history
FOUR-10311 Redirect automatically to Request if the request was already completed
  • Loading branch information
ryancooley authored Oct 3, 2023
2 parents 3b46ca0 + ee836a2 commit e03adce
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,16 @@ 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();
if (this.task.process_request.status === 'COMPLETED') {
this.$emit('completed', this.task.process_request.id);
}
},
},
Expand Down Expand Up @@ -525,6 +532,15 @@ 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
this.screen = this.$parent.task.interstitial_screen;
}
},
destroyed() {
this.unsubscribeSocketListeners();
Expand Down

0 comments on commit e03adce

Please sign in to comment.