This commit is contained in:
@@ -159,6 +159,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||||
selectLists: {},
|
selectLists: {},
|
||||||
|
editingActiveTranslation: false,
|
||||||
obj: {},
|
obj: {},
|
||||||
formState: {
|
formState: {
|
||||||
ready: false,
|
ready: false,
|
||||||
@@ -335,7 +336,9 @@ export default {
|
|||||||
vm.obj.concurrency = res.data.concurrency;
|
vm.obj.concurrency = res.data.concurrency;
|
||||||
|
|
||||||
//Update local copy of translations if that's the same one in use
|
//Update local copy of translations if that's the same one in use
|
||||||
await window.$gz.translation.updateCache(vm.obj);
|
if (vm.editingActiveTranslation) {
|
||||||
|
await window.$gz.translation.updateCache(vm.obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update the form status
|
//Update the form status
|
||||||
@@ -563,7 +566,7 @@ let JUST_DELETED = false;
|
|||||||
async function initForm(vm) {
|
async function initForm(vm) {
|
||||||
await fetchTranslatedText(vm);
|
await fetchTranslatedText(vm);
|
||||||
//await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
//await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
||||||
await populateSelectionLists(vm);
|
await setEditingActiveTranslation(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
@@ -579,12 +582,14 @@ async function fetchTranslatedText(vm) {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
async function populateSelectionLists(vm) {
|
async function setEditingActiveTranslation(vm) {
|
||||||
//ensure the pick lists required are pre-fetched
|
if (vm.$route.params.recordid != 0) {
|
||||||
// await window.$gz.enums.fetchEnumList("usertype");
|
let res = await window.$gz.api.get("user-option/" + vm.$store.state.userId);
|
||||||
//vm.selectLists.usertypes = window.$gz.enums.getSelectionList("usertype");
|
vm.editingActiveTranslation =
|
||||||
|
res.translationId == vm.$route.params.recordid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user