Skip to content

Commit

Permalink
Merge pull request #1660 from ProcessMaker/observation/FOUR-17438
Browse files Browse the repository at this point in the history
Set node id before loading the task for webentry
  • Loading branch information
nolanpro authored Aug 6, 2024
2 parents fe5c579 + 2ba8791 commit 133cd9f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
>
<template v-if="screen">
<b-overlay
:show="disabled"
:show="disabled || isSelfService"
id="overlay-background"
variant="white"
:variant="isSelfService ? 'white' : 'transparent'"
:blur="null"
cardStyles="pointer-events: none;pointer-events: none;inset: 1px"
rounded="sm"
>
<template #overlay>
<div class="text-center">
<p>Please claim this task to continue.</p>
<p v-if="isSelfService">Please claim this task to continue.</p>
</div>
</template>
<div class="card card-body border-top-0 h-100" :class="screenTypeClass">
Expand Down Expand Up @@ -124,6 +125,7 @@ export default {
loadingButton: false,
loadingTask: false,
loadingListeners: this.waitLoadingListeners,
isSelfService: false,
};
},
watch: {
Expand Down Expand Up @@ -359,12 +361,12 @@ export default {
}
this.prepareTask();
},
disableForSelfService() {
setSelfService() {
this.$nextTick(() => {
if (window.ProcessMaker.isSelfService) {
this.disabled = true;
this.isSelfService = true;
} else {
this.disabled = false;
this.isSelfService = false;
}
});
},
Expand Down Expand Up @@ -488,8 +490,8 @@ export default {
this.emitIfTaskCompleted(requestId);
}
this.taskId = task.id;
this.loadTask();
this.nodeId = task.element_id;
this.loadTask();
} else if (this.parentRequest && ['COMPLETED', 'CLOSED'].includes(this.task.process_request.status)) {
this.$emit('completed', this.getAllowedRequestId());
} else if (!this.taskPreview) {
Expand Down Expand Up @@ -546,7 +548,7 @@ export default {
},
onUpdate(data) {
this.$emit('input', data);
this.disableForSelfService();
this.setSelfService();
},
activityAssigned() {
// This may no longer be needed
Expand Down Expand Up @@ -691,7 +693,7 @@ export default {
data.event === "ACTIVITY_ACTIVATED"
&& data.elementType === 'task'
) {
if (!this.task.elementDestination?.type) {
if (!this.task?.elementDestination?.type) {
this.taskId = data.taskId;
}
Expand Down

0 comments on commit 133cd9f

Please sign in to comment.