all over the place with comments and console statements but now properly chains all the calls for login (except translation may have an issue)

This commit is contained in:
2020-06-10 21:05:45 +00:00
parent c0fcecb3f8
commit 0a43e53ab7
25 changed files with 1966 additions and 976 deletions

View File

@@ -258,7 +258,7 @@ export default {
for (let i = 0; i < res.data.length; i++) {
vm.fieldKeys.push(res.data[i].tKey);
}
return window.$gz.translation.fetch(vm.fieldKeys);
return window.$gz.translation.cacheTranslations(vm.fieldKeys);
}
})
.then(function() {
@@ -460,7 +460,7 @@ function initForm(vm) {
function fetchTranslatedText(vm) {
let tKeysRequired = ["Include", "ResetToDefault"];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
//////////////////////

View File

@@ -87,7 +87,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"UserInterfaceSettings",
"PickListTemplates"
]);

View File

@@ -293,7 +293,7 @@ function fetchTranslatedText(vm) {
"CurrencyCode"
];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
////////////////////

View File

@@ -359,7 +359,7 @@ function fetchTranslatedText(vm) {
"UiFieldDataTypesTrueFalse"
];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
/////////////////////////////////

View File

@@ -1006,7 +1006,7 @@ function fetchTranslatedText(vm) {
"Name"
];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
/////////////////////////////////
@@ -1182,7 +1182,7 @@ function fetchTranslatedFieldNames(vm) {
columnKeys.push(cm.tKey);
}
//Now fetch all the keys and await the response before returning
return window.$gz.translation.fetch(columnKeys).then(() => {
return window.$gz.translation.cacheTranslations(columnKeys).then(() => {
return;
});
}

View File

@@ -466,7 +466,7 @@ function populateEventTypeList(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"EventDeleted",
"EventCreated",
"EventRetrieved",

View File

@@ -296,7 +296,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"UserLogin",
"OldPassword",
"NewPassword",

View File

@@ -379,7 +379,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"TooManyResults",
"NoResults",
"Object"

View File

@@ -431,7 +431,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"CurrencyCode",
"LanguageCode",
"TimeZone",

View File

@@ -256,14 +256,16 @@ export default {
let vm = this;
if (vm.input.username != "" && vm.input.password != "") {
vm.errorBadCreds = false;
auth
.authenticate(vm.input.username, vm.input.password)
.then(() => {
console.log("LOGIN:BACKFROMAUTHENTICATE");
if (vm.$store.state.openObject != null) {
window.$gz.eventBus.$emit("openobject", null);
} else {
vm.$router.push(vm.$store.state.homePage);
if (!vm.$store.state.homePage) {
console.log("####LOGIN END BUT homePage is empty!");
} else vm.$router.push(vm.$store.state.homePage);
}
})
.catch(function handleCaughtLoginError(error) {

View File

@@ -428,7 +428,7 @@ function initForm(vm) {
//
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"BackupSettings",
"BackupTime",
"BackupLast",

View File

@@ -260,6 +260,6 @@ function initForm(vm) {
function fetchTranslatedText(vm) {
let tKeysRequired = ["OpsTestJob"];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
</script>

View File

@@ -216,7 +216,7 @@ function initForm(vm) {
function fetchTranslatedText(vm) {
let tKeysRequired = ["OpsTestJob", "Log"];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
//////////////////////

View File

@@ -565,6 +565,6 @@ function fetchTranslatedText(vm) {
"MetricPrivateBytes"
];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
</script>

View File

@@ -152,6 +152,6 @@ function initForm(vm) {
function fetchTranslatedText(vm) {
let tKeysRequired = ["ServerProfiler"];
return window.$gz.translation.fetch(tKeysRequired);
return window.$gz.translation.cacheTranslations(tKeysRequired);
}
</script>

View File

@@ -300,7 +300,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"ServerStateOpen",
"ServerStateOps",
"ServerStateReason"

View File

@@ -756,7 +756,7 @@ function initForm(vm) {
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([
return window.$gz.translation.cacheTranslations([
"Widget",
"WidgetName",
"WidgetSerial",