diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index 40f765b1..b3f1d270 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -246,7 +246,7 @@ export default { }, created() { //Detect version change, wipe persisted form settings if has changed - var currentVersion = window.$gz.clientInfo.version; + let currentVersion = window.$gz.clientInfo.version; if (currentVersion != window.$gz.store.state.lastClientVersion) { window.$gz.store.commit( "logItem", diff --git a/ayanova/src/main.js b/ayanova/src/main.js index f7872719..d31d4c32 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -48,7 +48,7 @@ import errorhandler from "./api/errorhandler"; // some say this is bad only due to if you want to server render the page // (which is not necessary here anyway) // however when I researched that I found it's easily worked around -// as all you need is a "window" global var defined and then it's all good in the hood +// as all you need is a "window" global let defined and then it's all good in the hood // so for convenience and far less fuckery this is the way // @@ -100,24 +100,24 @@ Vue.config.productionTip = false; // AJAX LOADER INDICATOR // // Store a copy of the fetch function -var _oldFetch = fetch; +let _oldFetch = fetch; // Create our new version of the fetch function window.fetch = function() { // Create hooks - var fetchStart = new Event("fetchStart", { + let fetchStart = new Event("fetchStart", { view: document, bubbles: true, cancelable: false }); - var fetchEnd = new Event("fetchEnd", { + let fetchEnd = new Event("fetchEnd", { view: document, bubbles: true, cancelable: false }); // Pass the supplied arguments to the real fetch function - var fetchCall = _oldFetch.apply(this, arguments); + let fetchCall = _oldFetch.apply(this, arguments); // Trigger the fetchStart event document.dispatchEvent(fetchStart); diff --git a/ayanova/src/views/ay-log.vue b/ayanova/src/views/ay-log.vue index cf6c9547..849298f1 100644 --- a/ayanova/src/views/ay-log.vue +++ b/ayanova/src/views/ay-log.vue @@ -22,7 +22,7 @@ /* Xeslint-disable */ export default { created() { - var vm = this; + let vm = this; window.$gz.eventBus.$emit("menu-change", { isMain: false, icon: "fa-info-circle", @@ -32,7 +32,7 @@ export default { menuItems: [] }); - var outText = ""; + let outText = ""; window.$gz._.forEach(vm.$store.state.logArray, function appendLogItem( value ) { diff --git a/ayanova/src/views/home-password.vue b/ayanova/src/views/home-password.vue index d5f48afb..09bc49c5 100644 --- a/ayanova/src/views/home-password.vue +++ b/ayanova/src/views/home-password.vue @@ -106,7 +106,7 @@ const API_BASE_URL = "Auth/ChangePassword"; export default { created() { - var vm = this; + let vm = this; initForm(vm) .then(() => { vm.rights = window.$gz.role.fullRightsObject(); @@ -175,7 +175,7 @@ export default { } //enable / disable save button - var canSave = val.dirty && val.valid && !val.readOnly; + let canSave = val.dirty && val.valid && !val.readOnly; if (canSave) { window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save"); } else { @@ -207,12 +207,12 @@ export default { }, submit() { - var vm = this; + let vm = this; if (vm.canSave) { vm.formState.loading = true; //always submit from this form for the current logged in user id - var url = API_BASE_URL; + let url = API_BASE_URL; //clear any errors vm might be around from previous submit window.$gz.form.deleteAllErrorBoxErrors(vm); @@ -247,7 +247,7 @@ function clickHandler(menuItem) { if (!menuItem) { return; } - var m = window.$gz.menu.parseMenuItem(menuItem); + let m = window.$gz.menu.parseMenuItem(menuItem); if (m.owner == FORM_KEY && !m.disabled) { switch (m.key) { case "save": @@ -267,7 +267,7 @@ function clickHandler(menuItem) { // // function generateMenu(vm) { - var menuOptions = { + let menuOptions = { isMain: true, icon: "fa-key", title: window.$gz.translation.get("SetLoginPassword"), diff --git a/ayanova/src/views/home-user-settings.vue b/ayanova/src/views/home-user-settings.vue index 60c6e527..7ddbed36 100644 --- a/ayanova/src/views/home-user-settings.vue +++ b/ayanova/src/views/home-user-settings.vue @@ -129,7 +129,7 @@ const FORM_CUSTOM_TEMPLATE_KEY = "Useroptions"; export default { created() { - var vm = this; + let vm = this; initForm(vm) .then(() => { vm.rights = window.$gz.role.getRights(window.$gz.type.UserOptions); @@ -215,7 +215,7 @@ export default { } //enable / disable save button - var canSave = val.dirty && val.valid && !val.readOnly; + let canSave = val.dirty && val.valid && !val.readOnly; if (canSave) { window.$gz.eventBus.$emit("menu-enable-item", FORM_KEY + ":save"); } else { @@ -249,10 +249,10 @@ export default { } }, getDataFromApi() { - var vm = this; + let vm = this; vm.formState.loading = true; //always fetch on this form for the current logged in user id - var url = API_BASE_URL + vm.$store.state.userId; + let url = API_BASE_URL + vm.$store.state.userId; window.$gz.form.deleteAllErrorBoxErrors(vm); @@ -296,12 +296,12 @@ export default { }); }, submit() { - var vm = this; + let vm = this; if (vm.canSave) { vm.formState.loading = true; //always submit from this form for the current logged in user id - var url = API_BASE_URL + vm.$store.state.userId; + let url = API_BASE_URL + vm.$store.state.userId; //clear any errors vm might be around from previous submit window.$gz.form.deleteAllErrorBoxErrors(vm); @@ -323,7 +323,7 @@ export default { }); //Set values in store so they are updated immediately for user - var l = vm.$store.state.locale; + let l = vm.$store.state.locale; if (vm.obj.languageOverride) { l.languageOverride = vm.obj.languageOverride; @@ -360,7 +360,7 @@ function clickHandler(menuItem) { if (!menuItem) { return; } - var m = window.$gz.menu.parseMenuItem(menuItem); + let m = window.$gz.menu.parseMenuItem(menuItem); if (m.owner == FORM_KEY && !m.disabled) { switch (m.key) { case "save": @@ -380,7 +380,7 @@ function clickHandler(menuItem) { // // function generateMenu(vm) { - var menuOptions = { + let menuOptions = { isMain: true, icon: "fa-user-cog", title: window.$gz.translation.get("UserSettings"), diff --git a/ayanova/src/views/login.vue b/ayanova/src/views/login.vue index 82ac95bf..047ffc9f 100644 --- a/ayanova/src/views/login.vue +++ b/ayanova/src/views/login.vue @@ -88,7 +88,7 @@ export default { login() { if (this.input.username != "" && this.input.password != "") { this.errorBadCreds = false; - var vm = this; + let vm = this; auth .authenticate(this.input.username, this.input.password) diff --git a/ayanova/src/views/notfound.vue b/ayanova/src/views/notfound.vue index 4c3d2f92..36e90e66 100644 --- a/ayanova/src/views/notfound.vue +++ b/ayanova/src/views/notfound.vue @@ -22,7 +22,7 @@ export default { }, created() { // debugger; - var badPath = this.$router.history.current.path; + let badPath = this.$router.history.current.path; //If this happens too early then it might not have all the setup stuf available which would trigger an infinite loop if ( !window || @@ -33,7 +33,7 @@ export default { ) { this.msg = '404 - NOT FOUND: "' + badPath + '"'; } else { - var notFoundTranslated = window.$gz.translation.get("ErrorAPI2010"); + let notFoundTranslated = window.$gz.translation.get("ErrorAPI2010"); //format the message this.msg = "404 - " + notFoundTranslated + ': "' + badPath + '"'; //log it in case we need to see it in tech support diff --git a/ayanova/src/views/widgets.vue b/ayanova/src/views/widgets.vue index 87910267..d6323009 100644 --- a/ayanova/src/views/widgets.vue +++ b/ayanova/src/views/widgets.vue @@ -49,7 +49,7 @@ function clickHandler(menuItem) { if (!menuItem) { return; } - var m = window.$gz.menu.parseMenuItem(menuItem); + let m = window.$gz.menu.parseMenuItem(menuItem); if (m.owner == FORM_KEY && !m.disabled) { switch (m.key) { case "new": @@ -71,7 +71,7 @@ function clickHandler(menuItem) { // // function generateMenu(vm) { - var menuOptions = { + let menuOptions = { isMain: true, icon: "fa-vial", title: window.$gz.translation.get("WidgetList"),