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