This commit is contained in:
@@ -340,7 +340,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let isReset = toPath && toPath.includes("home-reset");
|
let isReset = toPath && toPath.includes("home-reset");
|
||||||
debugger;
|
|
||||||
//redirect to login if not authenticated
|
//redirect to login if not authenticated
|
||||||
if (!vm.$store.state.authenticated && !isReset) {
|
if (!vm.$store.state.authenticated && !isReset) {
|
||||||
//If a direct open path was being used but user is not logged in this will catch it
|
//If a direct open path was being used but user is not logged in this will catch it
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return window.$gz.store.state.translationText[key];
|
return window.$gz.store.state.translationText[key];
|
||||||
},
|
},
|
||||||
async cacheTranslations(keys, forceTranslationId = 0) {
|
async cacheTranslations(keys, forceTranslationId) {
|
||||||
return new Promise(async function fetchTranslationKeysFromServer(resolve) {
|
return new Promise(async function fetchTranslationKeysFromServer(resolve) {
|
||||||
//
|
//
|
||||||
//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
|
||||||
@@ -100,8 +100,12 @@ export default {
|
|||||||
|
|
||||||
//step 2: get it
|
//step 2: get it
|
||||||
let transData = null;
|
let transData = null;
|
||||||
if (forceTranslationId != 0) {
|
|
||||||
debugger;
|
console.log(
|
||||||
|
"translation.js::cachetranslationkeys forcetranslationid=",
|
||||||
|
forceTranslationId
|
||||||
|
);
|
||||||
|
if (forceTranslationId) {
|
||||||
transData = await window.$gz.api.upsert(
|
transData = await window.$gz.api.upsert(
|
||||||
`translation/subset/${forceTranslationId}`,
|
`translation/subset/${forceTranslationId}`,
|
||||||
needIt
|
needIt
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
/* Xeslint-disable */
|
/* Xeslint-disable */
|
||||||
export default {
|
export default {
|
||||||
async created() {
|
async created() {
|
||||||
debugger;
|
|
||||||
let searchParams = new URLSearchParams(window.location.search);
|
let searchParams = new URLSearchParams(window.location.search);
|
||||||
//home-reset?rc={ResetCode}&tr={EffectiveTranslationId}&lg={loginName}
|
//home-reset?rc={ResetCode}&tr={EffectiveTranslationId}&lg={loginName}
|
||||||
this.obj.passwordResetCode = searchParams.get("rc");
|
this.obj.passwordResetCode = searchParams.get("rc");
|
||||||
@@ -136,7 +135,6 @@ async function initForm(vm) {
|
|||||||
// Ensures UI translated text is available
|
// Ensures UI translated text is available
|
||||||
//
|
//
|
||||||
async function fetchTranslatedText(vm) {
|
async function fetchTranslatedText(vm) {
|
||||||
debugger;
|
|
||||||
await window.$gz.translation.cacheTranslations(
|
await window.$gz.translation.cacheTranslations(
|
||||||
[
|
[
|
||||||
"NewPassword",
|
"NewPassword",
|
||||||
@@ -145,7 +143,7 @@ async function fetchTranslatedText(vm) {
|
|||||||
"ErrorRequiredFieldEmpty",
|
"ErrorRequiredFieldEmpty",
|
||||||
"ErrorNoMatch"
|
"ErrorNoMatch"
|
||||||
],
|
],
|
||||||
vm.translationId
|
vm.obj.translationId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user