This commit is contained in:
@@ -744,7 +744,8 @@ async function getUserOptions() {
|
||||
l.timeZoneOverride = res.data.timeZoneOverride;
|
||||
|
||||
//No browser setting for this so meh
|
||||
l.currencyName = res.data.currencyName || "USD";
|
||||
l.currencyName = res.data.currencyName;
|
||||
|
||||
if (res.data.hour12 != null) {
|
||||
l.hour12 = res.data.hour12;
|
||||
}
|
||||
|
||||
@@ -60,8 +60,14 @@ export default {
|
||||
//////////////////////////////////////////////////
|
||||
// Get the user's chosen currency name
|
||||
//https://en.wikipedia.org/wiki/ISO_4217
|
||||
//default to USD if nothing specified
|
||||
getCurrencyName() {
|
||||
return window.$gz.store.state.userOptions.currencyName;
|
||||
let cur = window.$gz.store.state.userOptions.currencyName;
|
||||
if (!window.$gz.util.stringIsNullOrEmpty(cur)) {
|
||||
return cur;
|
||||
} else {
|
||||
return "USD";
|
||||
}
|
||||
},
|
||||
//////////////////////////////////////////////////
|
||||
// Get the user's chosen 12hr clock
|
||||
|
||||
@@ -921,7 +921,7 @@ function buildRecords(listData, columndefinitions, ridColumnOpenable) {
|
||||
let timeZoneName = window.$gz.locale.getResolvedTimeZoneName();
|
||||
let languageName = window.$gz.locale.getResolvedLanguage();
|
||||
let hour12 = window.$gz.store.state.userOptions.hour12;
|
||||
let currencyName = window.$gz.store.state.userOptions.currencyName;
|
||||
let currencyName = window.$gz.locale.getCurrencyName();
|
||||
|
||||
//this will cache the first time it's required (if required)
|
||||
let availableRoles = null;
|
||||
|
||||
@@ -301,6 +301,8 @@
|
||||
ref="mapUrlTemplate"
|
||||
@input="fieldValueChanged('mapUrlTemplate')"
|
||||
data-cy="mapUrlTemplate"
|
||||
:hint="obj.mapUrlTemplate == null ? 'Google maps' : ''"
|
||||
persistent-hint
|
||||
></v-text-field>
|
||||
<v-select
|
||||
:items="selectLists.mapUrls"
|
||||
@@ -324,11 +326,15 @@
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
v-model="optionsObj.currencyName"
|
||||
hint="e.g. USD, EUR, GBP, AUD, CAD etc"
|
||||
:hint="
|
||||
optionsObj.currencyName == null ||
|
||||
optionsObj.currencyName == ''
|
||||
? locale().getCurrencyName()
|
||||
: ''
|
||||
"
|
||||
persistent-hint
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('CurrencyCode')"
|
||||
:rules="[form().required(this, 'currencyName')]"
|
||||
:error-messages="form().serverErrors(this, 'currencyName')"
|
||||
ref="currencyName"
|
||||
@input="fieldValueChanged('currencyName')"
|
||||
|
||||
@@ -291,6 +291,8 @@
|
||||
ref="mapUrlTemplate"
|
||||
@input="fieldValueChanged('mapUrlTemplate')"
|
||||
data-cy="mapUrlTemplate"
|
||||
:hint="obj.mapUrlTemplate == null ? 'Google maps' : ''"
|
||||
persistent-hint
|
||||
></v-text-field>
|
||||
<v-select
|
||||
:items="selectLists.mapUrls"
|
||||
@@ -314,11 +316,15 @@
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
v-model="optionsObj.currencyName"
|
||||
hint="e.g. USD, EUR, GBP, AUD, CAD etc"
|
||||
:hint="
|
||||
optionsObj.currencyName == null ||
|
||||
optionsObj.currencyName == ''
|
||||
? locale().getCurrencyName()
|
||||
: ''
|
||||
"
|
||||
persistent-hint
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('CurrencyCode')"
|
||||
:rules="[form().required(this, 'currencyName')]"
|
||||
:error-messages="form().serverErrors(this, 'currencyName')"
|
||||
ref="currencyName"
|
||||
@input="fieldValueChanged('currencyName')"
|
||||
|
||||
@@ -92,6 +92,8 @@
|
||||
ref="mapUrlTemplate"
|
||||
@input="fieldValueChanged('mapUrlTemplate')"
|
||||
data-cy="mapUrlTemplate"
|
||||
:hint="obj.mapUrlTemplate == null ? 'Google maps' : ''"
|
||||
persistent-hint
|
||||
></v-text-field>
|
||||
<v-select
|
||||
:items="selectLists.mapUrls"
|
||||
@@ -114,11 +116,14 @@
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-text-field
|
||||
v-model="obj.currencyName"
|
||||
hint="e.g. USD, EUR, GBP, AUD, CAD etc"
|
||||
:hint="
|
||||
obj.currencyName == null || obj.currencyName == ''
|
||||
? locale().getCurrencyName()
|
||||
: ''
|
||||
"
|
||||
persistent-hint
|
||||
:readonly="formState.readOnly"
|
||||
:label="$ay.t('CurrencyCode')"
|
||||
:rules="[form().required(this, 'currencyName')]"
|
||||
:error-messages="form().serverErrors(this, 'currencyName')"
|
||||
ref="currencyName"
|
||||
@input="fieldValueChanged('currencyName')"
|
||||
|
||||
Reference in New Issue
Block a user