diff --git a/ayanova/src/components/currency-control.vue b/ayanova/src/components/currency-control.vue index acf4892c..3ee701b8 100644 --- a/ayanova/src/components/currency-control.vue +++ b/ayanova/src/components/currency-control.vue @@ -27,9 +27,9 @@ export default { data() { return { internalValue: null, + internalChange: false, currencyName: window.$gz.locale.getCurrencyName(), - languageName: window.$gz.locale.getBrowserFirstLanguage(), - internalChange: false + languageName: window.$gz.locale.getBrowserFirstLanguage() }; }, watch: { @@ -51,30 +51,23 @@ export default { }, methods: { handleInput(value) { - let ret = parseCurrency(value, { + let parsedValue = parseCurrency(value, { currency: this.currencyName, locale: this.languageName }); if (this.internalChange) { - this.internalValue = ret; + this.internalValue = parsedValue; this.internalChange = false; return; } - console.log( - `handleInput, comparing value of ${value} to internalValue of ${this.internalValue}` - ); - if (ret == this.internalValue) { + + if (parsedValue == this.internalValue) { //nothing changed return; } - // let ret = parseCurrency(value, { - // currency: this.currencyName, - // locale: this.languageName - // }); - console.log("currency-control emitting INPUT on value", ret); - this.$emit("input", ret); - this.internalValue = ret; + this.$emit("input", parsedValue); + this.internalValue = parsedValue; } } }; diff --git a/ayanova/src/components/decimal-control.vue b/ayanova/src/components/decimal-control.vue index 867079c4..605540ea 100644 --- a/ayanova/src/components/decimal-control.vue +++ b/ayanova/src/components/decimal-control.vue @@ -2,13 +2,13 @@