This commit is contained in:
@@ -210,7 +210,6 @@ export default {
|
||||
this.$store.state.formCustomTemplate[this.formKey],
|
||||
["dataKey", dataKey]
|
||||
).type;
|
||||
//console.log("Field with datakey " + dataKey + " is of type " + ctrlType);
|
||||
|
||||
//First get current value for the data that came from the server
|
||||
var ret = cData[dataKey];
|
||||
|
||||
@@ -403,9 +403,7 @@ export default {
|
||||
if (vm.listViewId == 0) {
|
||||
//default view, no saved, no cached
|
||||
vm.listView = undefined;
|
||||
// console.log(
|
||||
// "listViewchanged: Default NO LIST VIEW selected - Calling saveformsettings"
|
||||
// );
|
||||
|
||||
saveFormSettings(vm);
|
||||
if (ShouldGetData) {
|
||||
vm.getDataFromApi();
|
||||
@@ -415,11 +413,8 @@ export default {
|
||||
//
|
||||
} else if (vm.listViewId > 0) {
|
||||
(async function() {
|
||||
// console.log("listViewchanged: awaiting fetchListView...");
|
||||
await fetchListView(vm);
|
||||
// console.log(
|
||||
// "listViewchanged: back from fetchListView calling save form settings"
|
||||
// );
|
||||
|
||||
saveFormSettings(vm);
|
||||
if (ShouldGetData) {
|
||||
vm.getDataFromApi();
|
||||
@@ -447,7 +442,6 @@ export default {
|
||||
if (vm.loading) {
|
||||
return;
|
||||
}
|
||||
// console.log("getDataFromAPI::TOP");
|
||||
|
||||
//start with defaults
|
||||
var listOptions = {
|
||||
@@ -462,22 +456,8 @@ export default {
|
||||
listOptions.Limit = itemsPerPage;
|
||||
}
|
||||
|
||||
// //effective ListView
|
||||
// if (vm.listViewId != 0) {
|
||||
// //we have a listview id so there will be a temp cached listview
|
||||
// listOptions["DataFilterID"] = vm.dataFilterId;
|
||||
// }
|
||||
|
||||
vm.loading = true;
|
||||
|
||||
// {
|
||||
// "offset": 0,
|
||||
// "limit": 0,
|
||||
// "dataListKey": "string",
|
||||
// "listView": "string"
|
||||
// }
|
||||
// console.log("GetDataFromAPI::ListView is:");
|
||||
// console.log(vm.listView);
|
||||
window.$gz.api
|
||||
.upsert(vm.apiBaseUrl, {
|
||||
offset: listOptions.Offset,
|
||||
@@ -719,7 +699,6 @@ function populatePickLists(vm) {
|
||||
vm.pickLists.listViews = res.data;
|
||||
window.$gz.form.addNoSelectionItem(vm.pickLists.listViews);
|
||||
}
|
||||
// console.log("Done populate picklists");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -728,7 +707,6 @@ function populatePickLists(vm) {
|
||||
// Fetch and cache list view
|
||||
//
|
||||
function fetchListView(vm) {
|
||||
//console.log("fetchListView::TOP");
|
||||
if (!vm.listViewId) {
|
||||
return;
|
||||
}
|
||||
@@ -737,10 +715,6 @@ function fetchListView(vm) {
|
||||
window.$gz.errorHandler.handleFormError(res.error, vm);
|
||||
} else {
|
||||
vm.listView = res.data.listView;
|
||||
// console.log(
|
||||
// "fetchListView::insideGet, data returned, set listview to new value " +
|
||||
// vm.listView
|
||||
// );
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -748,8 +722,6 @@ function fetchListView(vm) {
|
||||
////////////////////
|
||||
//
|
||||
function saveFormSettings(vm) {
|
||||
// console.log("saveFormSettings::TOP");
|
||||
|
||||
var unsavedlv = vm.listView;
|
||||
var cachedlv = vm.listView;
|
||||
|
||||
@@ -781,9 +753,6 @@ function saveFormSettings(vm) {
|
||||
////////////////////
|
||||
//
|
||||
function loadFormSettings(vm) {
|
||||
//console.log("loadFormSettings::TOP");
|
||||
// debugger;
|
||||
console.log("gz-data-table::loadFormSettings getting form settings");
|
||||
var formSettings = window.$gz.form.getFormSettings(vm.formKey);
|
||||
|
||||
//process SAVED formsettings
|
||||
@@ -808,10 +777,8 @@ function loadFormSettings(vm) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user