This commit is contained in:
2020-11-30 20:29:22 +00:00
parent 222ca6d103
commit 169b6c54a6
5 changed files with 52 additions and 27 deletions

View File

@@ -37,7 +37,7 @@
<template v-slot:activator="{ on }">
<v-text-field
v-on="on"
:value="timeValue"
:value="readonlyTimeFormat()"
label
prepend-icon="$ayiClock"
@click:prepend="dlgtime = true"
@@ -137,6 +137,14 @@ export default {
this.hour12
);
},
readonlyTimeFormat() {
return window.$gz.locale.utcDateToShortTimeLocalized(
this.value,
this.timeZoneName,
this.languageName,
this.hour12
);
},
updateTimeValue(v) {
this.updateValue(this.dateValue, v);
},

View File

@@ -6,7 +6,7 @@
<template v-slot:activator="{ on }">
<v-text-field
v-on="on"
:value="timeValue"
:value="readonlyFormat()"
v-bind:label="label"
prepend-icon="$ayiClock"
@click:prepend="dlgtime = true"

View File

@@ -352,6 +352,17 @@
></v-text-field>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="optionsObj.hour12"
:readonly="formState.readOnly"
:label="$ay.t('Hour12')"
ref="hour12"
:error-messages="form().serverErrors(this, 'hour12')"
@change="fieldValueChanged('hour12')"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-text-field
v-model="optionsObj.languageOverride"
@@ -1097,6 +1108,7 @@ async function fetchTranslatedText(vm) {
"CurrencyCode",
"LanguageCode",
"TimeZone",
"Hour12",
"UserEmailAddress",
"UserColor",
"Translation",

View File

@@ -336,6 +336,17 @@
></v-text-field>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="optionsObj.hour12"
:readonly="formState.readOnly"
:label="$ay.t('Hour12')"
ref="hour12"
:error-messages="form().serverErrors(this, 'hour12')"
@change="fieldValueChanged('hour12')"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-text-field
v-model="optionsObj.languageOverride"
@@ -1099,6 +1110,7 @@ async function fetchTranslatedText(vm) {
"CurrencyCode",
"LanguageCode",
"TimeZone",
"Hour12",
"UserEmailAddress",
"UserColor",
"Translation",

View File

@@ -121,6 +121,17 @@
></v-text-field>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-checkbox
v-model="obj.hour12"
:readonly="formState.readOnly"
:label="$ay.t('Hour12')"
ref="hour12"
:error-messages="form().serverErrors(this, 'hour12')"
@change="fieldValueChanged('hour12')"
></v-checkbox>
</v-col>
<v-col cols="12" sm="6" lg="4" xl="3">
<v-text-field
v-model="obj.languageOverride"
@@ -381,32 +392,13 @@ export default {
//Set values in store so they are updated immediately for user
let l = vm.$store.state.userOptions;
if (vm.obj.languageOverride) {
l.languageOverride = vm.obj.languageOverride;
}
if (vm.obj.timeZoneOverride) {
l.timeZoneOverride = vm.obj.timeZoneOverride;
}
if (vm.obj.currencyName) {
l.currencyName = vm.obj.currencyName;
}
if (vm.obj.hour12) {
l.hour12 = vm.obj.hour12;
}
if (vm.obj.uiColor) {
l.uiColor = vm.obj.uiColor;
}
if (vm.obj.emailAddress) {
l.emailAddress = vm.obj.emailAddress;
}
l.languageOverride = vm.obj.languageOverride;
l.timeZoneOverride = vm.obj.timeZoneOverride;
l.currencyName = vm.obj.currencyName;
l.hour12 = vm.obj.hour12;
l.uiColor = vm.obj.uiColor;
l.emailAddress = vm.obj.emailAddress;
l.mapUrlTemplate = vm.obj.mapUrlTemplate;
window.$gz.store.commit("setUserOptions", l);
if (
@@ -513,6 +505,7 @@ async function fetchTranslatedText(vm) {
"CurrencyCode",
"LanguageCode",
"TimeZone",
"Hour12",
"UserEmailAddress",
"UserColor",
"Translation",