Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOUR-18763: Implemented BE for PI Process import #7337

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
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
24 changes: 20 additions & 4 deletions resources/js/processes/import/components/ImportPIModal.vue
Original file line number Diff line number Diff line change
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."),
Copy link
Contributor

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

"danger",
);
});
}
},
computed: {
title() {
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"Alpha-Numeric": "Alpha-Numeric",
"Alpha": "Alpha",
"An error occurred. Check the form for errors in red text.": "An error occurred. Check the form for errors in red text.",
"An error ocurred while importing the current PI Process.": "An error ocurred while importing the current PI Process.",
"An existing user has been found with the email {{ email }} would you like to save and reactivate their account?": "An existing user has been found with the email {{ email }} would you like to save and reactivate their account?",
"An existing user has been found with the email {{ username }} would you like to save and reactivate their account?": "An existing user has been found with the username {{ username }} would you like to save and reactivate their account?",
"Analytics Chart": "Analytics Chart",
Expand Down
Loading