From 18f9f4e8700ab8b4a235863b92ca7180c5658a64 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 19 Jul 2019 15:47:49 +0000 Subject: [PATCH] --- ayanova/src/main.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/ayanova/src/main.js b/ayanova/src/main.js index b4e93d26..a9ff7f35 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -34,14 +34,31 @@ import "@/assets/css/main.css"; import dateTimeControl from "./components/date-time-control.vue"; import tagPicker from "./components/tag-picker.vue"; import customFieldsControl from "./components/custom-fields-control.vue"; +import errorhandler from "./api/errorhandler"; ///////////////////////////////////////////////////////////////// // LIBS AND GLOBAL ITEMS // (https://medium.com/js-dojo/use-any-javascript-library-with-vue-js-3f7e2a4974a8) // -todo: move all this shit to Window.$gz as subkeys on it and then modify all the caller code that used to use vm vue property version -//then modify the inventory-widget-edit form initialization shit so that the stuff needed after form loads still happens but the before is moved to route before enter and that it's all called +//todo: move all this shit to Window.$gz as subkeys on it and then modify all the caller code that used to use vm vue property version +//then modify the inventory-widget-edit form initialization shit so that the stuff needed after form loads still happens but the before is moved to route before enter and that it's all called //with two separate methods: One standard one for init form before it is loaded and one for init form stuff for after it's loaded. BeforeLoadInit, AfterLoadInit or something +window.$gz = { + locale: locale, + formCustomTemplate: gzformcustomtemplate, + type: gztype, + role: roles, + eventbus: gzeventbus, + menu: gzmenu, + dialog: gzdialog, + util: gzutil, + dayjs: dayjs, + _: lodash, + api: gzapi, + form: gzform, + report: gzreport, + errorHandler: errorhandler +}; window.$gzlocale = locale; window.$gzformcustomtemplate = gzformcustomtemplate; Object.defineProperty(Vue.prototype, "$gztype", { value: gztype });