This commit is contained in:
@@ -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
|
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)
|
(like capture the requested url and if found after login go to it)
|
||||||
|
|||||||
@@ -324,33 +324,15 @@ export default {
|
|||||||
//this smells bad but it works
|
//this smells bad but it works
|
||||||
vm.$root.$gz = window.$gz;
|
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
|
//redirect to login if not authenticated
|
||||||
if (!vm.$store.state.authenticated) {
|
if (!vm.$store.state.authenticated) {
|
||||||
vm.$router.push("login");
|
//If a direct open path was being used but user is not logged in this will catch it
|
||||||
} else {
|
//otherwise they will just go on to that path directly
|
||||||
//this can be safely called any time, it checks if there is an open object in store and
|
vm.$router.push({
|
||||||
//opens it or if not just returns
|
name: "login",
|
||||||
// window.$gz.eventBus.$emit("openobject", null);
|
params: { topath: window.location.pathname }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//RELOAD / REFRESH HANDLING
|
//RELOAD / REFRESH HANDLING
|
||||||
//Restart notification polling due to refresh?
|
//Restart notification polling due to refresh?
|
||||||
if (window.$gz.store.state.authenticated) {
|
if (window.$gz.store.state.authenticated) {
|
||||||
|
|||||||
@@ -8,25 +8,6 @@ export default {
|
|||||||
// called from App.vue
|
// called from App.vue
|
||||||
handleOpenObjectClick(vm, tid) {
|
handleOpenObjectClick(vm, tid) {
|
||||||
//expects extra data (tid) to be one of { type: [AYATYPE], id: [RECORDID] }
|
//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
|
//NOTE: for new objects all edit pages assume record ID 0 means create rather than open
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ if (window.location.search) {
|
|||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
plugins: [createPersistedState({ key: "AyaNova" })],
|
plugins: [createPersistedState({ key: "AyaNova" })],
|
||||||
state: {
|
state: {
|
||||||
openObject: null,
|
|
||||||
lastClientVersion: "",
|
lastClientVersion: "",
|
||||||
authenticated: false,
|
authenticated: false,
|
||||||
apiUrl: "",
|
apiUrl: "",
|
||||||
@@ -144,14 +143,6 @@ export default new Vuex.Store({
|
|||||||
setHomePage(state, data) {
|
setHomePage(state, data) {
|
||||||
state.homePage = 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) {
|
setDarkMode(state, data) {
|
||||||
state.darkMode = data;
|
state.darkMode = data;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -307,8 +307,8 @@ export default {
|
|||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.$store.state.openObject != null) {
|
if (vm.$route.params.topath != undefined) {
|
||||||
window.$gz.eventBus.$emit("openobject", null);
|
vm.$router.push(vm.$route.params.topath);
|
||||||
} else {
|
} else {
|
||||||
vm.$router.push(vm.$store.state.homePage);
|
vm.$router.push(vm.$store.state.homePage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user