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:
@@ -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);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
|
||||
@@ -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"
|
||||
]);
|
||||
|
||||
@@ -293,7 +293,7 @@ function fetchTranslatedText(vm) {
|
||||
"CurrencyCode"
|
||||
];
|
||||
|
||||
return window.$gz.translation.fetch(tKeysRequired);
|
||||
return window.$gz.translation.cacheTranslations(tKeysRequired);
|
||||
}
|
||||
|
||||
////////////////////
|
||||
|
||||
@@ -359,7 +359,7 @@ function fetchTranslatedText(vm) {
|
||||
"UiFieldDataTypesTrueFalse"
|
||||
];
|
||||
|
||||
return window.$gz.translation.fetch(tKeysRequired);
|
||||
return window.$gz.translation.cacheTranslations(tKeysRequired);
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -428,7 +428,7 @@ function initForm(vm) {
|
||||
//
|
||||
//
|
||||
function fetchTranslatedText(vm) {
|
||||
return window.$gz.translation.fetch([
|
||||
return window.$gz.translation.cacheTranslations([
|
||||
"BackupSettings",
|
||||
"BackupTime",
|
||||
"BackupLast",
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
|
||||
@@ -565,6 +565,6 @@ function fetchTranslatedText(vm) {
|
||||
"MetricPrivateBytes"
|
||||
];
|
||||
|
||||
return window.$gz.translation.fetch(tKeysRequired);
|
||||
return window.$gz.translation.cacheTranslations(tKeysRequired);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user