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",
SUPPORTING_ITEMS: "SUPPORTING ITEMS",
GLASS_PARTS: "GLASS PARTS",
RAIN_DEFENSE: "RAIN DEFENSE",
RAIN_REPEL: "RAIN REPEL",
RECYCLE_FEE: "RECYCLE FEE",
REPLACE_FEE: "REPLACE FEE",
MOBILE_FEE: "MOBILE FEE",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,7 +21,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -48,7 +48,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -75,7 +75,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -102,7 +102,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -129,7 +129,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -156,7 +156,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -183,7 +183,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -210,7 +210,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -237,7 +237,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -264,7 +264,7 @@ export const mockProcessedCmsContent = {
HeaderText: "Premium service",
SubheaderText: "",
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: "",
FooterText: "",
},
@ -332,7 +332,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -362,7 +362,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -452,7 +452,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -482,7 +482,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -512,7 +512,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -532,7 +532,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -552,7 +552,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},
@ -572,7 +572,7 @@ export const expectedModifiedAnswers = {
buttonLabel: "Premium service",
buttonLabelSubCopy: "",
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",
buttonFooterCopy: "",
},

View file

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

View file

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

View file

@ -89,7 +89,7 @@ export default {
return (
lineItem.partType != partTypeStrings.FRONT_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;
},
async getRainDefense(context, { pageNameToLog }) {
async getRainRepel(context, { pageNameToLog }) {
const response = await globalMethods.callHttpClient({
method: endpoints.GetRainDefense.method,
endpoint: endpoints.GetRainDefense.url,
method: endpoints.GetRainRepel.method,
endpoint: endpoints.GetRainRepel.url,
logApiCall: true,
pageNameToLog: pageNameToLog,
});
@ -3024,7 +3024,7 @@ export const actions = {
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
// <lineItemsToUse> is an optional parameter if the lineItems in the store may not be up to date
async validateOrderPromoAndSaveServerData(

View file

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