CASH-1426

CASH-1426 change rain defense to rain repel to align with product type in promotions api
This commit is contained in:
CarlNation 2025-10-03 10:51:58 -04:00
parent 4972664405
commit 6f762dd97c
18 changed files with 87 additions and 86 deletions

View file

@ -3,7 +3,7 @@ const cartItemTypes = {
REAR_WIPERS: "REAR WIPERS", REAR_WIPERS: "REAR WIPERS",
SUPPORTING_ITEMS: "SUPPORTING ITEMS", SUPPORTING_ITEMS: "SUPPORTING ITEMS",
GLASS_PARTS: "GLASS PARTS", GLASS_PARTS: "GLASS PARTS",
RAIN_DEFENSE: "RAIN DEFENSE", RAIN_REPEL: "RAIN REPEL",
RECYCLE_FEE: "RECYCLE FEE", RECYCLE_FEE: "RECYCLE FEE",
REPLACE_FEE: "REPLACE FEE", REPLACE_FEE: "REPLACE FEE",
MOBILE_FEE: "MOBILE FEE", MOBILE_FEE: "MOBILE FEE",

View file

@ -64,8 +64,8 @@ const endpoints = {
url: "/parts/api/v1/parts/wipers", url: "/parts/api/v1/parts/wipers",
method: "GET", method: "GET",
}, },
GetRainDefense: { GetRainRepel: {
url: "/parts/api/v1/parts/rain-defense", url: "/parts/api/v1/parts/rain-repel",
method: "GET", method: "GET",
}, },
GetMobileFeePart: { GetMobileFeePart: {

View file

@ -1,7 +1,7 @@
const partTypeStrings = { const partTypeStrings = {
FRONT_WIPER: "FRONT WIPER", FRONT_WIPER: "FRONT WIPER",
REAR_WIPER: "REAR WIPER", REAR_WIPER: "REAR WIPER",
RAIN_DEFENSE: "RAIN DEFENSE", RAIN_REPEL: "RAIN REPEL",
ADAS_RECALIBRATION: "ADAS RECALIBRATION", ADAS_RECALIBRATION: "ADAS RECALIBRATION",
RECALIBRATION: "RECALIBRATION", RECALIBRATION: "RECALIBRATION",
REPLACE_FEE: "REPLACE FEE", REPLACE_FEE: "REPLACE FEE",

View file

@ -24,7 +24,7 @@ const storeActions = {
GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions", GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions",
GET_PARTS: "getParts", GET_PARTS: "getParts",
GET_WIPERS: "getWipers", GET_WIPERS: "getWipers",
GET_RAIN_DEFENSE: "getRainDefense", GET_RAIN_REPEL: "getRainRepel",
GET_SUPPORTING_ITEMS: "getSupportingItems", GET_SUPPORTING_ITEMS: "getSupportingItems",
GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions", GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions",
SUBMIT_DONATION_PART_TO_SV2: "submitDonationPartToSV2", SUBMIT_DONATION_PART_TO_SV2: "submitDonationPartToSV2",

View file

@ -444,8 +444,8 @@ export default {
cartItems.push(this.rearWipersCartItem); cartItems.push(this.rearWipersCartItem);
} }
if (this.rainDefenseCartItem) { if (this.rainRepelCartItem) {
cartItems.push(this.rainDefenseCartItem); cartItems.push(this.rainRepelCartItem);
} }
if (this.glassPartCartItems) { if (this.glassPartCartItems) {
@ -701,40 +701,40 @@ export default {
return cartItem; return cartItem;
}, },
rainDefenseCartItemName() { rainRepelCartItemName() {
return this.getCmsContentForVapsType(partTypeStrings.RAIN_DEFENSE); return this.getCmsContentForVapsType(partTypeStrings.RAIN_REPEL);
}, },
rainDefenseCartItem() { rainRepelCartItem() {
let cartItem = null; let cartItem = null;
const rainDefenseLineItem = this.vaps.find( const rainRepelLineItem = this.vaps.find(
(vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_DEFENSE (vapsLineItem) => vapsLineItem.partType == partTypeStrings.RAIN_REPEL
); );
if (rainDefenseLineItem) { if (rainRepelLineItem) {
cartItem = { cartItem = {
name: this.getCmsContentForVapsType(partTypeStrings.RAIN_DEFENSE), name: this.getCmsContentForVapsType(partTypeStrings.RAIN_REPEL),
category: cartItemCategories.VAPS, category: cartItemCategories.VAPS,
cartItemType: cartItemTypes.RAIN_DEFENSE, cartItemType: cartItemTypes.RAIN_REPEL,
isDisplayed: true, isDisplayed: true,
isRemovable: true, isRemovable: true,
subTotal: 0, subTotal: 0,
salesTax: 0, salesTax: 0,
lineItems: [], lineItems: [],
isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
cartItemTypes.RAIN_DEFENSE cartItemTypes.RAIN_REPEL
), ),
}; };
rainDefenseLineItem.cartItemType = cartItem.cartItemType; rainRepelLineItem.cartItemType = cartItem.cartItemType;
cartItem.lineItems.push(rainDefenseLineItem); cartItem.lineItems.push(rainRepelLineItem);
cartItem.subTotal += cartItem.subTotal +=
(rainDefenseLineItem.kitPrice ?? 0) + (rainRepelLineItem.kitPrice ?? 0) +
(rainDefenseLineItem.laborAmount ?? 0) + (rainRepelLineItem.laborAmount ?? 0) +
(rainDefenseLineItem.sellingPrice ?? 0); (rainRepelLineItem.sellingPrice ?? 0);
cartItem.salesTax += rainDefenseLineItem.salesTax ?? 0; cartItem.salesTax += rainRepelLineItem.salesTax ?? 0;
} }
return cartItem; return cartItem;

View file

@ -6,13 +6,13 @@ import baseMixin from "@/mixins/base-mixin.js";
export const promoPartNumberStrings = { export const promoPartNumberStrings = {
WIPER_DISCOUNT_PART_NUMBER: "WIPER DISCOUNT", WIPER_DISCOUNT_PART_NUMBER: "WIPER DISCOUNT",
RAIN_DEFENSE_DISCOUNT_PART_NUMBER: "DISC RAIN DEFEN", RAIN_REPEL_DISCOUNT_PART_NUMBER: "DISC RAIN REPEL",
GLASS_DISCOUNT_PART_NUMBER: "DISCOUNT", GLASS_DISCOUNT_PART_NUMBER: "DISCOUNT",
GLASS_CLEANER_DISCOUNT_PART_NUMBER: "DISC GLASS CLN", GLASS_CLEANER_DISCOUNT_PART_NUMBER: "DISC GLASS CLN",
}; };
export const addableVapsPromoPartNumbers = [ export const addableVapsPromoPartNumbers = [
promoPartNumberStrings.RAIN_DEFENSE_DISCOUNT_PART_NUMBER, promoPartNumberStrings.RAIN_REPEL_DISCOUNT_PART_NUMBER,
promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER, promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER,
]; ];
@ -76,7 +76,7 @@ export function getAddableVapsFromAvailableLineItems(availableLineItems) {
const addableVaps = []; const addableVaps = [];
addableVaps.push(...findLineItemsWithPartType(partTypeStrings.FRONT_WIPER, availableLineItems)); addableVaps.push(...findLineItemsWithPartType(partTypeStrings.FRONT_WIPER, availableLineItems));
addableVaps.push( addableVaps.push(
...findLineItemsWithPartType(partTypeStrings.RAIN_DEFENSE, availableLineItems) ...findLineItemsWithPartType(partTypeStrings.RAIN_REPEL, availableLineItems)
); );
return addableVaps; return addableVaps;
} }
@ -88,7 +88,7 @@ export function removeVapsPromosFromPromoArray(promoArray) {
const filteredPromoArray = promoArray.filter((promo) => { const filteredPromoArray = promoArray.filter((promo) => {
return ( return (
promo.partNumber != promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER && promo.partNumber != promoPartNumberStrings.WIPER_DISCOUNT_PART_NUMBER &&
promo.partNumber != promoPartNumberStrings.RAIN_DEFENSE_DISCOUNT_PART_NUMBER && promo.partNumber != promoPartNumberStrings.RAIN_REPEL_DISCOUNT_PART_NUMBER &&
promo.partNumber != promoPartNumberStrings.GLASS_CLEANER_DISCOUNT_PART_NUMBER promo.partNumber != promoPartNumberStrings.GLASS_CLEANER_DISCOUNT_PART_NUMBER
); );
}); });
@ -283,6 +283,7 @@ export function getVapsThatNeedToBeAddedToSatisfyPromos(
) { ) {
const clonedVaps = deepClone(lineItemsOnOrder?.vaps ?? []); const clonedVaps = deepClone(lineItemsOnOrder?.vaps ?? []);
const promosWithAddableVaps = getPromosWithAddableVaps(promos); const promosWithAddableVaps = getPromosWithAddableVaps(promos);
console.log(":::::::::::::" + JSON.stringify(promosWithAddableVaps));
if (promosWithAddableVaps.length) { if (promosWithAddableVaps.length) {
const matchingLineItems = getLineItemsThatMatchPromos( const matchingLineItems = getLineItemsThatMatchPromos(
promosWithAddableVaps, promosWithAddableVaps,

View file

@ -101,7 +101,7 @@ export function getPackageContents(glassToReplace, availableLineItems, isRepair,
} }
if (shouldRainDefenseBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) { if (shouldRainDefenseBeAvailable(glassToReplace, availableLineItems, isRepair, targetTier)) {
vaps.push(partTypeStrings.RAIN_DEFENSE); vaps.push(partTypeStrings.RAIN_REPEL);
} }
return vaps; return vaps;

View file

@ -173,8 +173,8 @@ export default {
"confirmation" "confirmation"
); );
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE, storeActions.GET_RAIN_REPEL,
null, null,
"confirmation" "confirmation"
); );
@ -190,13 +190,13 @@ export default {
promise: wipersPromise, promise: wipersPromise,
}, },
{ {
resultKey: "rainDefense", resultKey: "rainRepel",
promise: rainDefensePromise, promise: rainRepelPromise,
}, },
]; ];
const resultMap = await settleAllPromises(promiseResultMap); const resultMap = await settleAllPromises(promiseResultMap);
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers]; const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const lineItemsFromSubmittedOrder = deepClone(submittedOrder.lineItems); const lineItemsFromSubmittedOrder = deepClone(submittedOrder.lineItems);
const isNoComp = submittedOrder?.policy?.isNoComp; const isNoComp = submittedOrder?.policy?.isNoComp;

View file

@ -201,8 +201,8 @@ export default {
"payment-method" "payment-method"
); );
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE, storeActions.GET_RAIN_REPEL,
null, null,
"payment-method" "payment-method"
); );
@ -217,8 +217,8 @@ export default {
promise: wipersPromise, promise: wipersPromise,
}, },
{ {
resultKey: "rainDefense", resultKey: "rainRepel",
promise: rainDefensePromise, promise: rainRepelPromise,
}, },
]; ];
@ -229,7 +229,7 @@ export default {
const supportingItems = lineItemsFromStore.supportingItems ?? []; const supportingItems = lineItemsFromStore.supportingItems ?? [];
const vaps = lineItemsFromStore.vaps ?? []; const vaps = lineItemsFromStore.vaps ?? [];
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers]; const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const pricedAvailableVaps = await baseMixin.methods.dispatchStoreActionWithLogging( const pricedAvailableVaps = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA, storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,

View file

@ -40,8 +40,8 @@ export default {
}, },
"review" "review"
); );
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE, storeActions.GET_RAIN_REPEL,
null, null,
"review" "review"
); );
@ -52,15 +52,15 @@ export default {
promise: wipersPromise, promise: wipersPromise,
}, },
{ {
resultKey: "rainDefense", resultKey: "rainRepel",
promise: rainDefensePromise, promise: rainRepelPromise,
}, },
]; ];
return settleAllPromises(promiseResultMap); return settleAllPromises(promiseResultMap);
}, },
initializeComponent(apiResponses) { initializeComponent(apiResponses) {
const vapsFromApi = [...apiResponses.wipers, apiResponses.rainDefense]; const vapsFromApi = [...apiResponses.wipers, apiResponses.rainRepel];
this.availableVaps = vapsFromApi; this.availableVaps = vapsFromApi;
}, },

