This commit is contained in:
@@ -46,7 +46,7 @@ CURRENT TODOs
|
||||
|
||||
todo: expose translation setting for user to home-user-settings
|
||||
- document
|
||||
- Is this where we need to have an autocomplete? (too small, no point?)
|
||||
|
||||
|
||||
todo: User settings && password change documentation
|
||||
- do it now?
|
||||
|
||||
@@ -17,6 +17,20 @@
|
||||
>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-select
|
||||
v-model="obj.translationId"
|
||||
:items="pickLists.translations"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:readonly="formState.readOnly"
|
||||
:label="lt('Translation')"
|
||||
ref="translationId"
|
||||
:error-messages="form().serverErrors(this, 'translationId')"
|
||||
@change="onChange('translationId')"
|
||||
></v-select>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
v-model="obj.emailAddress"
|
||||
@@ -155,10 +169,19 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||
// pickLists: {
|
||||
// usertypes: []
|
||||
// },
|
||||
pickLists: {
|
||||
translations: []
|
||||
},
|
||||
obj: {
|
||||
/*concurrencyToken": 7490431,
|
||||
"translationId": 1,
|
||||
"emailAddress": null,
|
||||
"uiColor": "#000000",
|
||||
"languageOverride": null,
|
||||
"timeZoneOverride": null,
|
||||
"currencyName": "USD",
|
||||
"hour12": true,
|
||||
"userId": 1 */
|
||||
id: 0,
|
||||
concurrencyToken: 0,
|
||||
emailAddress: null,
|
||||
@@ -166,7 +189,8 @@ export default {
|
||||
languageOverride: null,
|
||||
timeZoneOverride: null,
|
||||
currencyName: null,
|
||||
hour12: null
|
||||
hour12: null,
|
||||
translationId: null
|
||||
},
|
||||
formState: {
|
||||
ready: false,
|
||||
@@ -397,8 +421,7 @@ function initForm(vm) {
|
||||
(async function() {
|
||||
try {
|
||||
await fetchTranslatedText(vm);
|
||||
// await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
|
||||
// await populatePickLists(vm);
|
||||
await populatePickLists(vm);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
@@ -418,19 +441,24 @@ function fetchTranslatedText(vm) {
|
||||
"TimeZone",
|
||||
"UserEmailAddress",
|
||||
"Hour12",
|
||||
"UserColor"
|
||||
"UserColor",
|
||||
"Translation"
|
||||
]);
|
||||
}
|
||||
|
||||
// //////////////////////
|
||||
// //
|
||||
// //
|
||||
// function populatePickLists(vm) {
|
||||
// //ensure the pick lists required are pre-fetched
|
||||
// return window.$gz.enums.fetchEnumList("usertype").then(() => {
|
||||
// vm.pickLists.usertypes = window.$gz.enums.getPickList("usertype");
|
||||
// });
|
||||
// }
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function populatePickLists(vm) {
|
||||
//http://localhost:7575/api/v8/Translation/PickList
|
||||
return window.$gz.api.get("Translation/PickList").then(res => {
|
||||
if (res.error != undefined) {
|
||||
window.$gz.errorHandler.handleFormError(res.error, vm);
|
||||
} else {
|
||||
vm.pickLists.translations = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
||||
Reference in New Issue
Block a user