Merge pull request #2699 from Safelite/CASH-1163-afterpay-update

CASH-1163 update Afterpay and code cleanup.
This commit is contained in:
bmauger 2025-07-25 14:39:37 -04:00 committed by GitHub
commit 6f31d1bfb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,9 +6,13 @@
async></component> async></component>
<div> <div>
<span v-for="token in headerCopyTokens" :key="token" v-html="token"></span> <span
class="callout"
v-for="token in headerCopyTokens"
:key="token"
v-html="token"></span>
</div> </div>
<div :id="showAfterpayExtendedPayOption ? 'extended-pay-option' : ''"> <div>
<span v-for="token in afterpayCopyTokens" :key="token"> <span v-for="token in afterpayCopyTokens" :key="token">
<span v-if="isAfterpayPriceToken(token)">{{ afterpayPrice }}</span> <span v-if="isAfterpayPriceToken(token)">{{ afterpayPrice }}</span>
<span v-else-if="isInlineImageToken(token)"> <span v-else-if="isInlineImageToken(token)">
@ -78,15 +82,7 @@ export default {
return splitCMSCopyOnBR(this.getCmsContent(this.cmsWidgetName, "HeaderText")); return splitCMSCopyOnBR(this.getCmsContent(this.cmsWidgetName, "HeaderText"));
}, },
afterpayCopyTokens() { afterpayCopyTokens() {
if (this.showAfterpayExtendedPayOption) { return splitCopyOnCMSPlaceHolder(this.getCmsContent(this.cmsWidgetName, "BodyText"));
return splitCopyOnCMSPlaceHolder(
this.getCmsContent(this.cmsWidgetName, "BodyText")
);
} else {
return splitCopyOnCMSPlaceHolder(
this.getCmsContent(this.cmsWidgetName, "BodyText2")
);
}
}, },
modalCopy() { modalCopy() {
return this.getCmsContent(this.cmsWidgetName, "FooterText"); return this.getCmsContent(this.cmsWidgetName, "FooterText");
@ -114,12 +110,6 @@ export default {
return price; return price;
}, },
showAfterpayExtendedPayOption() {
return (
this.afterpayExtendedPayOptionThreshold &&
this.getTierOnePackagePrice >= this.afterpayExtendedPayOptionThreshold
);
},
}, },
components: {}, components: {},
}; };
@ -138,11 +128,17 @@ export default {
flex-direction: row; flex-direction: row;
} }
.callout {
font-family:
UrbanistSemibold Arial,
Helvetica,
sans-serif;
}
> div:first-of-type { > div:first-of-type {
display: flex; display: flex;
color: $black; color: $black;
font-size: $font-size-20; font-size: $font-size-20;
font-weight: $font-weight-600;
line-height: 2rem; line-height: 2rem;
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
border-bottom: 1px solid; border-bottom: 1px solid;
@ -170,7 +166,7 @@ export default {
} }
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
padding-left: 1rem; padding-left: 1rem;
max-width: 26rem; max-width: 32rem;
} }
} }