This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card class="mx-auto">
|
<v-card class="mx-auto">
|
||||||
<v-list subheader>
|
<v-list subheader>
|
||||||
<v-subheader>General</v-subheader>
|
<v-subheader>Interface</v-subheader>
|
||||||
|
<v-list-item link>
|
||||||
|
<v-list-item-title>Pick list templates</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
<v-subheader>Section 2</v-subheader>
|
||||||
<v-list-item>
|
<v-list-item>
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>fa-home</v-icon>
|
<v-icon>fa-home</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>Section 2 item 1</v-list-item-title>
|
||||||
<v-list-item-title>Home</v-list-item-title>
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -24,6 +27,69 @@ export default {
|
|||||||
title: window.$gz.translation.get("AdministrationGlobalSettings"),
|
title: window.$gz.translation.get("AdministrationGlobalSettings"),
|
||||||
helpUrl: "form-adm-global-settings"
|
helpUrl: "form-adm-global-settings"
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
var 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
|
||||||
|
|
||||||
|
// vm.getDataFromApi();
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
vm.formState.ready = true;
|
||||||
|
window.$gz.errorHandler.handleFormError(err, vm);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
rights: window.$gz.role.defaultRightsObject()
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
t(tKey) {
|
||||||
|
return window.$gz.translation.get(tKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/////////////////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function initForm(vm) {
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
(async function() {
|
||||||
|
try {
|
||||||
|
await fetchTranslatedText(vm);
|
||||||
|
} catch (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
})();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Ensures UI translated text is available
|
||||||
|
//
|
||||||
|
function fetchTranslatedText(vm) {
|
||||||
|
return window.$gz.translation.fetch([
|
||||||
|
"CurrencyCode",
|
||||||
|
"LanguageCode",
|
||||||
|
"TimeZone",
|
||||||
|
"UserEmailAddress",
|
||||||
|
"Hour12",
|
||||||
|
"UserColor",
|
||||||
|
"Translation"
|
||||||
|
]);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user