HUGE REFACTOR / CLEANUP

if there is a issue it's probably something in here that was changed
This commit is contained in:
2021-09-28 20:19:44 +00:00
parent 51eddfede9
commit d0afdd9855
238 changed files with 3127 additions and 8614 deletions

View File

@@ -36,20 +36,16 @@ export default {
},
async doAction() {
//do the export and trigger download
let vm = this;
let url = `export/render/${vm.exportFormat}`;
let body = this.dataListSelection;
try {
//call api route
let res = await window.$gz.api.upsert(url, body);
const res = await window.$gz.api.upsert(
`export/render/${this.exportFormat}`,
this.dataListSelection
);
if (res.error) {
//Error object constructor must be a string
throw new Error(window.$gz.errorHandler.errorToString(res, vm));
throw new Error(window.$gz.errorHandler.errorToString(res, this));
}
let href = window.$gz.api.genericDownloadUrl(
const href = window.$gz.api.genericDownloadUrl(
"export/download/" + res.data
);
if (window.open(href, "DownloadExport") == null) {
@@ -58,8 +54,8 @@ export default {
);
}
} catch (error) {
window.$gz.errorHandler.handleFormError(error, vm);
window.$gz.eventBus.$emit("notify-error", vm.$ay.t("JobFailed"));
window.$gz.errorHandler.handleFormError(error, this);
window.$gz.eventBus.$emit("notify-error", this.$ay.t("JobFailed"));
}
}
},