diff --git a/ayanova/src/api/locale.js b/ayanova/src/api/locale.js
index 109e6b1f..4b4be71f 100644
--- a/ayanova/src/api/locale.js
+++ b/ayanova/src/api/locale.js
@@ -218,6 +218,12 @@ export default {
getTimeZoneName() {
return Intl.DateTimeFormat().resolvedOptions().timeZone;
},
+ //////////////////////////////////////////////////
+ // Get the user's chosen currency name
+ //
+ getCurrencyName() {
+ return window.$gz.store.state.locale.currencyName;
+ },
///////////////////////////////////////////
// Turn a utc date into a displayable
// short date and time
@@ -386,7 +392,7 @@ export default {
languageName = this.getBrowserLanguages();
}
if (!currencyName) {
- currencyName = window.$gz.store.state.locale.currencyName;
+ currencyName = this.getCurrencyName();
}
return new Intl.NumberFormat(languageName, {
diff --git a/ayanova/src/components/currency-control.vue b/ayanova/src/components/currency-control.vue
new file mode 100644
index 00000000..1b2c3fa8
--- /dev/null
+++ b/ayanova/src/components/currency-control.vue
@@ -0,0 +1,79 @@
+
+
+
+
diff --git a/ayanova/src/main.js b/ayanova/src/main.js
index c620831b..8d67c0e5 100644
--- a/ayanova/src/main.js
+++ b/ayanova/src/main.js
@@ -34,6 +34,7 @@ import dateControl from "./components/date-control.vue";
import timeControl from "./components/time-control.vue";
import tagPicker from "./components/tag-picker.vue";
import customFieldsControl from "./components/custom-fields-control.vue";
+import currencyControl from "./components/currency-control.vue";
import errorhandler from "./api/errorhandler";
/////////////////////////////////////////////////////////////////
@@ -178,6 +179,7 @@ Vue.component("gz-date-picker", dateControl);
Vue.component("gz-time-picker", timeControl);
Vue.component("gz-tag-picker", tagPicker);
Vue.component("gz-custom-fields", customFieldsControl);
+Vue.component("gz-currency", currencyControl);
//3rd party components
Vue.use(VueCurrencyInput);
diff --git a/ayanova/src/views/test-inventory-widget-edit.vue b/ayanova/src/views/test-inventory-widget-edit.vue
index 8a1640ee..b9fa3b27 100644
--- a/ayanova/src/views/test-inventory-widget-edit.vue
+++ b/ayanova/src/views/test-inventory-widget-edit.vue
@@ -84,16 +84,18 @@
xl="3"
>
@@ -410,14 +412,15 @@ export default {
lt(ltKey) {
return window.$gz.locale.get(ltKey);
},
- ltFormat() {
- return window.$gz.locale.format();
+ locale() {
+ return window.$gz.locale;
},
form() {
return window.$gz.form;
},
onChange(ref) {
if (!this.formState.loading && !this.formState.readOnly) {
+ debugger;
window.$gz.form.onChange(this, ref);
}
},