This commit is contained in:
2021-12-27 22:01:29 +00:00
parent 78a8758d11
commit deecb1bf9a
2 changed files with 8 additions and 21 deletions

View File

@@ -298,7 +298,9 @@ TESTING INFO:
- 1 todo: cancellable reporting?? Jobify it just like any other long running job, it's necessary unfortunately and then put a cancel button
must free up server when cancelling
EXPORT must use this too, fuck.
Ok, working now but not cancellable yet, not sure how to do that but will figure it out
- 1 todo: add the caching technique to *all* the other getreportdata methods as was done with workorder

View File

@@ -74,6 +74,7 @@ export default {
reportList: [],
selectedReport: null,
rendering: false,
jobActive: false,
preSelectReportId: null
}),
methods: {
@@ -180,6 +181,7 @@ export default {
throw new Error("Job failed");
}
if (jobStatus == 3) {
this.rendering = false;
//success, get the report url name
const jobLogRes = await window.$gz.api.get(
`job-operations/logs/${jobId}`
@@ -201,37 +203,19 @@ export default {
}
}
}
/*
[
{
"created": "2021-12-27T20:23:54.145758Z",
"statusText": "LT:ProcessingJob \"LT:Report id: \"60\" LT:WorkOrder (1) LT:User AyaNova SuperUser - RenderReport\"",
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
},
{
"created": "2021-12-27T20:23:54.156294Z",
"statusText": "LT:StartJob RenderReport",
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
},
{
"created": "2021-12-27T20:23:55.820618Z",
"statusText": "{reportfilename:\"4jpsvserib2.pdf\"}",
"jobId": "62f78eb6-7744-4bbc-bd93-00848110219c"
}
]
*/
this.jobActive = false;
}
}
//job ran to completion, get the report file name and fetch it
if (reportUrl) {
console.log("Attempting to open report url:", reportUrl);
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.rendering = false;
this.isVisible = false;
if (reportName != null) {
this.resolve({ name: reportName, id: reportId });
@@ -239,6 +223,7 @@ export default {
this.resolve(null);
}
} catch (error) {
this.rendering = false;
this.jobActive = false;
this.reject(error);
//window.$gz.errorHandler.handleFormError(error, this);