This commit is contained in:
@@ -107,25 +107,30 @@ export default {
|
|||||||
);
|
);
|
||||||
this.rendering = false;
|
this.rendering = false;
|
||||||
|
|
||||||
if (res.data && res.data.busy) {
|
|
||||||
window.$gz.eventBus.$emit(
|
|
||||||
"notify-warning",
|
|
||||||
"Dammit captain, I'm giving it all she's got, try again later"
|
|
||||||
);
|
|
||||||
this.resolve(null);
|
|
||||||
this.isVisible = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
this.reject(res);
|
this.reject(res);
|
||||||
} else {
|
} else {
|
||||||
const reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
//special handling for busy response meaning no render slots available at the server
|
||||||
if (window.open(reportUrl, "Report") == null) {
|
if (res.data && res.data.busy) {
|
||||||
this.reject(
|
window.$gz.eventBus.$emit(
|
||||||
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
|
"notify-warning",
|
||||||
|
window.$gz.translation.get("AreYouSureUnsavedChanges"),
|
||||||
|
`${this.$store.state.helpUrl}/ay-report-busy`
|
||||||
);
|
);
|
||||||
|
// this.resolve(null);
|
||||||
|
// this.isVisible = false;
|
||||||
|
// return;
|
||||||
|
} else {
|
||||||
|
//all ok show report
|
||||||
|
const reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
||||||
|
if (window.open(reportUrl, "Report") == null) {
|
||||||
|
this.reject(
|
||||||
|
"Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
if (reportName != null) {
|
if (reportName != null) {
|
||||||
this.resolve({ name: reportName, id: reportId });
|
this.resolve({ name: reportName, id: reportId });
|
||||||
|
|||||||
Reference in New Issue
Block a user