@processmaker/screen-builder 3.8.23 → 3.8.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/screen-builder",
3
- "version": "3.8.23",
3
+ "version": "3.8.25",
4
4
  "scripts": {
5
5
  "dev": "VITE_COVERAGE=true vite",
6
6
  "build": "vite build",
@@ -836,7 +836,7 @@ export default {
836
836
  this.reload();
837
837
  return;
838
838
  }
839
-
839
+ // get the event, element destination and token id from the data
840
840
  const { event, elementDestination, tokenId } = data;
841
841
 
842
842
  // If the activity is completed and there is an element destination, set the element destination to the task
@@ -848,6 +848,12 @@ export default {
848
848
  this.task.elementDestination = elementDestination;
849
849
  // update allow_interstitial based on the element destination change after the submit
850
850
  this.task.allow_interstitial = elementDestination.type === "displayNextAssignedTask";
851
+
852
+ if (elementDestination?.type !== 'taskSource' && elementDestination?.value) {
853
+ // redirect to the element destination value
854
+ window.location.href = elementDestination.value;
855
+ return;
856
+ }
851
857
  }
852
858
 
853
859
  if (event === 'ACTIVITY_EXCEPTION') {
@@ -909,7 +915,8 @@ export default {
909
915
  if (
910
916
  (data?.params[0]?.tokenId &&
911
917
  this.task.user?.id === data.params[0]?.userId) ||
912
- this.task.elementDestination?.type === 'taskSource'
918
+ this.task.elementDestination?.type === 'taskSource' ||
919
+ (data.params[0]?.userId === null && data.params[0]?.userCanClaim === true)
913
920
  ) {
914
921
  this.loadingTask = true;
915
922
  // Check if interstitial tasks are allowed for this task.