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:
commit
e0d72c054f
1 changed files with 3 additions and 1 deletions
|
|
@ -301,7 +301,9 @@ export default {
|
||||||
return MaskaFormattedMasks.PHONE_NUMBER;
|
return MaskaFormattedMasks.PHONE_NUMBER;
|
||||||
},
|
},
|
||||||
offerWipers() {
|
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() {
|
wiperOfferPanel() {
|
||||||
const wiperImage = this.getCmsContent(this.widget.wiperOffer, widgetFields.CONTENT_GROUP_WIDGET.IMAGE);
|
const wiperImage = this.getCmsContent(this.widget.wiperOffer, widgetFields.CONTENT_GROUP_WIDGET.IMAGE);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue