From 3fb25fce47ad0d03564cd13451f2ba0500411cc9 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 9 Sep 2021 19:43:14 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 6 +++++- ayanova/src/components/data-table.vue | 15 +++++++++++++-- ayanova/src/store.js | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index cbb602a9..31920002 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -1,5 +1,5 @@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -@@@@@@@@@@@@@@@ ROADMAP STAGE 6 - "REALITY" All in on porting over all the real objects from v7 +@@@@@@@@@@@@@@@ ROADMAP STAGE 6 - "MAKE IT HAPPEN" All in on porting over all the real objects from v7 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ “Accept the things to which fate binds you, and love the people with whom fate brings you together,but do so with all your heart.” ― Marcus Aurelius, Meditations @@ -10,6 +10,10 @@ ## ROUGH SCHEDULE GetLastReport is not implemented anywhere but is useful adn key + lastreport new icon or no icon or...?? + Erase all data / generate data should maybe also erase all local cached browser data like ?reset ?? + or maybe not, this is related to reports which I think don't clear in erasedatabase?? + new testing cases Schedule form Dashboard / widgets diff --git a/ayanova/src/components/data-table.vue b/ayanova/src/components/data-table.vue index eb4fe938..1c86b9d5 100644 --- a/ayanova/src/components/data-table.vue +++ b/ayanova/src/components/data-table.vue @@ -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); } //////////////////// diff --git a/ayanova/src/store.js b/ayanova/src/store.js index 39cbb790..0f6064d5 100644 --- a/ayanova/src/store.js +++ b/ayanova/src/store.js @@ -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) {