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
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

View File

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

View File

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

View File

@@ -585,7 +585,7 @@ export default {
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("/viewreport")) {
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);