FOUR-18763: Implemented BE for PI Process import by TinCodes · Pull Request #7337 · ProcessMaker/processmaker
Expand Up
@@ -77,16 +77,32 @@ export default {
}
this.$root.file = this.file;
let formData = new FormData(); formData.append('file', this.file);
this.fileIsValid = true; }, removeFile() { this.file = ''; this.fileIsValid = false; }, importNewPI() {} importNewPI() { if (!this.file) { return; }
let formData = new FormData(); formData.append('file', this.file);
ProcessMaker.apiClient .post(`/package-ai/pi_process/import`, formData) .then((response) => { // TODO: Make import and redirect to Modeler }) .catch((error) => { window.ProcessMaker.alert( this.$t("An error ocurred while importing the current PI Process."),
"danger",
);
});
}
},
computed: {
title() {
Expand Down
let formData = new FormData(); formData.append('file', this.file);
this.fileIsValid = true; }, removeFile() { this.file = ''; this.fileIsValid = false; }, importNewPI() {} importNewPI() { if (!this.file) { return; }
let formData = new FormData(); formData.append('file', this.file);
ProcessMaker.apiClient .post(`/package-ai/pi_process/import`, formData) .then((response) => { // TODO: Make import and redirect to Modeler }) .catch((error) => { window.ProcessMaker.alert( this.$t("An error ocurred while importing the current PI Process."),
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to en.json file