HUGE REFACTOR / CLEANUP

if there is a issue it's probably something in here that was changed
This commit is contained in:
2021-09-28 20:19:44 +00:00
parent 51eddfede9
commit d0afdd9855
238 changed files with 3127 additions and 8614 deletions

View File

@@ -127,14 +127,11 @@
</v-col>
</v-row>
</template>
<script>
/* xeslint-disable */
import ayaNovaVersion from "../api/ayanova-version";
export default {
async created() {
let vm = this;
const vm = this;
try {
await initForm(vm);
vm.formState.ready = true;
@@ -175,12 +172,6 @@ export default {
return window.$gz.locale;
},
canViewLicenseInfo() {
/*
Service = 1,
NotService = 2,
Customer = 3,
HeadOffice = 4,
ServiceContractor = 5 */
return (
window.$gz.store.state.userType == 1 ||
window.$gz.store.state.userType == 2
@@ -193,7 +184,7 @@ export default {
//
//
function generateMenu(vm) {
let menuOptions = {
const menuOptions = {
isMain: false,
icon: "$ayiInfoCircle",
title: "HelpAboutAyaNova",
@@ -231,28 +222,19 @@ function clickHandler(menuItem) {
if (!menuItem) {
return;
}
let m = window.$gz.menu.parseMenuItem(menuItem);
const m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == "about" && !m.disabled) {
switch (m.key) {
case "contact":
break;
case "copysupportinfo":
//put the support info on the clipboard:
let element = document.getElementById("ayaNovaVersioncard");
let text = element.innerText || element.textContent;
const element = document.getElementById("ayaNovaVersioncard");
const text = element.innerText || element.textContent;
let logText = "";
//de-lodash
// window.$gz. _.forEach(m.vm.$store.state.logArray, function appendLogItem(
// value
// ) {
// logText += value + "\n";
// });
m.vm.$store.state.logArray.forEach(function appendLogItem(value) {
logText += value + "\n";
});
window.$gz.util.copyToClipboard(text + "\nCLIENT LOG\n" + logText);
break;
default:
@@ -270,7 +252,7 @@ function clickHandler(menuItem) {
async function initForm(vm) {
await fetchTranslatedText(vm);
await getServerInfo(vm);
await getBrowserInfo(vm);
getBrowserInfo(vm);
}
//////////////////////////////////////////////////////////
@@ -305,8 +287,7 @@ async function fetchTranslatedText(vm) {
////////////////////
//
async function getServerInfo(vm) {
let res = await window.$gz.api.get("server-info");
//We never expect there to be no data here
const res = await window.$gz.api.get("server-info");
if (!res.hasOwnProperty("data")) {
return Promise.reject(res);
} else {