diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 8cabf541..e6f98b86 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -279,6 +279,7 @@ TAGS - At server if equality compare value is an array of strings then it's assu ---------------------- NON DATALISTVIEW STUFF ---------------------------- +TODO: "Unsaved filter" being displayed, sb "Unsaved listview" TODO: Switch control has issues in mobile view throws error "touch is undefined" - Update and see if fixes or else switch to some other component TODO: HELP link on listVieweditor not working diff --git a/ayanova/src/components/gz-data-table.vue b/ayanova/src/components/gz-data-table.vue index 06f66c3a..52036380 100644 --- a/ayanova/src/components/gz-data-table.vue +++ b/ayanova/src/components/gz-data-table.vue @@ -681,14 +681,8 @@ function populatePickLists(vm) { } else { vm.pickLists.listViews = res.data; window.$gz.form.addNoSelectionItem(vm.pickLists.listViews); - //add UNSAVED FILTER if -1 - if (vm.listViewId == -1) { - vm.pickLists.listViews.unshift({ - name: vm.lt("FilterUnsaved"), - id: -1 - }); - } } + console.log("Done populate picklists"); }); } @@ -750,7 +744,7 @@ function saveFormSettings(vm) { //////////////////// // function loadFormSettings(vm) { - // console.log("loadFormSettings::TOP"); + console.log("loadFormSettings::TOP"); var formSettings = window.$gz.form.getFormSettings(vm.formKey); //process SAVED formsettings if (formSettings.saved) { @@ -768,7 +762,16 @@ function loadFormSettings(vm) { //-1 is code for unsaved list view //check if there is a local copy of a listview vm was edited but not saved if (formSettings.saved.dataTable.unsavedListView != undefined) { + //add UNSAVED FILTER if -1 + + vm.pickLists.listViews.unshift({ + name: vm.lt("FilterUnsaved"), + id: -1 + }); + console.log("loadFormSettings::unsaved Listview in use. It is:"); + vm.listView = formSettings.saved.dataTable.unsavedListView; + console.log(vm.listView); } else { //listviewid is for unsaved but we have no unsaved so fix that up vm.listView = undefined; diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index a7e68b8d..1903e2cd 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -487,7 +487,7 @@ export default { dataListKey: undefined, formKey: undefined, fieldDefinitions: [], - effectiveListView: undefined, + effectiveListView: undefined, concurrencyToken: undefined, pickLists: { dateFilterOperators: [], @@ -1127,7 +1127,6 @@ function setEffectiveListView(vm) { var formSettings = window.$gz.form.getFormSettings(vm.formKey); if (vm.listViewId == -1) { - debugger; if (formSettings.saved.dataTable.unsavedListView != null) { vm.effectiveListView = formSettings.saved.dataTable.unsavedListView; vm.obj.name = vm.lt("FilterUnsaved");