This commit is contained in:
@@ -766,23 +766,25 @@ async function fetchTranslatedText(vm) {
|
||||
////////////////////
|
||||
//
|
||||
async function fetchReportData(vm) {
|
||||
let reportDataOptions = vm.$route.params.reportDataOptions;
|
||||
vm.obj.objectType = vm.$route.params.ayaType;
|
||||
if (!reportDataOptions) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter reportDataOptions is missing or empty, unable to init report designer";
|
||||
}
|
||||
if (vm.obj.objectType == null) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter ayaType is missing or empty, unable to init report designer";
|
||||
}
|
||||
/* public AyaType ObjectType { get; set; }
|
||||
public long[] SelectedRowIds { get; set; }
|
||||
public string DataListKey { get; set; }
|
||||
public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
|
||||
*/
|
||||
let res = await window.$gz.api.upsert("report/object-report-data", {
|
||||
ObjectType: vm.obj.objectType,
|
||||
ObjectIdArray: reportDataOptions
|
||||
});
|
||||
|
||||
let reportDataOptions = vm.$route.params.reportDataOptions;
|
||||
if (!reportDataOptions) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter reportDataOptions is missing or empty, unable to init report designer";
|
||||
}
|
||||
if (reportDataOptions.ObjectType == null) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter ObjectType is missing or empty, unable to init report designer";
|
||||
}
|
||||
vm.obj.objectType = reportDataOptions.ObjectType;
|
||||
|
||||
let res = await window.$gz.api.upsert(
|
||||
"report/object-report-data",
|
||||
reportDataOptions
|
||||
);
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw res;
|
||||
|
||||
@@ -76,11 +76,10 @@ async function clickHandler(menuItem) {
|
||||
params: { recordid: m.id, ayatype: window.$gz.type.Widget }
|
||||
});
|
||||
} else {
|
||||
//general report selector chosen
|
||||
//general report selector chosen
|
||||
|
||||
let res = await m.vm.$refs.reportSelector.open(
|
||||
window.$gz.type.Widget,
|
||||
m.vm.$refs.gzdatatable.getReportDataOptions()
|
||||
m.vm.$refs.gzdatatable.getReportDataOptions(window.$gz.type.Widget)
|
||||
);
|
||||
|
||||
//if null for no selection
|
||||
|
||||
Reference in New Issue
Block a user