Prepend currency code to selector label.

This commit is contained in:
Nicolas Hedger
2019-12-11 20:36:46 +01:00
parent 17b59f0d19
commit 5f0b4b3496
2 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,7 @@
<base-select
v-model="formData.currency"
:options="currencies"
:custom-label="currencyNameWithCode"
:class="{'error': $v.formData.currency.$error }"
:searchable="true"
:show-labels="false"
@ -179,6 +180,9 @@ export default {
this.getDiscountSettings()
},
methods: {
currencyNameWithCode ({name, code}) {
return `${code} - ${name}`
},
...mapActions('currency', [
'setDefaultCurrency'
]),