Merge pull request #1256 from Safelite/feature/humphries/INSR-9835

INSR-9835: Only offer wipers on payment-method if available
This commit is contained in:
AHumphriesSL 2026-06-11 15:43:11 -04:00 committed by GitHub
commit e0d72c054f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,7 +301,9 @@ export default {
return MaskaFormattedMasks.PHONE_NUMBER;
},
offerWipers() {
return !this.mainStore.lineItems.vaps?.some((part) => part.partType.toLowerCase().includes('wiper'));
const orderHasWipers = this.mainStore.lineItems.vaps?.some((part) => part.partType.toLowerCase().includes('wiper'));
const wipersAvailable = this.mainStore.order.availableVaps?.some((part) => part.partType.toLowerCase().includes('wiper'));
return !orderHasWipers && wipersAvailable;
},
wiperOfferPanel() {
const wiperImage = this.getCmsContent(this.widget.wiperOffer, widgetFields.CONTENT_GROUP_WIDGET.IMAGE);