@processmaker/screen-builder 2.98.4 → 2.99.0
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/dist/vue-form-builder.css +1 -1
- package/dist/vue-form-builder.es.js +20 -5
- package/dist/vue-form-builder.es.js.map +1 -1
- package/dist/vue-form-builder.umd.js +2 -2
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/renderer/file-upload.vue +19 -0
- package/src/components/task.vue +13 -2
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
@upload-start="start"
|
|
14
14
|
@file-removed="removed"
|
|
15
15
|
@file-success="fileUploaded"
|
|
16
|
+
@file-error="fileError"
|
|
16
17
|
@file-added="addFile"
|
|
17
18
|
:class="{'was-validated': required}"
|
|
18
19
|
>
|
|
@@ -503,6 +504,24 @@ export default {
|
|
|
503
504
|
e.target.click();
|
|
504
505
|
}
|
|
505
506
|
},
|
|
507
|
+
fileError(rootFile, file, messages, chunk)
|
|
508
|
+
{
|
|
509
|
+
let displayMessage = '';
|
|
510
|
+
try {
|
|
511
|
+
const messagesArray = JSON.parse(messages);
|
|
512
|
+
displayMessage = messagesArray.join(', ');
|
|
513
|
+
}
|
|
514
|
+
catch (e) {
|
|
515
|
+
displayMessage = messages;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
if (displayMessage.length > 0) {
|
|
519
|
+
window.ProcessMaker.alert(`${this.$t('File Upload Error:')} ${displayMessage}`, 'danger');
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
window.onbeforeunload = function() {};
|
|
523
|
+
this.$emit('file-error', messages);
|
|
524
|
+
},
|
|
506
525
|
fileUploaded(rootFile, file, message) {
|
|
507
526
|
this.uploading = false;
|
|
508
527
|
let name = file.name;
|
package/src/components/task.vue
CHANGED
|
@@ -826,9 +826,9 @@ export default {
|
|
|
826
826
|
*/
|
|
827
827
|
isSameUser(currentTask, redirectData) {
|
|
828
828
|
const userIdMatch = currentTask.user?.id === redirectData.params[0].userId;
|
|
829
|
-
const typeMatch = currentTask.elementDestination?.type === null
|
|
829
|
+
const typeMatch = currentTask.elementDestination?.type === null
|
|
830
830
|
|| currentTask.elementDestination?.type === 'taskSource';
|
|
831
|
-
|
|
831
|
+
|
|
832
832
|
return userIdMatch && typeMatch;
|
|
833
833
|
},
|
|
834
834
|
|
|
@@ -839,6 +839,17 @@ export default {
|
|
|
839
839
|
* @param {Object} data - The event data containing the process update information.
|
|
840
840
|
*/
|
|
841
841
|
handleProcessUpdated(data) {
|
|
842
|
+
const elementDestinationValue = this.task.elementDestination?.value;
|
|
843
|
+
|
|
844
|
+
if (
|
|
845
|
+
elementDestinationValue &&
|
|
846
|
+
data?.params[0]?.tokenId === this.taskId &&
|
|
847
|
+
data?.params[0]?.requestStatus === 'ACTIVE'
|
|
848
|
+
) {
|
|
849
|
+
window.location.href = elementDestinationValue;
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
852
|
+
|
|
842
853
|
if (
|
|
843
854
|
['ACTIVITY_ACTIVATED', 'ACTIVITY_COMPLETED'].includes(data.event)
|
|
844
855
|
&& data.elementType === 'task'
|