This commit is contained in:
2019-04-29 23:05:52 +00:00
parent 6ffbbc11de
commit 88776817cb
6 changed files with 2 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
export default { export default {
version: "8.0.0-alpha.3", version: "8.0.0-alpha.4",
copyright: copyright:
"Copyright © 1999-2019, Ground Zero Tech-Works Inc. All Rights Reserved" "Copyright © 1999-2019, Ground Zero Tech-Works Inc. All Rights Reserved"
}; };

View File

@@ -13,17 +13,7 @@ export default {
) )
.then(apiUtil.status) .then(apiUtil.status)
.then(apiUtil.json) .then(apiUtil.json)
.then(result => {
/* eslint-disable-next-line */
console.log("auth.js about to process login...");
return result;
})
.then(processLogin) .then(processLogin)
.then(result => {
/* eslint-disable-next-line */
console.log("auth.js returned from process login, resolving next");
return result;
})
.then(() => { .then(() => {
return Promise.resolve(true); return Promise.resolve(true);
}) //succeeded, nothing to return }) //succeeded, nothing to return

View File

@@ -43,9 +43,6 @@ export function processLogin(response) {
roles: token["ayanova/roles"] roles: token["ayanova/roles"]
}); });
/* eslint-disable-next-line */
console.log("STEP 2 - PROCESS LOGIN - CALLING INITIALIZE");
//Initialize the application //Initialize the application
initialize().then(() => { initialize().then(() => {
store.commit( store.commit(

View File

@@ -17,17 +17,11 @@ function addNavItem(title, icon, route) {
// on change of authentication status // on change of authentication status
export default function initialize() { export default function initialize() {
var promise = new Promise(function(resolve) { var promise = new Promise(function(resolve) {
/* eslint-disable-next-line */
console.log("STEP 3 - INITIALIZE TOP");
if (store.state.authenticated) { if (store.state.authenticated) {
/* eslint-disable-next-line */
console.log("STEP 4 - INITIALIZE FETCHING LOCALE KEYS");
//Fetch the core localized text keys that will always be required by user //Fetch the core localized text keys that will always be required by user
locale locale
.fetch(locale.coreKeys) .fetch(locale.coreKeys)
.then(function putFetchedNavItemsInStore() { .then(function putFetchedNavItemsInStore() {
/* eslint-disable-next-line */
console.log("STEP 5 - DONE FETCHING LOCALE KEYS CREATING NAV ITEMS");
//put nav items into store //put nav items into store
//Everyone has a home //Everyone has a home
addNavItem(locale.get("Home"), "home", "/"); addNavItem(locale.get("Home"), "home", "/");
@@ -83,10 +77,6 @@ export default function initialize() {
// addNavItem(locale.get("Logout"), "sign-out-alt", "/login"); // addNavItem(locale.get("Logout"), "sign-out-alt", "/login");
}) })
.then(() => { .then(() => {
/* eslint-disable-next-line */
console.log(
"STEP 6 - INIT DONE WITH NAV, NOW FETCHING USEROPTIONS SETTINGS"
);
//CACHE LOCALE SETTINGS //CACHE LOCALE SETTINGS
api api
.get("UserOptions/" + store.state.userId) .get("UserOptions/" + store.state.userId)
@@ -116,8 +106,7 @@ export default function initialize() {
//Store offset in locale data //Store offset in locale data
locale.timeZoneOffset = res.data.timeZoneOffset; locale.timeZoneOffset = res.data.timeZoneOffset;
/* eslint-disable-next-line */
console.log("STEP 7 - DONE FETCHING LOCALE SETTINGS");
resolve(); resolve();
} }
}) })

View File

@@ -12,9 +12,6 @@ export default {
return store.state.localeText[key]; return store.state.localeText[key];
}, },
fetch(keys) { fetch(keys) {
/* eslint-disable-next-line */
console.log("LOCALE - TOP OF FETCH(KEYS)");
return new Promise(function fetchLocaleKeysFromServer(resolve) { return new Promise(function fetchLocaleKeysFromServer(resolve) {
//, reject //, reject
//step 1: build an array of keys that we don't have already //step 1: build an array of keys that we don't have already
@@ -39,11 +36,6 @@ export default {
_.forEach(response.data, function commitFetchedLTItemToStore(item) { _.forEach(response.data, function commitFetchedLTItemToStore(item) {
store.commit("addLocaleText", item); store.commit("addLocaleText", item);
}); });
/* eslint-disable-next-line */
console.log(
"LOCALE - DONE FETCH(KEYS) and stored about to call Resolve()..."
);
resolve(); resolve();
}); });
}); });

View File

@@ -76,13 +76,9 @@ export default {
if (this.input.username != "" && this.input.password != "") { if (this.input.username != "" && this.input.password != "") {
this.errorBadCreds = false; this.errorBadCreds = false;
var that = this; var that = this;
/* eslint-disable-next-line */
console.log("STEP 1 - LOGIN::AUTHENTICATING");
auth auth
.authenticate(this.input.username, this.input.password) .authenticate(this.input.username, this.input.password)
.then(() => { .then(() => {
/* eslint-disable-next-line */
console.log("STEP 8 - LOGIN::AUTHENTICATE COMPLETED - GOING HOME");
this.$router.push({ name: "home" }); this.$router.push({ name: "home" });
}) })
.catch(function handleCaughtLoginError(error) { .catch(function handleCaughtLoginError(error) {