From 604fe1dd72d145b381a7fbc53f26ce00dc4bb666 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 24 Jul 2019 14:55:13 +0000 Subject: [PATCH] --- ayanova/src/api/auth.js | 10 +++++----- ayanova/src/api/authorizationroles.js | 4 ++-- ayanova/src/main.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ayanova/src/api/auth.js b/ayanova/src/api/auth.js index 028fca4c..888635af 100644 --- a/ayanova/src/api/auth.js +++ b/ayanova/src/api/auth.js @@ -1,18 +1,18 @@ /* Xeslint-disable */ -import gzapi from "./gzapi"; + import { processLogin, processLogout } from "./authutil"; export default { async authenticate(login, password) { return fetch( - gzapi.APIUrl("auth"), - gzapi.fetchPostNoAuthOptions({ + window.$gz.api.APIUrl("auth"), + window.$gz.api.fetchPostNoAuthOptions({ login: login, password: password }) ) - .then(gzapi.status) - .then(gzapi.json) + .then(window.$gz.api.status) + .then(window.$gz.api.json) .then(processLogin) .then(() => { return Promise.resolve(true); diff --git a/ayanova/src/api/authorizationroles.js b/ayanova/src/api/authorizationroles.js index 68eb0251..fac2378e 100644 --- a/ayanova/src/api/authorizationroles.js +++ b/ayanova/src/api/authorizationroles.js @@ -1,5 +1,5 @@ /* xeslint-disable */ -import _ from "../libs/lodash.min.js"; + import store from "../store"; import rights from "./bizroles"; @@ -72,7 +72,7 @@ export default { var ret = this.defaultRightsObject(); //Get the type name from the type enum value - var typeName = _.findKey(window.$gz.type, function(o) { + var typeName = window.$gz._.findKey(window.$gz.type, function(o) { return o == oType; }); diff --git a/ayanova/src/main.js b/ayanova/src/main.js index 29c8efd5..ceaf036a 100644 --- a/ayanova/src/main.js +++ b/ayanova/src/main.js @@ -40,7 +40,7 @@ import errorhandler from "./api/errorhandler"; // LIBS AND GLOBAL ITEMS // (https://medium.com/js-dojo/use-any-javascript-library-with-vue-js-3f7e2a4974a8) // -todo: Now that all is in Window.$gz Look for unnecessary local imports of global libs (search for import and see what comes up) +//todo: Now that all is in Window.$gz Look for unnecessary local imports of global libs (search for import and see what comes up) //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 = {