View file

@ -330,8 +330,8 @@ export default {
"payment" "payment"
); );
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE, storeActions.GET_RAIN_REPEL,
null, null,
"payment" "payment"
); );
@ -350,8 +350,8 @@ export default {
promise: wipersPromise, promise: wipersPromise,
}, },
{ {
resultKey: "rainDefense", resultKey: "rainRepel",
promise: rainDefensePromise, promise: rainRepelPromise,
}, },
]; ];
@ -361,12 +361,12 @@ export default {
const supportingItems = lineItemsFromStore.supportingItems ?? []; const supportingItems = lineItemsFromStore.supportingItems ?? [];
const lineItemsToTax = [ const lineItemsToTax = [
resultMap.rainDefense, resultMap.rainRepel,
...supportingItems, ...supportingItems,
...resultMap.wipers, ...resultMap.wipers,
...glassParts, ...glassParts,
]; ];
const availableVaps = [resultMap.rainDefense, ...resultMap.wipers]; const availableVaps = [resultMap.rainRepel, ...resultMap.wipers];
const pricedLineItemsToTax = await baseMixin.methods.dispatchStoreActionWithLogging( const pricedLineItemsToTax = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA, storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,

View file

@ -199,8 +199,8 @@ export default {
}, },
"quote" "quote"
); );
const rainDefensePromise = baseMixin.methods.dispatchStoreActionWithLogging( const rainRepelPromise = baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.GET_RAIN_DEFENSE, storeActions.GET_RAIN_REPEL,
null, null,
"quote" "quote"
); );
@ -275,8 +275,8 @@ export default {
promise: wipersPromise, promise: wipersPromise,
}, },
{ {
resultKey: "rainDefense", resultKey: "rainRepel",
promise: rainDefensePromise, promise: rainRepelPromise,
}, },
{ {
resultKey: "supportingItems", resultKey: "supportingItems",
@ -320,7 +320,7 @@ export default {
} }
} }
const availableLineItems = [ const availableLineItems = [
resultMap.rainDefense, resultMap.rainRepel,
...resultMap.supportingItems, ...resultMap.supportingItems,
...resultMap.wipers, ...resultMap.wipers,
...nullSafeGlassParts, ...nullSafeGlassParts,
@ -358,7 +358,7 @@ export default {
false false
); );
lineItems.supportingItems = resultMap.supportingItems; lineItems.supportingItems = resultMap.supportingItems;
const addableVaps = [...resultMap.wipers, resultMap.rainDefense]; const addableVaps = [...resultMap.wipers, resultMap.rainRepel];
// Promo logic // Promo logic
// Populate the previous state of promos for toast message usage in "next()" // Populate the previous state of promos for toast message usage in "next()"

View file

@ -21,7 +21,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -48,7 +48,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -75,7 +75,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -102,7 +102,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -129,7 +129,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -156,7 +156,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -183,7 +183,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -210,7 +210,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -237,7 +237,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -264,7 +264,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service", HeaderText: "Premium service",
SubheaderText: "", SubheaderText: "",
BodyText: BodyText:
"<ul><li>{if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainDefenseApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment{end}</li></ul>", "<ul><li>{if:custom:badCustomValue}DO NOT SHOW{end}New replacement windshield</li><li>Expert installation{if:custom:showRecalInServicePackages} and {textLink:EstimateRecalModal,recalibration}{end}</li><li>Nationwide lifetime warranty</li><li>{if:custom:frontWipersApplicableForTierThree}{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateFrontWiperModal,front wiper blades}{else}New {textLink:EstimateFrontWiperModal,wiper blades}{end}{end}</li><li>{if:custom:rearWiperApplicableForTierThree}New {textLink:EstimateRearWiperModal,rear wiper blade}{end}</li><li>{if:custom:rainRepelApplicableForTierThree}{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment{end}</li></ul>",
Image: "", Image: "",
FooterText: "", FooterText: "",
}, },
@ -332,7 +332,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>Expert windshield repair</li><li>Exclusive resin sealant</li><li>Nationwide lifetime guarantee</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$621.40", buttonAuxillaryCopy: "$621.40",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -362,7 +362,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation and {textLink:EstimateRecalModal,recalibration}</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement windshield</li><li>Expert installation and {textLink:EstimateRecalModal,recalibration}</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$621.40", buttonAuxillaryCopy: "$621.40",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -452,7 +452,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,front wiper blades}</li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,front wiper blades}</li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$495.88", buttonAuxillaryCopy: "$495.88",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -482,7 +482,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li>New {textLink:EstimateRearWiperModal,rear wiper blade}</li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$410.20", buttonAuxillaryCopy: "$410.20",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -512,7 +512,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$471.40", buttonAuxillaryCopy: "$471.40",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -532,7 +532,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement glass</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li>New {textLink:EstimateFrontWiperModal,wiper blades}</li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$471.40", buttonAuxillaryCopy: "$471.40",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -552,7 +552,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$385.72", buttonAuxillaryCopy: "$385.72",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },
@ -572,7 +572,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service", buttonLabel: "Premium service",
buttonLabelSubCopy: "", buttonLabelSubCopy: "",
buttonBodyCopy: buttonBodyCopy:
"<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Defense}&trade; treatment</li></ul>", "<ul><li>New replacement windshield</li><li>Expert installation</li><li>Nationwide lifetime warranty</li><li></li><li></li><li>{textLink:EstimateRainDefenseModal,Rain Repel}&trade; treatment</li></ul>",
buttonAuxillaryCopy: "$385.72", buttonAuxillaryCopy: "$385.72",
buttonFooterCopy: "", buttonFooterCopy: "",
}, },

