Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ensure Process Template Import Status Before Retry
  • Loading branch information
sanjacornelius committed Feb 27, 2024
commit 7df05ccbdc974eeb95daf96b59fe3a8cb1ae8bad
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {
task: null,
currentUserId: null,
formData: {},
importingProcessTemplate: false,
};
},
methods: {
Expand Down Expand Up @@ -86,9 +87,9 @@ export default {
this.task = task;
},
completed() {
if (this.shouldImportProcessTemplate) {
if (!this.importingProcessTemplate && this.shouldImportProcessTemplate) {
this.importProcessTemplate();
} else {
} else if (this.shouldImportProcessTemplate) {
this.showHelperProcess = false;
this.$bvModal.hide("processWizard");
}
Expand All @@ -103,6 +104,7 @@ export default {
});
},
importProcessTemplate() {
this.importingProcessTemplate = true;
ProcessMaker.apiClient.post(`template/create/process/${this.template.process_template_id}`, {
name: this.template.name,
description: this.template.description,
Expand All @@ -112,6 +114,7 @@ export default {
wizardTemplateUuid: this.template.uuid,
helperProcessRequestId: this.task.process_request_id,
}).then((response) => {
this.importingProcessTemplate = false;
if (response.data?.existingAssets) {
this.handleExistingAssets(response.data);
} else {
Expand Down