Skip to content

Commit

Permalink
Merge branch 'next' into feature/FOUR-9486
Browse files Browse the repository at this point in the history
  • Loading branch information
pmPaulis authored Oct 5, 2023
2 parents c68b912 + ab5594c commit 01df314
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@processmaker/screen-builder",
"version": "2.77.7",
"version": "2.77.9",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
Expand Down
12 changes: 12 additions & 0 deletions src/components/editor/loop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,18 @@ export default {
data() {
return {
items: [],
cancelledJobs: []
};
},
mounted() {
if (
!localStorage.getItem("cancelledJobs") ||
localStorage.getItem("cancelledJobs") === "null"
) {
this.cancelledJobs = [];
} else {
this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs"));
}
this.$root.$on("ai-form-generated", (formItems, nonce) => {
this.previewAiChanges(formItems, nonce);
});
Expand Down Expand Up @@ -202,6 +211,9 @@ export default {
item.component === "AiSection" &&
nonce === item.config.aiConfig.nonce
) {
if (this.cancelledJobs.some((element) => element === nonce)) {
return;
}
this.$set(item.config.aiConfig, "progress", progress);
}
});
Expand Down
13 changes: 13 additions & 0 deletions src/components/editor/multi-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,19 @@ export default {
data() {
return {
items: [],
cancelledJobs: []
};
},
mounted() {
if (
!localStorage.getItem("cancelledJobs") ||
localStorage.getItem("cancelledJobs") === "null"
) {
this.cancelledJobs = [];
} else {
this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs"));
}
this.$root.$on("ai-form-generated", (formItems, nonce) => {
this.previewAiChanges(formItems, nonce);
});
Expand Down Expand Up @@ -241,6 +251,9 @@ export default {
item.component === "AiSection" &&
nonce === item.config.aiConfig.nonce
) {
if (this.cancelledJobs.some((element) => element === nonce)) {
return;
}
this.$set(item.config.aiConfig, "progress", progress);
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/renderer/file-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default {
this.setPrefix();
if (this.$refs['uploader']) {
this.$refs['uploader'].$forceUpdate();
// Re-upload stored files;
// Re-upload stored files;
// Files disappear when navigating between pages with the Page Navigation component
if (this.files.length > 0) {
this.$refs.uploader.uploader.addFiles(this.files);
Expand Down Expand Up @@ -476,7 +476,7 @@ export default {
if (file.ignored) {
this.invalidFile = true;
this.uploading = false;
window.ProcessMaker.alert(this.$t('File not allowed.'), 'danger');
window.ProcessMaker.alert(this.$t('This file type is not accepted.'), 'danger');
return false;
}
}
Expand Down
16 changes: 16 additions & 0 deletions src/components/task.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,16 @@ export default {
task: {
handler() {
if (!this.screen) {
// if no current screen show the interstitial screen if exists
this.screen = this.task && this.task.interstitial_screen;
}
this.taskId = this.task.id;
this.nodeId = this.task.element_id;
this.listenForParentChanges();
if (this.task.process_request.status === 'COMPLETED') {
this.$emit('completed', this.task.process_request.id);
}
},
},
Expand Down Expand Up @@ -525,6 +532,15 @@ export default {
this.nodeId = this.initialNodeId;
this.requestData = this.value;
this.loopContext = this.initialLoopContext;
if (
this.$parent.task &&
!this.$parent.task.screen &&
this.$parent.task.allow_interstitial &&
this.$parent.task.interstitial_screen
) {
// if interstitial screen exists, show it
this.screen = this.$parent.task.interstitial_screen;
}
},
destroyed() {
this.unsubscribeSocketListeners();
Expand Down
16 changes: 15 additions & 1 deletion src/components/vue-form-builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ export default {
variablesTree: [],
language: "en",
collator: null,
editorContentKey: 0
editorContentKey: 0,
cancelledJobs: []
};
},
computed: {
Expand Down Expand Up @@ -658,7 +659,17 @@ export default {
this.initiateLanguageSupport();
},
mounted() {
if (
!localStorage.getItem("cancelledJobs") ||
localStorage.getItem("cancelledJobs") === "null"
) {
this.cancelledJobs = [];
} else {
this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs"));
}
this.checkForCaptchaInLoops();
this.$root.$on("nested-screen-updated", () => {
this.checkForCaptchaInLoops();
});
Expand Down Expand Up @@ -1142,6 +1153,9 @@ export default {
item.component === "AiSection" &&
nonce === item.config.aiConfig.nonce
) {
if (this.cancelledJobs.some((element) => element === nonce)) {
return;
}
this.$set(item.config.aiConfig, "progress", progress);
}
});
Expand Down

0 comments on commit 01df314

Please sign in to comment.