Skip to content

Commit

Permalink
Merge pull request #1600 from ProcessMaker/feature/FOUR-15858
Browse files Browse the repository at this point in the history
FOUR-15858 On Process End - Override Behavior
  • Loading branch information
rodriquelca authored May 29, 2024
2 parents b512a2e + 71c5f27 commit 5eea591
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,11 @@ export default {
* Retrieves the destination URL for the closed event.
* @returns {string|null} - The destination URL.
*/
getDestinationUrl() {
getDestinationUrl() {
// If the element destination is 'taskSource', use the document referrer
if (this.task?.elementDestination === 'taskSource') {
return document.referrer;
}
// If element destination is not set, try to get it from sessionStorage
return this.task.elementDestination || sessionStorage.getItem('elementDestinationURL') || null;
},
Expand Down Expand Up @@ -529,14 +528,14 @@ export default {
activityAssigned() {
// This may no longer be needed
},
processCompleted() {
processCompleted(data = null) {
let requestId;
if (this.parentRequest) {
requestId = this.getAllowedRequestId();
this.$emit('completed', requestId);
}
if (requestId !== this.requestId) {
this.$emit('completed', this.requestId);
this.$emit('completed', this.requestId, data?.endEventDestination);
}
},
getAllowedRequestId() {
Expand Down

0 comments on commit 5eea591

Please sign in to comment.