CSR-2130 check recal to determine which payment options to show

CSR-2130 check recal to determine which payment options to show
This commit is contained in:
CarlNation 2024-07-11 11:24:46 -04:00
parent bd3eb4b78f
commit 727183ef89
4 changed files with 16 additions and 2 deletions

View file

@ -210,6 +210,9 @@ body .cc-error-container #alert-message {
#fmg-checkout-shared .form-group .list-group.radio .list-group-item label { #fmg-checkout-shared .form-group .list-group.radio .list-group-item label {
padding: 12px 20px; padding: 12px 20px;
} }
#fmg-checkout-shared #afterpayParentDiv {
display: none;
}
#fmg-checkout-shared #applepay-and-paypal-container { #fmg-checkout-shared #applepay-and-paypal-container {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;

View file

@ -237,6 +237,10 @@ body {
} }
} }
#afterpayParentDiv {
display: none;
}
#applepay-and-paypal-container { #applepay-and-paypal-container {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;

View file

@ -9,6 +9,7 @@
:answers="paymentMethodAnswerData" :answers="paymentMethodAnswerData"
isRequired isRequired
:validationRules="validationRules" :validationRules="validationRules"
:hasRecal="hasRecal"
v-model="selectedMethod" v-model="selectedMethod"
textPosition="text-start" /> textPosition="text-start" />
</div> </div>
@ -29,6 +30,7 @@ export default {
props: { props: {
modelValue: String, modelValue: String,
validationRules: String, validationRules: String,
hasRecal: Boolean,
}, },
methods: { methods: {
getAnswersNullSafe(widgetName) { getAnswersNullSafe(widgetName) {
@ -54,8 +56,12 @@ export default {
return this.getCmsContent("PaymentMethodWidget", "QuestionText"); return this.getCmsContent("PaymentMethodWidget", "QuestionText");
}, },
paymentMethodAnswerData() { paymentMethodAnswerData() {
const cmsData = this.getAnswersNullSafe("PaymentMethodWidget"); var cmsData;
if (this.hasRecal) {
cmsData = this.getAnswersNullSafe("PaymentMethodHasRecalWidget");
} else {
cmsData = this.getAnswersNullSafe("PaymentMethodWidget");
}
return cmsData.map((answer) => { return cmsData.map((answer) => {
return { return {
buttonLabel: answer.Text, buttonLabel: answer.Text,

View file

@ -67,6 +67,7 @@
<paymentMethodQuestion <paymentMethodQuestion
v-if="isPiaEnabled && totalAmountDue > 0" v-if="isPiaEnabled && totalAmountDue > 0"
v-model="paymentMethodInternalModel" v-model="paymentMethodInternalModel"
:hasRecal="hasRecal"
validationRules="payment-method-required" /> validationRules="payment-method-required" />
<alert <alert