Skip to content
Merged
Changes from 1 commit
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
Next Next commit
PI Process creation and redirect to modeler
  • Loading branch information
TinCodes committed Sep 10, 2024
commit d7ac68edb678abba108472e566108f99a274f722
16 changes: 7 additions & 9 deletions resources/js/processes/import/components/ImportPIModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
this.file = '';
this.fileIsValid = false;
},
importNewPI() {
async importNewPI() {
if (!this.file) {
return;
}
Expand All @@ -93,16 +93,14 @@ export default {

ProcessMaker.apiClient
.post(`/package-ai/pi_process/import`, formData)
.then((response) => {
// TODO: Make import and redirect to Modeler
.then(response => {
ProcessMaker.alert(this.$t("The PI process was created."), "success");
window.location = `/modeler/${response.data.id}`;
})
.catch((error) => {
window.ProcessMaker.alert(
this.$t("An error ocurred while importing the current PI Process."),
"danger",
);
.catch(error => {
console.error(error);
});
}
},
},
computed: {
title() {
Expand Down