View file

@ -212,7 +212,7 @@ export default {
packageNames.TIER_THREE packageNames.TIER_THREE
); );
}, },
rainDefenseApplicableForTierThree() { rainRepelApplicableForTierThree() {
return shouldRainDefenseBeAvailable( return shouldRainDefenseBeAvailable(
this.glassToReplace, this.glassToReplace,
this.nullSafeAvailableLineItems, this.nullSafeAvailableLineItems,
@ -429,8 +429,8 @@ export default {
return this.frontWipersApplicableForTierThree; return this.frontWipersApplicableForTierThree;
case "rearWiperApplicableForTierThree": case "rearWiperApplicableForTierThree":
return this.rearWiperApplicableForTierThree; return this.rearWiperApplicableForTierThree;
case "rainDefenseApplicableForTierThree": case "rainRepelApplicableForTierThree":
return this.rainDefenseApplicableForTierThree; return this.rainRepelApplicableForTierThree;
default: default:
return null; return null;
} }

View file

@ -576,8 +576,8 @@ export default {
lineItem.partType.indexOf("REAR WIPER") !== -1 lineItem.partType.indexOf("REAR WIPER") !== -1
); );
}); });
var rainDefense = vaps.filter(function (lineItem) { var rainRepel = vaps.filter(function (lineItem) {
return lineItem.partType.indexOf("RAIN DEFENSE") !== -1; return lineItem.partType.indexOf("RAIN REPEL") !== -1;
}); });
// Combine line items // Combine line items
@ -600,8 +600,8 @@ export default {
if (wipers) { if (wipers) {
combinedLineItems = combinedLineItems.concat(wipers); combinedLineItems = combinedLineItems.concat(wipers);
} }
if (rainDefense) { if (rainRepel) {
combinedLineItems = combinedLineItems.concat(rainDefense); combinedLineItems = combinedLineItems.concat(rainRepel);
} }
//Remove child Parts if any //Remove child Parts if any

View file

@ -89,7 +89,7 @@ export default {
return ( return (
lineItem.partType != partTypeStrings.FRONT_WIPER && lineItem.partType != partTypeStrings.FRONT_WIPER &&
lineItem.partType != partTypeStrings.REAR_WIPER && lineItem.partType != partTypeStrings.REAR_WIPER &&
lineItem.partType != partTypeStrings.RAIN_DEFENSE lineItem.partType != partTypeStrings.RAIN_REPEL
); );
}); });

