This commit is contained in:
@@ -456,7 +456,7 @@ export default {
|
||||
refresh() {
|
||||
this.getDataFromApi();
|
||||
},
|
||||
getReportDataOptions(AyaType) {
|
||||
getReportDataOptions(ayaType) {
|
||||
let vm = this;
|
||||
//called when parent form needs the selected id's or the list view options needed to rehydrate the entire list of id's in the same order and filter
|
||||
//i.e. for reporting, bulk operations etc
|
||||
@@ -471,13 +471,13 @@ export default {
|
||||
return z.id;
|
||||
});
|
||||
}
|
||||
/* public AyaType ObjectType { get; set; }
|
||||
/* 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
|
||||
*/
|
||||
return {
|
||||
ObjectType:ayaType
|
||||
ObjectType: ayaType,
|
||||
selectedRowIds: selectedRowIds,
|
||||
dataListKey: vm.dataListKey,
|
||||
listView: untokenizeListView(vm.listView)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user