This commit is contained in:
@@ -336,10 +336,6 @@ export default {
|
||||
vm.obj.concurrency = res.data.concurrency;
|
||||
|
||||
//Update local copy of translations if that's the same one in use
|
||||
console.log(
|
||||
"Editing active translation=",
|
||||
vm.editingActiveTranslation
|
||||
);
|
||||
if (vm.editingActiveTranslation) {
|
||||
await window.$gz.translation.updateCache(vm.obj);
|
||||
}
|
||||
@@ -592,7 +588,6 @@ async function fetchTranslatedText(vm) {
|
||||
async function setEditingActiveTranslation(vm) {
|
||||
if (vm.$route.params.recordid != 0) {
|
||||
let res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
|
||||
|
||||
vm.editingActiveTranslation =
|
||||
res.data.translationId == vm.$route.params.recordid;
|
||||
}
|
||||
|
||||
@@ -164,6 +164,7 @@ export default {
|
||||
selectLists: {
|
||||
translations: []
|
||||
},
|
||||
activeTranslationId: null,
|
||||
darkMode: this.$store.state.darkMode,
|
||||
obj: {
|
||||
/*concurrency": 7490431,
|
||||
@@ -265,6 +266,7 @@ export default {
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
vm.obj = res.data;
|
||||
vm.activeTranslationId = res.data.translationId;
|
||||
|
||||
//Update the form status
|
||||
window.$gz.form.setFormState({
|
||||
@@ -332,6 +334,14 @@ export default {
|
||||
}
|
||||
|
||||
window.$gz.store.commit("setLocale", l);
|
||||
|
||||
if (
|
||||
vm.activeTranslationId &&
|
||||
vm.activeTranslationId != vm.obj.translationId
|
||||
) {
|
||||
await window.$gz.translation.updateCache();
|
||||
vm.activeTranslationId = vm.obj.translationId;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
vm.formState.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user