This commit is contained in:
2020-07-29 23:13:20 +00:00
parent 456cf2d8a2
commit 9c39c33229
5 changed files with 8 additions and 57 deletions

View File

@@ -15,9 +15,6 @@ ____________
##########################
todo: logging sql queries in trace at server
maybe too much or maybe that's trace level and everything else I've done at trace sb debug so can filter OUT that sql shit
Also the user count license circumvention query is plainly visible, if it were to be executed directly instead of through EF core it may not be visible?
todo: add method to continue on to requested url when a login needs to happen
(like capture the requested url and if found after login go to it)

View File

@@ -324,33 +324,15 @@ export default {
//this smells bad but it works
vm.$root.$gz = window.$gz;
// //Capture open object type and id if present
// //localhost:8080/login?type=2&id=22
// if (window.location.search) {
// //https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
// var searchParams = new URLSearchParams(window.location.search);
// var openObject = {};
// //data should be format for open-object-handler
// // { type: [AYATYPE], id: [RECORDID] }
// if (searchParams.has("type")) {
// openObject.type = Number(searchParams.get("type"));
// if (searchParams.has("id")) {
// openObject.id = Number(searchParams.get("id"));
// }
// window.$gz.store.commit("setOpenObject", openObject);
// }
// }
//redirect to login if not authenticated
if (!vm.$store.state.authenticated) {
vm.$router.push("login");
} else {
//this can be safely called any time, it checks if there is an open object in store and
//opens it or if not just returns
// window.$gz.eventBus.$emit("openobject", null);
//If a direct open path was being used but user is not logged in this will catch it
//otherwise they will just go on to that path directly
vm.$router.push({
name: "login",
params: { topath: window.location.pathname }
});
}
//RELOAD / REFRESH HANDLING
//Restart notification polling due to refresh?
if (window.$gz.store.state.authenticated) {

View File

@@ -8,25 +8,6 @@ export default {
// called from App.vue
handleOpenObjectClick(vm, tid) {
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
//or null which is what is called when asking to check if there is a direct openObject in store and open it
// if (tid == null) {
// let op = vm.$store.state.openObject;
// //clear it out so it doesn't recur
// window.$gz.store.commit("clearOpenObject");
// if (op && op.type) {
// tid = op;
// } else {
// //log it in case we need to see it in tech support
// window.$gz.store.commit(
// "logItem",
// `Error: open object url was not valid, missing type or invalid type ${JSON.stringify(
// op
// )}`
// );
// return; //bail out, nothing to open here
// }
// }
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open

View File

@@ -19,7 +19,6 @@ if (window.location.search) {
export default new Vuex.Store({
plugins: [createPersistedState({ key: "AyaNova" })],
state: {
openObject: null,
lastClientVersion: "",
authenticated: false,
apiUrl: "",
@@ -144,14 +143,6 @@ export default new Vuex.Store({
setHomePage(state, data) {
state.homePage = data;
},
setOpenObject(state, data) {
//data should be format for open-object-handler
// { type: [AYATYPE], id: [RECORDID] }
state.openObject = data;
},
clearOpenObject(state) {
state.openObject = null;
},
setDarkMode(state, data) {
state.darkMode = data;
},

View File

@@ -307,8 +307,8 @@ export default {
})();
}
if (vm.$store.state.openObject != null) {
window.$gz.eventBus.$emit("openobject", null);
if (vm.$route.params.topath != undefined) {
vm.$router.push(vm.$route.params.topath);
} else {
vm.$router.push(vm.$store.state.homePage);
}