View file

@ -1746,10 +1746,10 @@ export const actions = {
return response; return response;
}, },
async getRainDefense(context, { pageNameToLog }) { async getRainRepel(context, { pageNameToLog }) {
const response = await globalMethods.callHttpClient({ const response = await globalMethods.callHttpClient({
method: endpoints.GetRainDefense.method, method: endpoints.GetRainRepel.method,
endpoint: endpoints.GetRainDefense.url, endpoint: endpoints.GetRainRepel.url,
logApiCall: true, logApiCall: true,
pageNameToLog: pageNameToLog, pageNameToLog: pageNameToLog,
}); });
@ -3024,7 +3024,7 @@ export const actions = {
return pricedLineItems; return pricedLineItems;
}, },
// The <addableVaps> parameter is an array of ALL available front wipers and rain defense // The <addableVaps> parameter is an array of ALL available front wipers and Rain Repel
// for the vehicle. There is no need to confirm an addableVap is not already on the order // for the vehicle. There is no need to confirm an addableVap is not already on the order
// <lineItemsToUse> is an optional parameter if the lineItems in the store may not be up to date // <lineItemsToUse> is an optional parameter if the lineItems in the store may not be up to date
async validateOrderPromoAndSaveServerData( async validateOrderPromoAndSaveServerData(

View file

@ -123,8 +123,8 @@ $body-color: $gray-600;
//Fonts //Fonts
$font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif; $font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif;
$font-family-monospace: $font-family-monospace: UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; monospace;
// stylelint-enable value-keyword-case // stylelint-enable value-keyword-case
$font-family-base: $font-family-sans-serif; $font-family-base: $font-family-sans-serif;
$font-family-code: $font-family-monospace; $font-family-code: $font-family-monospace;