From 2175e57c534bd6d4305c0ad72b3612dc72798603 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 19 Mar 2021 23:17:31 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 26 ++---------------------- ayanova/src/api/initialize.js | 3 ++- ayanova/src/api/locale.js | 8 +++++++- ayanova/src/components/data-table.vue | 2 +- ayanova/src/views/adm-user.vue | 10 +++++++-- ayanova/src/views/cust-user.vue | 10 +++++++-- ayanova/src/views/home-user-settings.vue | 9 ++++++-- 7 files changed, 35 insertions(+), 33 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index f4652eaf..1636313c 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -64,30 +64,6 @@ todo: v8 migrate additions * todo JC misc list: **************** -help link to ay-start-localization.md for langauge and time zone and currency - -User Settings -**************** -(italic is mine original message, your original response in []. The **** is my reply to yours) -How will the user know what "language code" to enter - gives only one example "en-US" but when start typing in, nothing comes up to select? -[this is intended as an override for what their browser defaults to already which should be correct 99.99% of the time and should almost never need to be changed. Maybe I could include a link to the codes on a wikipedia page or something, they change from time to time and it wouldn't bre practical to include a list preset] -****yes a tooltip or URL link next to/under the label or the entry field would help by leading users to that info (in the URL) if they need. -****I'd also like to suggest "Override language code" as the label, to indicate that it OVERRIDES something existing. -https://www.w3.org/International/questions/qa-choosing-language-tags - -(italic is mine original message, your original response in []. The **** is my reply to yours) -How will the user know what "Time zone" to enter - gives only one example "America/Vancouver" but when start typing in, nothing comes up to select? -[same issue as language code above] -****yes a tooltip or URL link next to/under the label or the entry field would help by leading users to that info (in the URL) if they need. -****I'd also like to suggest "Override Time Zone" as the label, to indicate that it OVERRIDES something existing. - -https://wikipedia.org/wiki/List_of_tz_database_time_zones - -(italic is mine original message, your original response in []. The **** is my reply to yours) -I see "under" the "Map URL template" dropdown list where can select Google, Bing etc. Is the idea that a user will "know" what this is used for if they use it? -[yes, if they have a particular mapping site they prefer they can select it here otherwise defaults to google maps.] -****if the Google url template is the default, can it show preselected? Cause right now nothing shows as selected, which to me as a user would indicate that "nothing" is set/default. OR if I have misunderstood and the default is not in the list, then the label to say "Override MAP URL template" to indicate selection overrides a default that is already set elsewhere. - ****************** Tags @@ -1037,6 +1013,8 @@ build 105 Taxes won't let me change an existing Name if previously selected on any other record. Taxes won't let me change the Active status if previously selected on any other record. Unit charge description should offer auto suggest from prior entries to save typing + User settings language and time zone and currency help / suggestions + User settings map template hint shows google maps as default - not changed Tag extension should have tag picker instead of empty field in cases where you are picking from existing tags diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 3ee36ae2..1a71181f 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -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; } diff --git a/ayanova/src/api/locale.js b/ayanova/src/api/locale.js index 0287c28b..0bf77fe0 100644 --- a/ayanova/src/api/locale.js +++ b/ayanova/src/api/locale.js @@ -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 diff --git a/ayanova/src/components/data-table.vue b/ayanova/src/components/data-table.vue index 268a9869..d83b879f 100644 --- a/ayanova/src/components/data-table.vue +++ b/ayanova/src/components/data-table.vue @@ -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; diff --git a/ayanova/src/views/adm-user.vue b/ayanova/src/views/adm-user.vue index bd8d8c53..f141013a 100644 --- a/ayanova/src/views/adm-user.vue +++ b/ayanova/src/views/adm-user.vue @@ -301,6 +301,8 @@ ref="mapUrlTemplate" @input="fieldValueChanged('mapUrlTemplate')" data-cy="mapUrlTemplate" + :hint="obj.mapUrlTemplate == null ? 'Google maps' : ''" + persistent-hint >