This commit is contained in:
@@ -156,12 +156,11 @@ export default {
|
||||
vm.formState.readOnly = !vm.rights.change;
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
|
||||
//route params MUST have ID LIST
|
||||
if (!vm.$route.params.idList) {
|
||||
//route params MUST have source data
|
||||
if (!vm.$route.params.sourceData) {
|
||||
throw "ay-report-edit::created - missing sourceData route parameter";
|
||||
}
|
||||
|
||||
vm.idList = vm.$route.params.idList;
|
||||
|
||||
//id 0 means create a new record don't load one
|
||||
if (vm.$route.params.recordid != 0) {
|
||||
//is there already an obj from a prior operation?
|
||||
@@ -767,10 +766,10 @@ async function fetchTranslatedText(vm) {
|
||||
////////////////////
|
||||
//
|
||||
async function fetchReportData(vm) {
|
||||
let idList = vm.$route.params.idList;
|
||||
let sourceData = vm.$route.params.sourceData;
|
||||
vm.obj.objectType = vm.$route.params.ayaType;
|
||||
if (!idList || idList.length == 0) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter idList is missing or empty, unable to init report designer";
|
||||
if (!sourceData) {
|
||||
throw "ay-report-edit:fetchReportData - route parameter sourceData 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";
|
||||
@@ -782,7 +781,7 @@ async function fetchReportData(vm) {
|
||||
} */
|
||||
let res = await window.$gz.api.upsert("report/object-report-data", {
|
||||
ObjectType: vm.obj.objectType,
|
||||
ObjectIdArray: idList
|
||||
ObjectIdArray: sourceData
|
||||
});
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
|
||||
@@ -640,7 +640,9 @@ async function clickHandler(menuItem) {
|
||||
|
||||
let res = await m.vm.$refs.reportSelector.open(
|
||||
window.$gz.type.Widget,
|
||||
[m.vm.obj.id]
|
||||
{
|
||||
selectedRowIds: [m.vm.obj.id]
|
||||
}
|
||||
);
|
||||
|
||||
//if null for no selection
|
||||
|
||||
@@ -76,13 +76,11 @@ async function clickHandler(menuItem) {
|
||||
params: { recordid: m.id, ayatype: window.$gz.type.Widget }
|
||||
});
|
||||
} else {
|
||||
//general report selector chosen
|
||||
console.log(m.vm.$refs.gzdatatable.getRowIds());
|
||||
return;
|
||||
//general report selector chosen
|
||||
|
||||
let res = await m.vm.$refs.reportSelector.open(
|
||||
window.$gz.type.Widget,
|
||||
[m.vm.getSelection()]
|
||||
m.vm.$refs.gzdatatable.getDataTableSourceOptions()
|
||||
);
|
||||
|
||||
//if null for no selection
|
||||
|
||||
Reference in New Issue
Block a user