From 47333730391b76715073dbc8e2f95a01fd2f8a20 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 4 Apr 2020 14:44:10 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 ++++ ayanova/src/main.js | 10 +++++++++- ayanova/src/views/ay-customize.vue | 2 +- ayanova/src/views/login.vue | 6 +++++- ayanova/tests/e2e/specs/gz-data-table.js | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index ad9d8fa4..c6037866 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -48,6 +48,10 @@ CURRENT TODOs =-=-=-=-=-=-= @@@@@@@@@@@ ROADMAP STAGE 2: +todo: global vue + - find all stuff defined in vue data objects as methods solely for the consumption of the template like translation (t()) and move to global vue object in main + - stuff not needed by templates should stay where it is in window + - Lodash might be an exception todo: change all testing data-cy attributes to conditional see ay-customize for example - :data-cy="!!enableCypress ? item.key : false" diff --git a/ayanova/src/main.js b/ayanova/src/main.js index d31d4c32..b35e6241 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -179,12 +179,20 @@ Vue.directive("focus", { } }); + ///////////////////////////////////////////////////////////////// // INSTANTIATE // +Vue.prototype.$ay = { + //development mode, this enables data-cy tags for testing, development level error messages etc + dev: true, + t: function(tKey) { + return translation.get(tKey); + } +}; new Vue({ vuetify: Vuetify, router, store, - render: h => h(App) + render: (h) => h(App) }).$mount("#app"); diff --git a/ayanova/src/views/ay-customize.vue b/ayanova/src/views/ay-customize.vue index 69a50150..8f2ec972 100644 --- a/ayanova/src/views/ay-customize.vue +++ b/ayanova/src/views/ay-customize.vue @@ -19,7 +19,7 @@