This commit is contained in:
@@ -1291,7 +1291,7 @@ async function fetchSavedFilterList(vm) {
|
||||
////////////////////
|
||||
//
|
||||
function saveFormSettings(vm) {
|
||||
window.$gz.form.setFormSettings(vm.formKey, {
|
||||
let newFormSettings = {
|
||||
temp: { page: vm.dataTablePagingOptions.page },
|
||||
saved: {
|
||||
itemsPerPage: vm.dataTablePagingOptions.itemsPerPage,
|
||||
@@ -1299,7 +1299,18 @@ function saveFormSettings(vm) {
|
||||
activeFilterId: vm.activeFilterId
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//preserve anything not directly related to datatable
|
||||
//for now it's just the last report so nothing fancy here
|
||||
let formSettings = window.$gz.form.getFormSettings(vm.formKey);
|
||||
console.log("datatable-saveformsettings fetched is:", formSettings);
|
||||
if (formSettings != null && formSettings.saved != null) {
|
||||
if (formSettings.saved.lastReport != null) {
|
||||
newFormSettings.lastReport = formSettings.saved.lastReport;
|
||||
}
|
||||
}
|
||||
window.$gz.form.setFormSettings(vm.formKey, newFormSettings);
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
@@ -185,6 +185,7 @@ export default new Vuex.Store({
|
||||
state.formSettings = {};
|
||||
},
|
||||
setFormSettings(state, data) {
|
||||
console.log("Store::setformsettings", data);
|
||||
state.formSettings[data.formKey] = data.formSettings;
|
||||
},
|
||||
clearFormSettings(state, formKey) {
|
||||
|
||||
Reference in New Issue
Block a user