This commit is contained in:
2020-09-14 16:17:39 +00:00
parent ad7c7052e3
commit 36e5e974ec

View File

@@ -106,7 +106,7 @@ export default {
return { return {
input: { input: {
username: "superuser", username: "superuser",
password: "l3tm3in", password: "l3tm3in"
}, },
hasSmallLogo: false, hasSmallLogo: false,
hasMediumLogo: false, hasMediumLogo: false,
@@ -123,115 +123,115 @@ export default {
{ {
name: "AyaNova SuperUser - all", name: "AyaNova SuperUser - all",
l: "superuser", l: "superuser",
p: "l3tm3in", p: "l3tm3in"
}, },
{ {
name: "Accounting", name: "Accounting",
l: "Accounting", l: "Accounting",
p: "Accounting", p: "Accounting"
}, },
{ {
name: "Business admin", name: "Business admin",
l: "BizAdminFull", l: "BizAdminFull",
p: "BizAdminFull", p: "BizAdminFull"
}, },
{ {
name: "Business admin - limited", name: "Business admin - limited",
l: "BizAdminLimited", l: "BizAdminLimited",
p: "BizAdminLimited", p: "BizAdminLimited"
}, },
{ {
name: "Customer", name: "Customer",
l: "CustomerFull", l: "CustomerFull",
p: "CustomerFull", p: "CustomerFull"
}, },
{ {
name: "Customer - limited", name: "Customer - limited",
l: "CustomerLimited", l: "CustomerLimited",
p: "CustomerLimited", p: "CustomerLimited"
}, },
{ {
name: "Dispatcher", name: "Dispatcher",
l: "DispatchFull", l: "DispatchFull",
p: "DispatchFull", p: "DispatchFull"
}, },
{ {
name: "Dispatcher - limited", name: "Dispatcher - limited",
l: "DispatchLimited", l: "DispatchLimited",
p: "DispatchLimited", p: "DispatchLimited"
}, },
{ {
name: "Head office", name: "Head office",
l: "HeadOffice", l: "HeadOffice",
p: "HeadOffice", p: "HeadOffice"
}, },
{ {
name: "Inventory", name: "Inventory",
l: "InventoryFull", l: "InventoryFull",
p: "InventoryFull", p: "InventoryFull"
}, },
{ {
name: "Inventory - limited", name: "Inventory - limited",
l: "InventoryLimited", l: "InventoryLimited",
p: "InventoryLimited", p: "InventoryLimited"
}, },
{ {
name: "Operations", name: "Operations",
l: "OpsAdminFull", l: "OpsAdminFull",
p: "OpsAdminFull", p: "OpsAdminFull"
}, },
{ {
name: "Operations - limited", name: "Operations - limited",
l: "OpsAdminLimited", l: "OpsAdminLimited",
p: "OpsAdminLimited", p: "OpsAdminLimited"
}, },
{ {
name: "Sales", name: "Sales",
l: "SalesFull", l: "SalesFull",
p: "SalesFull", p: "SalesFull"
}, },
{ {
name: "Sales - limited", name: "Sales - limited",
l: "SalesLimited", l: "SalesLimited",
p: "SalesLimited", p: "SalesLimited"
}, },
{ {
name: "Subcontractor", name: "Subcontractor",
l: "SubContractorFull", l: "SubContractorFull",
p: "SubContractorFull", p: "SubContractorFull"
}, },
{ {
name: "Subcontractor - limited", name: "Subcontractor - limited",
l: "SubContractorLimited", l: "SubContractorLimited",
p: "SubContractorLimited", p: "SubContractorLimited"
}, },
{ {
name: "Technician", name: "Technician",
l: "TechFull", l: "TechFull",
p: "TechFull", p: "TechFull"
}, },
{ {
name: "Technician - limited", name: "Technician - limited",
l: "TechLimited", l: "TechLimited",
p: "TechLimited", p: "TechLimited"
}, },
{ {
name: "Translation - Deutsch / German", name: "Translation - Deutsch / German",
l: "de", l: "de",
p: "de", p: "de"
}, },
{ {
name: "Translation - Español / Spanish", name: "Translation - Español / Spanish",
l: "es", l: "es",
p: "es", p: "es"
}, },
{ {
name: "Translation - Français / French", name: "Translation - Français / French",
l: "fr", l: "fr",
p: "fr", p: "fr"
}, }
], ]
}, }
}; };
}, },
async created() { async created() {
@@ -260,7 +260,7 @@ export default {
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$emit("menu-change", {
isMain: true, isMain: true,
icon: "", icon: "",
title: "", title: ""
}); });
try { try {
let res = await window.$gz.api.get("notify/hello"); let res = await window.$gz.api.get("notify/hello");
@@ -280,14 +280,14 @@ export default {
this.input.password = item.p; this.input.password = item.p;
this.input.username = item.l; this.input.username = item.l;
}, },
trialHelpClick: function () { trialHelpClick: function() {
//open help nav for trial login //open help nav for trial login
window.$gz.eventBus.$emit("menu-click", { window.$gz.eventBus.$emit("menu-click", {
key: "app:help", key: "app:help",
data: "ay-start-trial-login", data: "ay-start-trial-login"
}); });
}, },
onEnterUserName: function () { onEnterUserName: function() {
//move focus to password //move focus to password
document.getElementsByName("password")[0].focus(); document.getElementsByName("password")[0].focus();
}, },
@@ -303,7 +303,7 @@ export default {
"auth", "auth",
{ {
login: vm.input.username, login: vm.input.username,
password: vm.input.password, password: vm.input.password
}, },
true true
); );
@@ -320,7 +320,7 @@ export default {
(vm.$store.state.globalSettings.licenseStatus == 3 || (vm.$store.state.globalSettings.licenseStatus == 3 ||
vm.$store.state.globalSettings.licenseStatus == 4) vm.$store.state.globalSettings.licenseStatus == 4)
) { ) {
(async function () { (async function() {
await window.$gz.dialog.displayLTModalNotificationMessage( await window.$gz.dialog.displayLTModalNotificationMessage(
"MaintenanceExpiredNote", "MaintenanceExpiredNote",
"MaintenanceExpired", "MaintenanceExpired",
@@ -337,10 +337,10 @@ export default {
if (toPath.startsWith("/viewreport")) { if (toPath.startsWith("/viewreport")) {
alert("stub: open report"); alert("stub: open report");
vm.$router.push(vm.$store.state.homePage); vm.$router.push(vm.$store.state.homePage);
} else {
//otherwise open the url indicated
vm.$router.push(vm.$route.params.topath);
} }
//otherwise open the url indicated
vm.$router.push(vm.$route.params.topath);
} else { } else {
vm.$router.push(vm.$store.state.homePage); vm.$router.push(vm.$store.state.homePage);
} }
@@ -376,7 +376,7 @@ export default {
} }
} }
} }
}, }
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
//very important as this in conjunction with the menu options means //very important as this in conjunction with the menu options means
@@ -386,6 +386,6 @@ export default {
processLogout(); processLogout();
next(); next();
}); });
}, }
}; };
</script> </script>