This commit is contained in:
@@ -44,13 +44,16 @@ CURRENT TODOs
|
|||||||
|
|
||||||
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
@@@@@@@@@@@ ROADMAP STAGE 1 and 2:
|
||||||
|
|
||||||
|
|
||||||
todo: Make functional user settings form with all overrides so can test shit out
|
|
||||||
todo: Need a browser check on opening the login page that will check to ensure the browser can do the date conversions properly etc and tell user browser is unsuitable if it isn't
|
|
||||||
|
|
||||||
todo: Make sure fetching locale text is done properly in forms as in datalistview editor and widget etc
|
todo: Make sure fetching locale text is done properly in forms as in datalistview editor and widget etc
|
||||||
- for sure this needs to be fixed in about form
|
- for sure this needs to be fixed in about form
|
||||||
|
|
||||||
|
todo: Make functional user settings form with all overrides so can test shit out
|
||||||
|
|
||||||
|
todo: Need a browser check on opening the login page that will check to ensure the browser can do the date conversions properly etc and
|
||||||
|
tell user browser is unsuitable if it isn't
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
todo: toolbar above grid for filters, refresh etc (make it a standard component?)
|
todo: toolbar above grid for filters, refresh etc (make it a standard component?)
|
||||||
|
|||||||
@@ -128,6 +128,83 @@
|
|||||||
/* xeslint-disable */
|
/* xeslint-disable */
|
||||||
import ayaNovaVersion from "../api/ayanova-version";
|
import ayaNovaVersion from "../api/ayanova-version";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created() {
|
||||||
|
var vm = this;
|
||||||
|
|
||||||
|
initForm(vm)
|
||||||
|
.then(() => {
|
||||||
|
vm.formState.ready = true;
|
||||||
|
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||||
|
generateMenu(vm);
|
||||||
|
vm.formState.loading = false;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
vm.formState.ready = true;
|
||||||
|
window.$gz.errorHandler.handleFormError(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.clientInfo = {};
|
||||||
|
this.clientInfo = ayaNovaVersion;
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
serverInfo: { license: { license: {} } },
|
||||||
|
clientInfo: {},
|
||||||
|
browser: {},
|
||||||
|
formState: {
|
||||||
|
ready: false,
|
||||||
|
loading: true,
|
||||||
|
errorBoxMessage: null,
|
||||||
|
appError: null,
|
||||||
|
serverError: {}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
lt(ltKey) {
|
||||||
|
return window.$gz.locale.get(ltKey);
|
||||||
|
},
|
||||||
|
locale() {
|
||||||
|
return window.$gz.locale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function generateMenu(vm) {
|
||||||
|
var menuOptions = {
|
||||||
|
isMain: false,
|
||||||
|
icon: "fa-info-circle",
|
||||||
|
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
||||||
|
helpUrl: "form-ay-about",
|
||||||
|
menuItems: [
|
||||||
|
{
|
||||||
|
title: window.$gz.locale.get("Copy"),
|
||||||
|
icon: "copy",
|
||||||
|
surface: true,
|
||||||
|
key: "about:copysupportinfo",
|
||||||
|
vm: vm
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: window.$gz.locale.get("Log"),
|
||||||
|
icon: "glasses",
|
||||||
|
surface: true,
|
||||||
|
key: "app:nav:log",
|
||||||
|
data: "ay-log"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -160,11 +237,30 @@ function clickHandler(menuItem) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
/////////////////////////////////
|
||||||
beforeCreate() {
|
//
|
||||||
var vm = this;
|
//
|
||||||
window.$gz.locale
|
function initForm(vm) {
|
||||||
.fetch([
|
return new Promise(function(resolve, reject) {
|
||||||
|
(async function() {
|
||||||
|
try {
|
||||||
|
await fetchUILocalizedText(vm);
|
||||||
|
await getServerInfo(vm);
|
||||||
|
await getBrowserInfo(vm);
|
||||||
|
} catch (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
})();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Ensures UI localized text is available
|
||||||
|
//
|
||||||
|
function fetchUILocalizedText(vm) {
|
||||||
|
var ltKeysRequired = [
|
||||||
"HelpAboutAyaNova",
|
"HelpAboutAyaNova",
|
||||||
"ClientApp",
|
"ClientApp",
|
||||||
"Server",
|
"Server",
|
||||||
@@ -186,41 +282,27 @@ export default {
|
|||||||
"LanguageCode",
|
"LanguageCode",
|
||||||
"TimeZone",
|
"TimeZone",
|
||||||
"CurrencyCode"
|
"CurrencyCode"
|
||||||
])
|
];
|
||||||
.then(function() {
|
|
||||||
vm.formState.ready = true;
|
|
||||||
|
|
||||||
window.$gz.eventBus.$emit("menu-change", {
|
return window.$gz.locale.fetch(ltKeysRequired);
|
||||||
isMain: false,
|
}
|
||||||
icon: "fa-info-circle",
|
|
||||||
title: window.$gz.locale.get("HelpAboutAyaNova"),
|
////////////////////
|
||||||
helpUrl: "form-ay-about",
|
//
|
||||||
menuItems: [
|
function getServerInfo(vm) {
|
||||||
{
|
return window.$gz.api.get("ServerInfo").then(res => {
|
||||||
title: window.$gz.locale.get("Copy"),
|
if (res.error != undefined) {
|
||||||
icon: "copy",
|
throw res.error;
|
||||||
surface: true,
|
} else {
|
||||||
key: "about:copysupportinfo",
|
vm.serverInfo = res.data;
|
||||||
vm: vm
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: window.$gz.locale.get("Log"),
|
|
||||||
icon: "glasses",
|
|
||||||
surface: true,
|
|
||||||
key: "app:nav:log",
|
|
||||||
data: "ay-log"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
});
|
});
|
||||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
}
|
||||||
})
|
|
||||||
.catch(err => {
|
////////////////////
|
||||||
vm.formState.ready = true;
|
//
|
||||||
window.$gz.errorHandler.handleFormError(err);
|
function getBrowserInfo(vm) {
|
||||||
});
|
vm.browser = {
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.browser = {
|
|
||||||
platform: window.navigator.platform,
|
platform: window.navigator.platform,
|
||||||
userAgent: window.navigator.userAgent,
|
userAgent: window.navigator.userAgent,
|
||||||
languages: window.navigator.languages,
|
languages: window.navigator.languages,
|
||||||
@@ -236,42 +318,7 @@ export default {
|
|||||||
devicePixelRatio: window.devicePixelRatio,
|
devicePixelRatio: window.devicePixelRatio,
|
||||||
pixelDepth: window.screen.pixelDepth
|
pixelDepth: window.screen.pixelDepth
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
window.$gz.api
|
//eoc
|
||||||
.get("ServerInfo")
|
|
||||||
.then(response => {
|
|
||||||
this.serverInfo = response.data;
|
|
||||||
})
|
|
||||||
.catch(function handleGetServerInfoError(error) {
|
|
||||||
throw error;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
beforeDestroy() {},
|
|
||||||
mounted() {
|
|
||||||
this.clientInfo = {};
|
|
||||||
this.clientInfo = ayaNovaVersion;
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
serverInfo: { license: { license: {} } },
|
|
||||||
clientInfo: {},
|
|
||||||
browser: {},
|
|
||||||
formState: {
|
|
||||||
ready: false,
|
|
||||||
loading: true,
|
|
||||||
errorBoxMessage: null,
|
|
||||||
appError: null,
|
|
||||||
serverError: {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
lt(ltKey) {
|
|
||||||
return window.$gz.locale.get(ltKey);
|
|
||||||
},
|
|
||||||
locale() {
|
|
||||||
return window.$gz.locale;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user