This commit is contained in:
@@ -53,7 +53,6 @@ export default {
|
|||||||
},
|
},
|
||||||
open(dls) {
|
open(dls) {
|
||||||
// console.log("OPEN", dls);
|
// console.log("OPEN", dls);
|
||||||
// this.$on("ext-close-refresh", this.close({ refresh: true }));
|
|
||||||
this.dataListSelection = dls;
|
this.dataListSelection = dls;
|
||||||
this.isVisible = true;
|
this.isVisible = true;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -62,7 +61,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
close(ret) {
|
close(ret) {
|
||||||
//this.$off("ext-close-refresh");
|
|
||||||
this.isVisible = false;
|
this.isVisible = false;
|
||||||
this.resolve(ret);
|
this.resolve(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ export default {
|
|||||||
},
|
},
|
||||||
reload: function(newValue, oldValue) {
|
reload: function(newValue, oldValue) {
|
||||||
if (newValue != oldValue) {
|
if (newValue != oldValue) {
|
||||||
this.getDataFromApi();
|
this.getDataFromApi(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -575,7 +575,7 @@ export default {
|
|||||||
//i is the actual AyaNova index of vm record so we have all we need to open vm object
|
//i is the actual AyaNova index of vm record so we have all we need to open vm object
|
||||||
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
||||||
},
|
},
|
||||||
async getDataFromApi() {
|
async getDataFromApi(deSelectAll) {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
|
|
||||||
if (vm.loading) {
|
if (vm.loading) {
|
||||||
@@ -599,7 +599,11 @@ export default {
|
|||||||
vm.loading = true;
|
vm.loading = true;
|
||||||
//Weird bug that causes grid to show all items selected after async method runs below to fetch data
|
//Weird bug that causes grid to show all items selected after async method runs below to fetch data
|
||||||
//this puts a pin in it then resets it after the fetch is completed
|
//this puts a pin in it then resets it after the fetch is completed
|
||||||
let preSelected = [...vm.selected];
|
let preSelected = [];
|
||||||
|
if (!deSelectAll) {
|
||||||
|
//preserve selections
|
||||||
|
preSelected = [...vm.selected];
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//untokenize ListView date token criteria (if there are any)
|
//untokenize ListView date token criteria (if there are any)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
:dataListFilter="dataListFilter"
|
:dataListFilter="dataListFilter"
|
||||||
:dataListSort="dataListSort"
|
:dataListSort="dataListSort"
|
||||||
:showSelect="rights.change"
|
:showSelect="rights.change"
|
||||||
|
:reload="reload"
|
||||||
v-on:selection-change="handleSelected"
|
v-on:selection-change="handleSelected"
|
||||||
data-cy="widgetsTable"
|
data-cy="widgetsTable"
|
||||||
>
|
>
|
||||||
@@ -40,7 +41,8 @@ export default {
|
|||||||
dataListSort: "",
|
dataListSort: "",
|
||||||
rights: window.$gz.role.defaultRightsObject(),
|
rights: window.$gz.role.defaultRightsObject(),
|
||||||
ayType: window.$gz.type.Widget,
|
ayType: window.$gz.type.Widget,
|
||||||
selectedItems: []
|
selectedItems: [],
|
||||||
|
reload: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -74,7 +76,11 @@ async function clickHandler(menuItem) {
|
|||||||
let res = await m.vm.$refs.extensions.open(
|
let res = await m.vm.$refs.extensions.open(
|
||||||
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.Widget)
|
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.Widget)
|
||||||
);
|
);
|
||||||
console.log("widgets::extensions res=", res);
|
if (res && res.refresh == true) {
|
||||||
|
//force full refresh of grid including selections
|
||||||
|
m.vm.reload = !m.vm.reload;
|
||||||
|
}
|
||||||
|
//console.log("widgets::extensions res=", res);
|
||||||
break;
|
break;
|
||||||
case "report":
|
case "report":
|
||||||
if (m.id != null) {
|
if (m.id != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user