This commit is contained in:
@@ -55,7 +55,7 @@ function handleError(action, error, route, reject) {
|
|||||||
"notify-warning",
|
"notify-warning",
|
||||||
window.$gz.locale.get("ErrorUserNotAuthorized")
|
window.$gz.locale.get("ErrorUserNotAuthorized")
|
||||||
);
|
);
|
||||||
router.push("/home-dashboard");
|
router.push(window.$gz.store.state.homePage);
|
||||||
return reject("[ErrorUserNotAuthorized]");
|
return reject("[ErrorUserNotAuthorized]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ export default function initialize() {
|
|||||||
key: key++
|
key: key++
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Set homePage in store to dashboard
|
||||||
|
window.$gz.store.commit("setHomePage", "/home-dashboard");
|
||||||
|
|
||||||
//SEARCH
|
//SEARCH
|
||||||
if (
|
if (
|
||||||
window.$gz.role.hasRole([
|
window.$gz.role.hasRole([
|
||||||
@@ -609,6 +612,12 @@ export default function initialize() {
|
|||||||
key: key++
|
key: key++
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Set home page if they don't already have the dashboard set above
|
||||||
|
if (!window.$gz.store.state.homePage) {
|
||||||
|
//Set homePage in store to Backup
|
||||||
|
window.$gz.store.commit("setHomePage", "/ops-BACKUP");
|
||||||
|
}
|
||||||
|
|
||||||
// JOBS
|
// JOBS
|
||||||
sub.push({
|
sub.push({
|
||||||
title: window.$gz.locale.get("ServerJobs"),
|
title: window.$gz.locale.get("ServerJobs"),
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export default new Vuex.Store({
|
|||||||
userId: 0,
|
userId: 0,
|
||||||
userName: "NOT AUTHENTICATED",
|
userName: "NOT AUTHENTICATED",
|
||||||
roles: 0,
|
roles: 0,
|
||||||
|
homePage: undefined,
|
||||||
localeText: {},
|
localeText: {},
|
||||||
locale: {
|
locale: {
|
||||||
decimalSeparator: ".",
|
decimalSeparator: ".",
|
||||||
@@ -47,6 +48,7 @@ export default new Vuex.Store({
|
|||||||
state.userId = 0;
|
state.userId = 0;
|
||||||
state.userName = "NOT AUTHENTICATED";
|
state.userName = "NOT AUTHENTICATED";
|
||||||
state.roles = 0;
|
state.roles = 0;
|
||||||
|
state.homePage = undefined;
|
||||||
state.navItems = [];
|
state.navItems = [];
|
||||||
state.localeText = {};
|
state.localeText = {};
|
||||||
state.formCustomTemplate = {};
|
state.formCustomTemplate = {};
|
||||||
@@ -102,6 +104,9 @@ export default new Vuex.Store({
|
|||||||
},
|
},
|
||||||
clearFormSettings(state, formKey) {
|
clearFormSettings(state, formKey) {
|
||||||
delete state.formSettings[formKey];
|
delete state.formSettings[formKey];
|
||||||
|
},
|
||||||
|
setHomePage(state, data) {
|
||||||
|
state.homePage = data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {}
|
actions: {}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export default {
|
|||||||
auth
|
auth
|
||||||
.authenticate(this.input.username, this.input.password)
|
.authenticate(this.input.username, this.input.password)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
vm.$router.push("/home-dashboard");
|
vm.$router.push(vm.$store.state.homePage);
|
||||||
})
|
})
|
||||||
.catch(function handleCaughtLoginError(error) {
|
.catch(function handleCaughtLoginError(error) {
|
||||||
/* xeslint-disable-next-line */
|
/* xeslint-disable-next-line */
|
||||||
|
|||||||
Reference in New Issue
Block a user