adjust payment connected

pull/250/head
Pete Matsyburka 2 years ago
parent de072d1437
commit 8269a61751

@ -93,6 +93,7 @@ window.customElements.define('template-builder', class extends HTMLElement {
editable: this.dataset.editable !== 'false',
authenticityToken: document.querySelector('meta[name="csrf-token"]')?.content,
withPayment: this.dataset.withPayment === 'true',
isPaymentConnected: this.dataset.isPaymentConnected === 'true',
withFormula: this.dataset.withFormula === 'true',
withConditions: this.dataset.withConditions === 'true',
currencies: (this.dataset.currencies || '').split(',').filter(Boolean),

@ -332,6 +332,7 @@ export default {
backgroundColor: this.backgroundColor,
withPhone: this.withPhone,
withPayment: this.withPayment,
isPaymentConnected: this.isPaymentConnected,
withFormula: this.withFormula,
withConditions: this.withConditions,
defaultDrawFieldType: this.defaultDrawFieldType,
@ -473,6 +474,11 @@ export default {
required: false,
default: false
},
isPaymentConnected: {
type: Boolean,
required: false,
default: false
},
withFormula: {
type: Boolean,
required: false,

@ -167,7 +167,7 @@ export default {
IconInnerShadowTop,
IconBrandStripe
},
inject: ['backgroundColor', 'save', 'currencies', 't'],
inject: ['backgroundColor', 'save', 'currencies', 't', 'isPaymentConnected'],
props: {
field: {
type: Object,
@ -221,6 +221,8 @@ export default {
mounted () {
this.field.preferences.currency ||= this.defaultCurrency
isConnected.value ||= this.isPaymentConnected
if (!this.isConnected) {
this.checkStatus()
}

Loading…
Cancel
Save