Skip to content

Commit

Permalink
feat(app/checkout): update <CreditCardForm> with new opt prop `isPaye…
Browse files Browse the repository at this point in the history
…rDocRequired`

Set default value with global `window.ecomCreditCardDocRequired`

May fix #951
  • Loading branch information
leomp12 committed Sep 21, 2023
1 parent f3e3c18 commit f62d234
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
<input-date
id="credit-card-birth"
v-model="card.birth"
:required="isPayerDocRequired"
/>
</div>

Expand All @@ -124,6 +125,7 @@
id="credit-card-doc"
:is-company="isCompany"
v-model="card.doc"
:required="isPayerDocRequired"
/>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion @ecomplus/storefront-app/src/components/js/CreditCardForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ export default {
installmentOptions: Array,
gatewayOptions: Array,
jsClient: Object,
jsClientLoad: Promise
jsClientLoad: Promise,
isPayerDocRequired: {
type: Boolean,
default () {
return window.ecomCreditCardDocRequired === true
}
}
},

data () {
Expand Down

0 comments on commit f62d234

Please sign in to comment.