This commit is contained in:
2019-12-18 22:39:18 +00:00
parent 607207dce4
commit 3e7b927118
8 changed files with 19 additions and 42 deletions

View File

@@ -263,7 +263,7 @@ export default {
//redirect to login if not authenticated
if (!this.$store.state.authenticated) {
this.$router.push({ name: "login" });
this.$router.push("\login");
}
//FUTURE: If need to detect a reload, this works reliably

View File

@@ -31,6 +31,7 @@ function dealWithError(msg, vm) {
msg;
// eslint-disable-next-line no-console
console.log(errMsg);
debugger;
window.$gz.eventBus.$emit("notify-error", "Dev error see log / console");
}

View File

@@ -55,7 +55,7 @@ function handleError(action, error, route, reject) {
"notify-warning",
window.$gz.locale.get("ErrorUserNotAuthorized")
);
router.push("/");
router.push("/dashboard");
return reject("[ErrorUserNotAuthorized]");
}

View File

@@ -147,7 +147,7 @@ export default {
window.open(helpurl, "_blank");
break;
case "logout":
vm.$router.push({ name: "login" });
vm.$router.push("/login");
break;
case "customize":
vm.$router.push({

View File

@@ -254,6 +254,15 @@ export default new Router({
import(/* webpackChunkName: "test" */ "./views/test-inventory.vue")
},
{
path: "/inventory/widget/edit/:id",
name: "inventory-widget-edit",
component: () =>
import(
/* webpackChunkName: "inventory" */ "./views/test-inventory-widget-edit.vue"
)
},
{
path: "/vendors",
name: "vendors",
@@ -314,7 +323,7 @@ export default new Router({
path: "/history",
name: "history",
component: () =>
import(/* webpackChunkName: "administration" */ "./views/files.vue")
import(/* webpackChunkName: "administration" */ "./views/history.vue")
},
{
@@ -360,7 +369,7 @@ export default new Router({
/* webpackChunkName: "operations" */ "./views/notify-settings.vue"
)
},
//**********************************OLD OLD OLD RENAME AND REMOVE */
//**********************************GENERAL */
{
path: "/about",
name: "about",
@@ -376,41 +385,6 @@ export default new Router({
component: () =>
import(/* webpackChunkName: "aybase" */ "./views/log.vue")
},
{
path: "/inventory/widget/edit/:id",
name: "inventory-widget-edit",
component: () =>
import(
/* webpackChunkName: "inventory" */ "./views/inventory-widget-edit.vue"
)
},
{
path: "/service",
name: "service",
component: service
},
{
path: "/dispatch",
name: "dispatch",
component: dispatch
},
{
path: "/accounting",
name: "accounting",
//meta: { scrollToTop: true },
component: accounting
},
{
path: "/admin",
name: "administration",
component: administration
},
{
path: "/ops",
name: "operations",
component: operations
},
{
path: "/customize/:formCustomTemplateKey",
name: "customize",
@@ -420,7 +394,8 @@ export default new Router({
{
path: "*",
name: "notfound",
component: notfound
component: () =>
import(/* webpackChunkName: "aybase" */ "./views/notfound.vue")
}
]
});

View File

@@ -93,7 +93,7 @@ export default {
auth
.authenticate(this.input.username, this.input.password)
.then(() => {
vm.$router.push({ name: "home" });
vm.$router.push("/dashboard");
})
.catch(function handleCaughtLoginError(error) {
/* xeslint-disable-next-line */

View File

@@ -16,6 +16,7 @@
<script>
export default {
beforeCreate() {
debugger;
window.$gz.eventBus.$emit("menu-change", {
isMain: true,
icon: "fa-dragon",