From 43de3c8fb02bf97e267524d6233479f85f214566 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 4 Apr 2020 17:06:25 +0000 Subject: [PATCH] moved t function to global and misc cleanup --- ayanova/devdocs/todo.txt | 2 + ayanova/src/components/currency-control.vue | 3 - .../src/components/custom-fields-control.vue | 80 +++++--- ayanova/src/components/date-control.vue | 7 +- ayanova/src/components/date-time-control.vue | 9 +- ayanova/src/components/decimal-control.vue | 3 - ayanova/src/components/gz-data-table.vue | 25 +-- ayanova/src/components/pick-list.vue | 22 +- ayanova/src/components/tag-picker.vue | 20 +- ayanova/src/components/time-control.vue | 7 +- ayanova/src/main.js | 3 +- .../src/views/adm-global-select-templates.vue | 11 +- ayanova/src/views/adm-global-settings.vue | 9 +- ayanova/src/views/ay-about.vue | 43 ++-- ayanova/src/views/ay-customize.vue | 25 +-- ayanova/src/views/ay-data-list-view.vue | 191 +++++++++--------- ayanova/src/views/home-dashboard.vue | 7 +- ayanova/src/views/home-password.vue | 11 +- ayanova/src/views/home-user-settings.vue | 22 +- ayanova/src/views/widget.vue | 28 +-- 20 files changed, 242 insertions(+), 286 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index c6037866..225e2453 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -52,6 +52,8 @@ 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 + - search and change this: if (window.$gz.errorHandler.devMode()) { if possible + - search change this: this.$root.$gz.translation.get("More") // if possible, also is it really needed to be on that root thing anyway now that I know how to do global 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/components/currency-control.vue b/ayanova/src/components/currency-control.vue index fbbd9c70..6dbcfb52 100644 --- a/ayanova/src/components/currency-control.vue +++ b/ayanova/src/components/currency-control.vue @@ -47,9 +47,6 @@ export default { } }, methods: { - translation() { - return window.$gz.translation; - }, handleInput(value) { let ret = parseCurrency(value, { currency: this.currencyName, diff --git a/ayanova/src/components/custom-fields-control.vue b/ayanova/src/components/custom-fields-control.vue index 2b94d76e..94fd6593 100644 --- a/ayanova/src/components/custom-fields-control.vue +++ b/ayanova/src/components/custom-fields-control.vue @@ -1,7 +1,7 @@