This commit is contained in:
@@ -722,13 +722,24 @@ export default new Router({
|
||||
{
|
||||
//REPORT VIEW FROM URL
|
||||
path: "/viewreport",
|
||||
beforeEnter: (to, from, next) => {
|
||||
(async function() {
|
||||
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
let objectId = parseInt(to.query.oid);
|
||||
let reportId = parseInt(to.query.rid);
|
||||
await window.$gz.api.renderReport(objectId, reportId, true);
|
||||
})();
|
||||
beforeEnter: async (to, from, next) => {
|
||||
// (async function() {
|
||||
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
|
||||
let objectId = parseInt(to.query.oid);
|
||||
let reportId = parseInt(to.query.rid);
|
||||
|
||||
let res = await window.$gz.api.renderReport(objectId, reportId, true);
|
||||
if (res.error) {
|
||||
//log the error and do a popup for it
|
||||
let msg = `/viewReport, query ${JSON.stringify(
|
||||
to.query
|
||||
)}, server error: ${JSON.stringify(res.error)}`;
|
||||
// window.$gz.store.commit("logItem", msg);
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
next("/applog");
|
||||
}
|
||||
|
||||
//})();
|
||||
|
||||
next(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user