Skip to content

Commit

Permalink
feat: handle element destination URL on task complete
Browse files Browse the repository at this point in the history
  • Loading branch information
devmiguelangel committed May 23, 2024
1 parent fa68717 commit 5ed0719
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,15 @@ export default {
this.screen = this.task.interstitial_screen;
this.loadNextAssignedTask(parentRequestId);
} else if (!this.taskPreview) {
this.$emit('closed', this.task.id);
let { elementDestination } = this.task;
if (elementDestination === 'taskSource') {
elementDestination = null;
} else if (!elementDestination) {
elementDestination = sessionStorage.getItem('elementDestinationURL') ?? null;
}
this.$emit('closed', this.task.id, elementDestination);
}
},
loadNextAssignedTask(requestId = null) {
Expand Down

0 comments on commit 5ed0719

Please sign in to comment.