add builder currencies prop

This commit is contained in:
Pete Matsyburka
2024-01-26 10:43:32 +02:00
parent 5c69b965c0
commit b4ba642f8e
3 changed files with 13 additions and 3 deletions
@@ -31,7 +31,7 @@
@change="save"
>
<option
v-for="currency in currencies"
v-for="currency in currenciesList"
:key="currency"
:value="currency"
>
@@ -167,7 +167,7 @@ export default {
IconInnerShadowTop,
IconBrandStripe
},
inject: ['backgroundColor', 'save'],
inject: ['backgroundColor', 'save', 'currencies'],
props: {
field: {
type: Object,
@@ -187,9 +187,12 @@ export default {
redirectUri () {
return document.location.origin + '/auth/stripe_connect/callback'
},
currencies () {
defaultCurrencies () {
return ['USD', 'EUR', 'GBP']
},
currenciesList () {
return this.currencies.length ? this.currencies : this.defaultCurrencies
},
authenticityToken () {
return document.querySelector('meta[name="csrf-token"]')?.content
},