This commit is contained in:
@@ -6,8 +6,10 @@ WIFI change 5g channel to 52,56,60 and 2g channel to 8
|
|||||||
recheck before doing as it seems to vary, maybe someone else's is auto switching
|
recheck before doing as it seems to vary, maybe someone else's is auto switching
|
||||||
|
|
||||||
|
|
||||||
todo: manually go through every form and look for errors in console and make sure it all works properly
|
todo: datagrid offset out of whack on filter change of grid list or create new
|
||||||
*all* forms, leave no stone unturned, sb no surprises beyond this point
|
it should reset paging any time the filter has changed from the prior in use
|
||||||
|
|
||||||
|
todo: datetime should support keyboard entry if typing
|
||||||
|
|
||||||
todo: if dbid in url query parameter of contact form on server it should include that in the message
|
todo: if dbid in url query parameter of contact form on server it should include that in the message
|
||||||
also something needs to be fixed there, it's been in notes forever
|
also something needs to be fixed there, it's been in notes forever
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default {
|
|||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
let res = await window.$gz.api.get("enum-list/list/" + enumKey);
|
let res = await window.$gz.api.get("enum-list/list/" + enumKey);
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
listViewChanged: function() {
|
listViewChanged: async function() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
|
|
||||||
//If listview had changed it can only have changed *away* from the unsaved filter item if it's present so just remove the unsaved filter item if it exists
|
//If listview had changed it can only have changed *away* from the unsaved filter item if it's present so just remove the unsaved filter item if it exists
|
||||||
@@ -442,37 +442,29 @@ export default {
|
|||||||
// return n.id == -1;
|
// return n.id == -1;
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
//first prevent the following changes from triggering a fetch
|
||||||
|
vm.loading = true;
|
||||||
|
//always go back to page one on a change of data list view
|
||||||
|
vm.dataTablePagingOptions.page = 1;
|
||||||
|
|
||||||
for (let i = vm.selectLists.listViews.length - 1; i >= 0; i--) {
|
for (let i = vm.selectLists.listViews.length - 1; i >= 0; i--) {
|
||||||
if (vm.selectLists.listViews[i].id === -1) {
|
if (vm.selectLists.listViews[i].id === -1) {
|
||||||
vm.selectLists.listViews.splice(i, 1);
|
vm.selectLists.listViews.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let ShouldGetData = vm.dataTablePagingOptions.page == 1;
|
|
||||||
|
|
||||||
if (vm.listViewId == 0) {
|
if (vm.listViewId == 0) {
|
||||||
//default view, no saved, no cached
|
//default view, no saved, no cached
|
||||||
vm.listView = undefined;
|
vm.listView = undefined;
|
||||||
|
|
||||||
saveFormSettings(vm);
|
saveFormSettings(vm);
|
||||||
if (ShouldGetData) {
|
|
||||||
vm.getDataFromApi();
|
|
||||||
} else {
|
|
||||||
vm.dataTablePagingOptions.page = 1;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
} else if (vm.listViewId > 0) {
|
} else if (vm.listViewId > 0) {
|
||||||
(async function() {
|
await fetchListView(vm);
|
||||||
await fetchListView(vm);
|
saveFormSettings(vm);
|
||||||
|
|
||||||
saveFormSettings(vm);
|
|
||||||
if (ShouldGetData) {
|
|
||||||
vm.getDataFromApi();
|
|
||||||
} else {
|
|
||||||
vm.dataTablePagingOptions.page = 1;
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fetch data because listview has changed
|
||||||
|
vm.loading = false;
|
||||||
|
vm.getDataFromApi();
|
||||||
},
|
},
|
||||||
gridCellButtonClick(key, i) {
|
gridCellButtonClick(key, i) {
|
||||||
//translate key to actual object type from header data
|
//translate key to actual object type from header data
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export default {
|
|||||||
|
|
||||||
vm.fetching = false;
|
vm.fetching = false;
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
vm.searchResults = res.data;
|
vm.searchResults = res.data;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
let res = await window.$gz.api.get("tag-list/list?query=" + val); //roles
|
let res = await window.$gz.api.get("tag-list/list?query=" + val); //roles
|
||||||
|
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
//adding this to the property will automatically have it cached by the autocomplete component
|
//adding this to the property will automatically have it cached by the autocomplete component
|
||||||
|
|||||||
@@ -559,14 +559,14 @@ async function initForm(vm) {
|
|||||||
await fetchTranslatedText(vm);
|
await fetchTranslatedText(vm);
|
||||||
let res = await window.$gz.api.get("license");
|
let res = await window.$gz.api.get("license");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
vm.currentLicenseInfo = res.data.license;
|
vm.currentLicenseInfo = res.data.license;
|
||||||
|
|
||||||
res = await window.$gz.api.get("license/database-empty");
|
res = await window.$gz.api.get("license/database-empty");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
vm.dbIsEmpty = res.data;
|
vm.dbIsEmpty = res.data;
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ async function fetchTranslatedText(vm) {
|
|||||||
async function getServerInfo(vm) {
|
async function getServerInfo(vm) {
|
||||||
let res = await window.$gz.api.get("server-info");
|
let res = await window.$gz.api.get("server-info");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
} else {
|
} else {
|
||||||
vm.serverInfo = res.data;
|
vm.serverInfo = res.data;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ export default {
|
|||||||
//Does the database need to be erased?
|
//Does the database need to be erased?
|
||||||
let res = await window.$gz.api.get("license/database-empty");
|
let res = await window.$gz.api.get("license/database-empty");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.data) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
if (res.data != true) {
|
if (res.data != true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user