This commit is contained in:
2021-12-28 19:11:55 +00:00
parent 9085b6e88d
commit 13aaf883ee
4 changed files with 11 additions and 9 deletions

View File

@@ -301,6 +301,9 @@ TESTING INFO:
- direct print report from url must be tested and fixed up - direct print report from url must be tested and fixed up
http://localhost:8080/viewreport/103/57 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 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 - upload and test on devops
- give to Joyce to mangle - give to Joyce to mangle

View File

@@ -251,13 +251,12 @@ export default {
if (reportDataOptions == null) { if (reportDataOptions == null) {
throw new Error("report-selector:Open missing reportDataOptions"); throw new Error("report-selector:Open missing reportDataOptions");
} }
if (reportDataOptions.AType == null) {
throw new Error("report-selector:Open - AType is missing or empty");
}
this.reportDataOptions = reportDataOptions; this.reportDataOptions = reportDataOptions;
this.preSelectReportId = preSelectReportId; this.preSelectReportId = preSelectReportId;
if (!preSelectReportId) { if (!preSelectReportId) {
if (reportDataOptions.AType == null) {
throw new Error("report-selector:Open - AType is missing or empty");
}
//get report list from server //get report list from server
const res = await window.$gz.api.get( const res = await window.$gz.api.get(
`report/list/${reportDataOptions.AType}` `report/list/${reportDataOptions.AType}`

View File

@@ -12,7 +12,7 @@ export default {
data() { data() {
return {}; return {};
}, },
async created() { async mounted() {
const vm = this; const vm = this;
//open report links have url format /viewreport/[objectid]/[reportid] //open report links have url format /viewreport/[objectid]/[reportid]
//path: "/viewreport/:oid/:rid", //path: "/viewreport/:oid/:rid",
@@ -27,13 +27,13 @@ export default {
} }
const reportDataOptions = { const reportDataOptions = {
ReportId: reportid, ReportId: reportId,
SelectedRowIds: [objectid], SelectedRowIds: [objectId],
ClientMeta: window.$gz.api.reportClientMetaData() ClientMeta: window.$gz.api.reportClientMetaData()
}; };
try { try {
await vm.$refs.reportSelector.open(reportDataOptions, reportid); await vm.$refs.reportSelector.open(reportDataOptions, reportId);
} catch (ex) { } catch (ex) {
vm.rendering = false; vm.rendering = false;
window.$gz.errorHandler.handleFormError(ex, vm); window.$gz.errorHandler.handleFormError(ex, vm);

View File

@@ -585,7 +585,7 @@ export default {
if (toPath != undefined) { if (toPath != undefined) {
//check if it's an open report link and if so //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 //trigger that to open in a new window and continue on to normal home page
if (toPath.startsWith("/viewreport")) { if (toPath.startsWith("/xxxxxxxxviewreport")) {
(async function() { (async function() {
//open report links have a query string /viewreport?oid=[objectid]&rid=[reportid] //open report links have a query string /viewreport?oid=[objectid]&rid=[reportid]
const searchParams = new URLSearchParams(vm.$route.params.search); const searchParams = new URLSearchParams(vm.$route.params.search);