This commit is contained in:
2020-06-19 23:58:52 +00:00
parent f02888fae7
commit 5e1efbab24
18 changed files with 431 additions and 479 deletions

View File

@@ -28,26 +28,26 @@ export default {
}
});
},
created() {
async created() {
let vm = this;
initForm(vm)
.then(() => {
vm.rights = window.$gz.role.getRights(window.$gz.type.UserOptions);
vm.formState.ready = true;
// window.$gz.eventBus.$on("menu-click", clickHandler);
// //UserOptions never creates a new one so this code is a little different than other forms
// //NOTE: FOR NOW GOING TO ASSUME THIS FORM WILL ONLY EVER BE USED TO EDIT *CURRENT* USER'S USEROPTIONS
// //SO NOT FOR EDITING OTHER USERS, WILL ASSUME THE USER EDITOR FORM FOR MANAGEMENT WILL HAVE A COMPACT VERSION
// //OF THESE SAME FIELDS FOR THAT PURPOSE
// //SO ALWAYS USER CURRENT LOGGED IN USER ID FOR THIS
// //id 0 means create a new record don't load one but thats not applicable here
try {
initForm(vm);
// vm.getDataFromApi();
})
.catch(err => {
vm.formState.ready = true;
window.$gz.errorHandler.handleFormError(err, vm);
});
vm.rights = window.$gz.role.getRights(window.$gz.type.UserOptions);
vm.formState.ready = true;
// window.$gz.eventBus.$on("menu-click", clickHandler);
// //UserOptions never creates a new one so this code is a little different than other forms
// //NOTE: FOR NOW GOING TO ASSUME THIS FORM WILL ONLY EVER BE USED TO EDIT *CURRENT* USER'S USEROPTIONS
// //SO NOT FOR EDITING OTHER USERS, WILL ASSUME THE USER EDITOR FORM FOR MANAGEMENT WILL HAVE A COMPACT VERSION
// //OF THESE SAME FIELDS FOR THAT PURPOSE
// //SO ALWAYS USER CURRENT LOGGED IN USER ID FOR THIS
// //id 0 means create a new record don't load one but thats not applicable here
// vm.getDataFromApi();
} catch (err) {
vm.formState.ready = true;
window.$gz.errorHandler.handleFormError(err, vm);
}
},
data() {
return {
@@ -86,8 +86,8 @@ function initForm(vm) {
//
// Ensures UI translated text is available
//
function fetchTranslatedText(vm) {
return window.$gz.translation.cacheTranslations([
async function fetchTranslatedText(vm) {
await window.$gz.translation.cacheTranslations([
"UserInterfaceSettings",
"PickListTemplates"
]);