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 //redirect to login if not authenticated
if (!this.$store.state.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 //FUTURE: If need to detect a reload, this works reliably

View File

@@ -31,6 +31,7 @@ function dealWithError(msg, vm) {
msg; msg;
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(errMsg); console.log(errMsg);
debugger;
window.$gz.eventBus.$emit("notify-error", "Dev error see log / console"); 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", "notify-warning",
window.$gz.locale.get("ErrorUserNotAuthorized") window.$gz.locale.get("ErrorUserNotAuthorized")
); );
router.push("/"); router.push("/dashboard");
return reject("[ErrorUserNotAuthorized]"); return reject("[ErrorUserNotAuthorized]");
} }

View File

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

View File

@@ -254,6 +254,15 @@ export default new Router({
import(/* webpackChunkName: "test" */ "./views/test-inventory.vue") 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", path: "/vendors",
name: "vendors", name: "vendors",
@@ -314,7 +323,7 @@ export default new Router({
path: "/history", path: "/history",
name: "history", name: "history",
component: () => 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" /* webpackChunkName: "operations" */ "./views/notify-settings.vue"
) )
}, },
//**********************************OLD OLD OLD RENAME AND REMOVE */ //**********************************GENERAL */
{ {
path: "/about", path: "/about",
name: "about", name: "about",
@@ -376,41 +385,6 @@ export default new Router({
component: () => component: () =>
import(/* webpackChunkName: "aybase" */ "./views/log.vue") 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", path: "/customize/:formCustomTemplateKey",
name: "customize", name: "customize",
@@ -420,7 +394,8 @@ export default new Router({
{ {
path: "*", path: "*",
name: "notfound", name: "notfound",
component: notfound component: () =>
import(/* webpackChunkName: "aybase" */ "./views/notfound.vue")
} }
] ]
}); });

View File

@@ -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({ name: "home" }); vm.$router.push("/dashboard");
}) })
.catch(function handleCaughtLoginError(error) { .catch(function handleCaughtLoginError(error) {
/* xeslint-disable-next-line */ /* xeslint-disable-next-line */

View File

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