This commit is contained in:
2020-09-01 18:33:05 +00:00
parent 97bc981b16
commit 5f5585eae7
4 changed files with 29 additions and 25 deletions

View File

@@ -62,7 +62,6 @@
export default {
data: () => ({
rights: window.$gz.role.getRights(window.$gz.type.Report),
ayaType: null,
reportDataOptions: {},
isVisible: false,
resolve: null,
@@ -75,16 +74,19 @@ export default {
selectedReport: null
}),
methods: {
async open(ayaType, reportDataOptions) {
async open(reportDataOptions) {
let vm = this;
if (ayaType == null || reportDataOptions == null) {
throw "report-selector:Open missing type and or reportDataOptions";
if (reportDataOptions == null) {
throw "report-selector:Open missing reportDataOptions";
}
if (reportDataOptions.ObjectType == null) {
throw "report-selector:Open - ObjectType is missing or empty";
}
this.ayaType = ayaType;
//source data object
//either need to rehydrate or send as is if not selectedRowIds
// {
// ObjectType: ayaType,
// selectedRowIds: selectedRowIds,
// dataListKey: vm.dataListKey,
// listView: untokenizeListView(vm.listView)
@@ -96,7 +98,9 @@ export default {
//get report list from server
let res = await window.$gz.api.get(`report/list/${ayaType}`);
let res = await window.$gz.api.get(
`report/list/${reportDataOptions.ObjectType}`
);
//console.log("report-selectr report list from server is: ", res);
if (res.error) {
throw res.error;
@@ -125,7 +129,6 @@ export default {
name: "ay-report-edit",
params: {
recordid: 0,
ayaType: this.ayaType,
reportDataOptions: this.reportDataOptions
}
});