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', editable: this.dataset.editable !== 'false',
authenticityToken: document.querySelector('meta[name="csrf-token"]')?.content, authenticityToken: document.querySelector('meta[name="csrf-token"]')?.content,
withPayment: this.dataset.withPayment === 'true', withPayment: this.dataset.withPayment === 'true',
isPaymentConnected: this.dataset.isPaymentConnected === 'true',
withFormula: this.dataset.withFormula === 'true', withFormula: this.dataset.withFormula === 'true',
withConditions: this.dataset.withConditions === 'true', withConditions: this.dataset.withConditions === 'true',
currencies: (this.dataset.currencies || '').split(',').filter(Boolean), currencies: (this.dataset.currencies || '').split(',').filter(Boolean),

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

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

Loading…
Cancel
Save