From e7984742a442fefd3602019c75a136b2ecd06612 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 28 Dec 2021 19:24:23 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 6 ------ ayanova/src/api/gzapi.js | 32 -------------------------------- ayanova/src/router.js | 21 --------------------- ayanova/src/views/login.vue | 28 ++-------------------------- 4 files changed, 2 insertions(+), 85 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 0f3a55d4..9de9d1a1 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -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 diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index 0c4d87c5..897f52ad 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -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 // diff --git a/ayanova/src/router.js b/ayanova/src/router.js index 6b893cda..d876312f 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -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", diff --git a/ayanova/src/views/login.vue b/ayanova/src/views/login.vue index d99b31d6..1c7e46d4 100644 --- a/ayanova/src/views/login.vue +++ b/ayanova/src/views/login.vue @@ -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); }