This commit is contained in:
@@ -298,12 +298,6 @@ 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
|
||||
|
||||
- direct print report from url must be tested and fixed up
|
||||
http://localhost:8080/viewreport/103/57
|
||||
redocument as the format has changed and also update the notify code as the format has changed no longer a query string but a full path as in above
|
||||
|
||||
- Test open url when not logged in
|
||||
http://localhost:8080/open/34/103
|
||||
- upload and test on devops
|
||||
- give to Joyce to mangle
|
||||
|
||||
|
||||
@@ -639,38 +639,6 @@ export default {
|
||||
PDFTime: window.$gz.locale.utcDateToShortTimeLocalized(nowUtc)
|
||||
};
|
||||
},
|
||||
// ///////////////////////////////////
|
||||
// // RENDER REPORT DIRECTLY
|
||||
// //
|
||||
// //
|
||||
// async renderReport(objectid, reportid, redirectNotPopup) {
|
||||
// const reportDataOptions = {
|
||||
// ReportId: reportid,
|
||||
// SelectedRowIds: [objectid],
|
||||
// ClientMeta: this.reportClientMetaData()
|
||||
// };
|
||||
|
||||
// const res = await window.$gz.api.upsert("report/render", reportDataOptions);
|
||||
// if (res.error) {
|
||||
// if (redirectNotPopup) {
|
||||
// return res;
|
||||
// } else {
|
||||
// throw new Error(window.$gz.errorHandler.errorToString(res));
|
||||
// }
|
||||
// } else {
|
||||
// const reportUrl = window.$gz.api.reportDownloadUrl(res.data);
|
||||
// if (redirectNotPopup) {
|
||||
// //used for direct report open from direct report view url
|
||||
// window.location.replace(reportUrl);
|
||||
// } else {
|
||||
// if (window.open(reportUrl, "Report") == null) {
|
||||
// throw new Error(
|
||||
// "Problem displaying report in new window. Browser must allow pop-ups to view reports; check your browser setting"
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
///////////////////////////////////
|
||||
// FETCH BIZ OBJECT NAME
|
||||
//
|
||||
|
||||
@@ -1070,27 +1070,6 @@ export default new Router({
|
||||
},
|
||||
|
||||
//############################## SPECIAL ROUTES ###############################
|
||||
// {
|
||||
// //REPORT VIEW FROM URL
|
||||
// path: "/viewreport",
|
||||
// beforeEnter: async (to, from, next) => {
|
||||
// //open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
// const objectId = parseInt(to.query.oid);
|
||||
// const reportId = parseInt(to.query.rid);
|
||||
|
||||
// const res = await window.$gz.api.renderReport(objectId, reportId, true);
|
||||
// if (res.error) {
|
||||
// //log the error and do a popup for it
|
||||
// const msg = `/viewReport, query ${JSON.stringify(
|
||||
// to.query
|
||||
// )}, server error: ${JSON.stringify(res.error)}`;
|
||||
// window.$gz.eventBus.$emit("notify-error", msg);
|
||||
// next("/applog");
|
||||
// }
|
||||
|
||||
// next(false);
|
||||
// }
|
||||
// },
|
||||
|
||||
{
|
||||
path: "/ay-evaluate",
|
||||
|
||||
@@ -583,32 +583,8 @@ export default {
|
||||
|
||||
const toPath = vm.$route.params.topath; //set in app.vue::mounted
|
||||
if (toPath != undefined) {
|
||||
//check if it's an open report link and if so
|
||||
//trigger that to open in a new window and continue on to normal home page
|
||||
if (toPath.startsWith("/xxxxxxxxviewreport")) {
|
||||
(async function() {
|
||||
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
const searchParams = new URLSearchParams(vm.$route.params.search);
|
||||
//const objectId = parseInt(searchParams.get("oid"));
|
||||
const reportId = parseInt(searchParams.get("rid"));
|
||||
//await window.$gz.api.renderReport(objectId, reportId); //objectid,reportid
|
||||
|
||||
const reportDataOptions = {
|
||||
ReportId: reportId,
|
||||
SelectedRowIds: [parseInt(searchParams.get("oid"))],
|
||||
ClientMeta: window.$gz.api.reportClientMetaData()
|
||||
};
|
||||
try {
|
||||
await vm.$refs.reportSelector.open(reportDataOptions, reportId);
|
||||
} catch (ex) {
|
||||
window.$gz.errorHandler.handleFormError(ex, vm);
|
||||
}
|
||||
})();
|
||||
vm.$router.push(vm.$store.state.homePage);
|
||||
} else {
|
||||
//otherwise open the url indicated
|
||||
vm.$router.push(vm.$route.params.topath);
|
||||
}
|
||||
//open the url indicated
|
||||
vm.$router.push(vm.$route.params.topath);
|
||||
} else {
|
||||
vm.$router.push(vm.$store.state.homePage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user