Merge branch 'CASH-403-desktop-footer-updates' of https://github.com/Safelite/DigitalConsumer.FixMyGlass into CASH-403-desktop-footer-updates
This commit is contained in:
commit
e2139cd07e
28 changed files with 493 additions and 122 deletions
|
|
@ -11,6 +11,7 @@ const cartItemTypes = {
|
||||||
EARLY_BIRD: "EARLY BIRD",
|
EARLY_BIRD: "EARLY BIRD",
|
||||||
SUPPLIES_REPAIR: "SUPPLIES-REPAIR",
|
SUPPLIES_REPAIR: "SUPPLIES-REPAIR",
|
||||||
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
|
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
|
||||||
|
DONATION: "DONATION",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { cartItemTypes };
|
export { cartItemTypes };
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ const experimentUniverses = {
|
||||||
CONCEPT_FUNNEL: "ConceptFunnel",
|
CONCEPT_FUNNEL: "ConceptFunnel",
|
||||||
RECAL_PRICE_REMOVAL: "NextGen_RecalPriceRemoval",
|
RECAL_PRICE_REMOVAL: "NextGen_RecalPriceRemoval",
|
||||||
MSR: "MSR",
|
MSR: "MSR",
|
||||||
|
IGQ_SkipQuote: "NextGen_IGQSkipToInsurance",
|
||||||
};
|
};
|
||||||
|
|
||||||
const experimentSettings = {
|
const experimentSettings = {
|
||||||
|
|
@ -22,6 +23,7 @@ const experimentSettings = {
|
||||||
WAITLIST_THRESHOLD_DAYS: "Waitlist_Threshold_Days",
|
WAITLIST_THRESHOLD_DAYS: "Waitlist_Threshold_Days",
|
||||||
PRICING_BY_DAY: "DisplayPricingByDay",
|
PRICING_BY_DAY: "DisplayPricingByDay",
|
||||||
FOSTER_LOVE: "DisplayFosterLove",
|
FOSTER_LOVE: "DisplayFosterLove",
|
||||||
|
SKIP_TO_INSURANCE: "SkipToInsurance",
|
||||||
};
|
};
|
||||||
|
|
||||||
const experimentTriggers = {
|
const experimentTriggers = {
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,9 @@ export const packageNames = {
|
||||||
TIER_TWO: "TierTwo",
|
TIER_TWO: "TierTwo",
|
||||||
TIER_THREE: "TierThree",
|
TIER_THREE: "TierThree",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const externalParamPackageLabels = {
|
||||||
|
GLASS_ONLY: "glassonly",
|
||||||
|
STANDARD: "standard",
|
||||||
|
PREMIUM: "premium",
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ const partNumberStrings = {
|
||||||
DONATION: "DONATION",
|
DONATION: "DONATION",
|
||||||
// Fees
|
// Fees
|
||||||
RECYCLE_FEE: "RECYCLE FEE",
|
RECYCLE_FEE: "RECYCLE FEE",
|
||||||
|
PRICING_BY_DAY_UPCHARGE: "PREMAPPT GEN",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { partNumberStrings };
|
export { partNumberStrings };
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ const partTypeStrings = {
|
||||||
REPAIR_FEE: "REPAIR FEE",
|
REPAIR_FEE: "REPAIR FEE",
|
||||||
EARLY_BIRD: "EARLY BIRD",
|
EARLY_BIRD: "EARLY BIRD",
|
||||||
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
|
SERVICE_PACKAGE_DISCOUNT: "SERVICE PACKAGE DISCOUNT",
|
||||||
|
DONATION: "DONATION",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { partTypeStrings };
|
export { partTypeStrings };
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ const PREMIUM_TIME_SLOT_ID_FLAG = "-PREMIUM";
|
||||||
|
|
||||||
const PREMIUM_FEE_PART_TYPE = "EARLY BIRD";
|
const PREMIUM_FEE_PART_TYPE = "EARLY BIRD";
|
||||||
|
|
||||||
// TODO; This will need updating with real PricingByDay part type
|
const PRICING_BY_DAY_PART_TYPE = "PREMAPPT GEN";
|
||||||
const PRICING_BY_DAY_PART_TYPE = "DISC CASHSAVE20";
|
|
||||||
|
|
||||||
const RouteCodeFlags = {
|
const RouteCodeFlags = {
|
||||||
ALL_DAY_DROP_OFF: "ALL DAY DROP OFF",
|
ALL_DAY_DROP_OFF: "ALL DAY DROP OFF",
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const storeActions = {
|
||||||
GET_RAIN_DEFENSE: "getRainDefense",
|
GET_RAIN_DEFENSE: "getRainDefense",
|
||||||
GET_SUPPORTING_ITEMS: "getSupportingItems",
|
GET_SUPPORTING_ITEMS: "getSupportingItems",
|
||||||
GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions",
|
GET_CAPABILITY_QUESTIONS: "getCapabilityQuestions",
|
||||||
|
SUBMIT_DONATION_PART_TO_SV2: "submitDonationPartToSV2",
|
||||||
GET_PART_FROM_CAPABILITY_QUESTION_ANSWER: "getPartFromCapabilityQuestionAnswer",
|
GET_PART_FROM_CAPABILITY_QUESTION_ANSWER: "getPartFromCapabilityQuestionAnswer",
|
||||||
GET_MOLDING_QUESTIONS: "getMoldingQuestions",
|
GET_MOLDING_QUESTIONS: "getMoldingQuestions",
|
||||||
GET_MOBILE_FEE_PART: "getMobileFeePart",
|
GET_MOBILE_FEE_PART: "getMobileFeePart",
|
||||||
|
|
|
||||||
|
|
@ -26,43 +26,36 @@ const DAYS_OF_WEEK = [
|
||||||
{
|
{
|
||||||
label: "Sunday",
|
label: "Sunday",
|
||||||
cssClass: "sunday",
|
cssClass: "sunday",
|
||||||
index: 0,
|
isPricingByDayUpchargeDay: true,
|
||||||
isPricingByDayUpchargeDay: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Monday",
|
label: "Monday",
|
||||||
cssClass: "monday",
|
cssClass: "monday",
|
||||||
index: 1,
|
|
||||||
isPricingByDayUpchargeDay: true,
|
isPricingByDayUpchargeDay: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Tuesday",
|
label: "Tuesday",
|
||||||
cssClass: "tuesday",
|
cssClass: "tuesday",
|
||||||
index: 2,
|
|
||||||
isPricingByDayUpchargeDay: false,
|
isPricingByDayUpchargeDay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Wednesday",
|
label: "Wednesday",
|
||||||
cssClass: "wednesday",
|
cssClass: "wednesday",
|
||||||
index: 3,
|
|
||||||
isPricingByDayUpchargeDay: false,
|
isPricingByDayUpchargeDay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Thursday",
|
label: "Thursday",
|
||||||
cssClass: "thursday",
|
cssClass: "thursday",
|
||||||
index: 4,
|
|
||||||
isPricingByDayUpchargeDay: false,
|
isPricingByDayUpchargeDay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Friday",
|
label: "Friday",
|
||||||
cssClass: "friday",
|
cssClass: "friday",
|
||||||
index: 5,
|
|
||||||
isPricingByDayUpchargeDay: true,
|
isPricingByDayUpchargeDay: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Saturday",
|
label: "Saturday",
|
||||||
cssClass: "saturday",
|
cssClass: "saturday",
|
||||||
index: 6,
|
|
||||||
isPricingByDayUpchargeDay: true,
|
isPricingByDayUpchargeDay: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="date-picker text-center" :class="`${calendarViewDirection} ${isPricingByDayClass}`">
|
<div
|
||||||
|
class="date-picker text-center"
|
||||||
|
:class="`${calendarViewDirection} ${isPricingByDayClass} ${showPricingByDayClass}`">
|
||||||
<fieldset id="date-picker-fieldset" ref="datePickerFieldset">
|
<fieldset id="date-picker-fieldset" ref="datePickerFieldset">
|
||||||
<legend class="sr-only">Select a day and time</legend>
|
<legend class="sr-only">Select a day and time</legend>
|
||||||
<div
|
<div
|
||||||
|
|
@ -60,6 +62,7 @@
|
||||||
date.dateNum === 1 ? 'first-day-' + month.startDateDayIndex : '',
|
date.dateNum === 1 ? 'first-day-' + month.startDateDayIndex : '',
|
||||||
date.dayClasses,
|
date.dayClasses,
|
||||||
date.isSelectable ? 'selectable-day' : '',
|
date.isSelectable ? 'selectable-day' : '',
|
||||||
|
date.isPricingByDayUpchargeDay ? 'upch-day' : '',
|
||||||
]">
|
]">
|
||||||
<input
|
<input
|
||||||
:disabled="!date.isSelectable"
|
:disabled="!date.isSelectable"
|
||||||
|
|
@ -220,6 +223,9 @@ export default {
|
||||||
isPricingByDayClass() {
|
isPricingByDayClass() {
|
||||||
return this.isPricingByDayExperiment ? "pricing-by-day" : "";
|
return this.isPricingByDayExperiment ? "pricing-by-day" : "";
|
||||||
},
|
},
|
||||||
|
showPricingByDayClass() {
|
||||||
|
return this.showPricingByDay ? "show-pricing-by-day" : "";
|
||||||
|
},
|
||||||
selectedDate: {
|
selectedDate: {
|
||||||
get() {
|
get() {
|
||||||
return this.modelValue;
|
return this.modelValue;
|
||||||
|
|
@ -1143,8 +1149,8 @@ export default {
|
||||||
label {
|
label {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
border: none;
|
border: none;
|
||||||
min-width: initial;
|
min-width: 100%;
|
||||||
width: initial;
|
width: 100%;
|
||||||
height: -webkit-fill-available;
|
height: -webkit-fill-available;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -1163,6 +1169,35 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.date-picker.show-pricing-by-day {
|
||||||
|
.radio-wrapper {
|
||||||
|
&.selectable-day label span {
|
||||||
|
text-decoration: none;
|
||||||
|
color: $gray-600;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: "AvertaSemibold";
|
||||||
|
|
||||||
|
&.price {
|
||||||
|
color: $green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.upch-day label span.price {
|
||||||
|
color: $gray-600;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: $font-family-sans-serif;
|
||||||
|
}
|
||||||
|
input[type="radio"] {
|
||||||
|
&:focus + label,
|
||||||
|
&:checked:focus + label {
|
||||||
|
color: $gray-600;
|
||||||
|
}
|
||||||
|
&:checked + label {
|
||||||
|
color: $blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-link {
|
.btn-link {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button
|
<button
|
||||||
class="btn btn-secondary w-100 mb-2"
|
class="btn btn-secondary w-100 mb-2"
|
||||||
v-html="DonationAddButtonWidget"></button>
|
v-html="DonationAddButtonCopy"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
DonationBodySubText() {
|
DonationBodySubText() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "BodyText2");
|
return this.getCmsContent(this.cmsWidgetName, "BodyText2");
|
||||||
},
|
},
|
||||||
DonationAddButtonWidget() {
|
DonationAddButtonCopy() {
|
||||||
return this.getCmsContent("DonationAddButtonWidget", "Text");
|
return this.getCmsContent("DonationAddButtonWidget", "Text");
|
||||||
},
|
},
|
||||||
DonationThanksAlertWidget() {
|
DonationThanksAlertWidget() {
|
||||||
|
|
@ -126,6 +126,7 @@ export default {
|
||||||
},
|
},
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
this.$emit("update:modelValue", newValue);
|
this.$emit("update:modelValue", newValue);
|
||||||
|
this.$emit("DonationAddedEvent");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,9 @@ export default {
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
...(this.lineItems.glassParts ?? []),
|
...(this.lineItems.glassParts ?? []),
|
||||||
...(this.lineItems.supportingItems ?? []),
|
...(this.lineItems.supportingItems.filter(
|
||||||
|
(item) => item.partType !== partTypeStrings.DONATION
|
||||||
|
) ?? []),
|
||||||
...(this.availableVaps ?? []),
|
...(this.availableVaps ?? []),
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
@ -466,6 +468,10 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.donationCartItem) {
|
||||||
|
cartItems.push(this.donationCartItem);
|
||||||
|
}
|
||||||
|
|
||||||
return cartItems;
|
return cartItems;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1064,6 +1070,46 @@ export default {
|
||||||
|
|
||||||
return promoCartItems;
|
return promoCartItems;
|
||||||
},
|
},
|
||||||
|
showDonationCartItem() {
|
||||||
|
const donationLineItem = this.lineItems.supportingItems.find(
|
||||||
|
(item) => item.partType === partTypeStrings.DONATION
|
||||||
|
);
|
||||||
|
if (donationLineItem?.sellingPrice !== 0) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
donationCartItemName() {
|
||||||
|
return this.getCmsContent("DonationCartTextWidget", "Text");
|
||||||
|
},
|
||||||
|
donationCartItem() {
|
||||||
|
if (!this.lineItems || !this.lineItems.supportingItems) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const donationLineItem = this.lineItems.supportingItems.find(
|
||||||
|
(item) => item.partType === partTypeStrings.DONATION
|
||||||
|
);
|
||||||
|
|
||||||
|
if (donationLineItem?.sellingPrice > 0) {
|
||||||
|
return {
|
||||||
|
name: this.donationCartItemName,
|
||||||
|
category: cartItemCategories.SUPPORTING_ITEMS,
|
||||||
|
cartItemType: cartItemTypes.DONATION,
|
||||||
|
isDisplayed: true,
|
||||||
|
isRemovable: false,
|
||||||
|
subTotal: donationLineItem.sellingPrice,
|
||||||
|
salesTax: 0,
|
||||||
|
lineItems: [],
|
||||||
|
isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
|
||||||
|
cartItemTypes.DONATION
|
||||||
|
),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
},
|
||||||
removeLinkText() {
|
removeLinkText() {
|
||||||
return this.getCmsContent("RemoveCartItemTextWidget", "Text");
|
return this.getCmsContent("RemoveCartItemTextWidget", "Text");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,10 @@
|
||||||
alt="Your privacy choices" />
|
alt="Your privacy choices" />
|
||||||
</template>
|
</template>
|
||||||
</textLink>
|
</textLink>
|
||||||
|
<textLink
|
||||||
|
linkType="navigation"
|
||||||
|
text="Cookie preferences"
|
||||||
|
href="javascript:OneTrust.ToggleInfoDisplay();" />
|
||||||
<textLink
|
<textLink
|
||||||
linkType="newWindowLink"
|
linkType="newWindowLink"
|
||||||
text="Warranty"
|
text="Warranty"
|
||||||
|
|
@ -173,6 +177,9 @@ export default {
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.5rem;
|
||||||
}
|
}
|
||||||
|
:deep(.navigation-link) {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.modal-fullscreen {
|
.modal-fullscreen {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { partTypeStrings } from "@/constants/part-type-strings";
|
import { partTypeStrings } from "@/constants/part-type-strings";
|
||||||
import { damageLocationsSelected as glassLocations } from "@/constants/damage-locations-selected";
|
import { damageLocationsSelected as glassLocations } from "@/constants/damage-locations-selected";
|
||||||
import { packageNames } from "@/constants/package-names";
|
import { packageNames, externalParamPackageLabels } from "@/constants/package-names";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import { getItemsWithoutRecalParts } from "@/helpers/recal-helper";
|
import { getItemsWithoutRecalParts } from "@/helpers/recal-helper";
|
||||||
import {
|
import {
|
||||||
|
|
@ -238,9 +238,9 @@ export function getHighestFullySatisfiedTier(glassToReplace, availableLineItems,
|
||||||
|
|
||||||
export function getPackageNameByType(packageType) {
|
export function getPackageNameByType(packageType) {
|
||||||
const package_names = {
|
const package_names = {
|
||||||
glassonly: packageNames.TIER_ONE,
|
[externalParamPackageLabels.GLASS_ONLY]: packageNames.TIER_ONE,
|
||||||
standard: packageNames.TIER_TWO,
|
[externalParamPackageLabels.STANDARD]: packageNames.TIER_TWO,
|
||||||
premium: packageNames.TIER_THREE,
|
[externalParamPackageLabels.PREMIUM]: packageNames.TIER_THREE,
|
||||||
};
|
};
|
||||||
return package_names[packageType] || null;
|
return package_names[packageType] || null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,9 @@
|
||||||
:isExpandedOnLoad="false"
|
:isExpandedOnLoad="false"
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp"
|
:isNoComp="isNoComp"
|
||||||
:isMSRFeeApplicable="isMSRFeeApplicable" />
|
:isMSRFeeApplicable="isMSRFeeApplicable"
|
||||||
|
:donationAmount="donationAmount"
|
||||||
|
@update-donation-amount="updateDonationAmount" />
|
||||||
|
|
||||||
<div class="mt-3" v-if="DisplayFosterLove">
|
<div class="mt-3" v-if="DisplayFosterLove">
|
||||||
<donationBlock
|
<donationBlock
|
||||||
|
|
@ -71,7 +73,8 @@
|
||||||
v-model="donationAmount"
|
v-model="donationAmount"
|
||||||
:donationValues="donationValues"
|
:donationValues="donationValues"
|
||||||
:showDonationSuccess="showDonationSuccess"
|
:showDonationSuccess="showDonationSuccess"
|
||||||
:showDonationError="showDonationError" />
|
:showDonationError="showDonationError"
|
||||||
|
@DonationAddedEvent="addDonationToOrder" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="mb-5" />
|
<hr class="mb-5" />
|
||||||
|
|
@ -522,49 +525,29 @@ export default {
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
window.location.assign(location.protocol + "//" + location.host);
|
window.location.assign(location.protocol + "//" + location.host);
|
||||||
},
|
},
|
||||||
async addDonation(amount, plateTemp) {
|
async addDonationToOrder() {
|
||||||
// try to call API to add donation to order
|
const donationResponse = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
storeActions.SUBMIT_DONATION_PART_TO_SV2,
|
||||||
// TEMP DUMMY CALL TO SIMULATE SUCCESS OR ERROR FROM API CALL
|
{
|
||||||
// TO BE REPLACED BY REAL CALL LATER
|
donationAmount: parseInt(this.donationAmount),
|
||||||
const donationResponse = await this.dispatchStoreActionWithLogging(
|
submittedOrder: this.submittedOrder,
|
||||||
storeActions.LOOKUP_VIN_BY_PLATE,
|
},
|
||||||
{ licensePlate: plateTemp, licenseState: "OH" },
|
|
||||||
"test",
|
|
||||||
false
|
false
|
||||||
).catch((error) => {
|
);
|
||||||
return error;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (donationResponse?.status == "200") {
|
if (donationResponse?.wasSuccessful) {
|
||||||
this.showDonationSuccess = true;
|
this.showDonationSuccess = true;
|
||||||
this.showDonationError = false;
|
this.showDonationError = false;
|
||||||
const donationResponse = await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.ADD_DONATION_TO_SUBMITTED_ORDER,
|
storeActions.ADD_DONATION_TO_SUBMITTED_ORDER,
|
||||||
amount,
|
parseInt(this.donationAmount),
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
this.lineItems = deepClone(this.getSubmittedOrder().lineItems);
|
||||||
} else {
|
} else {
|
||||||
this.showDonationError = true;
|
this.showDonationError = true;
|
||||||
this.showDonationSuccess = false;
|
this.showDonationSuccess = false;
|
||||||
const donationResponse = await baseMixin.methods.dispatchStoreAction(
|
this.donationAmount = 0;
|
||||||
storeActions.ADD_DONATION_TO_SUBMITTED_ORDER,
|
|
||||||
0,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
donationAmount(newValue) {
|
|
||||||
newValue = parseInt(newValue);
|
|
||||||
|
|
||||||
// this.addDonation(newValue);
|
|
||||||
// TODO - when backend code is final, then remove the below and restore the line above
|
|
||||||
if (newValue === 5) {
|
|
||||||
this.addDonation(newValue, "FAILING_PLATE"); // throws error
|
|
||||||
} else {
|
|
||||||
this.addDonation(newValue, "2fast"); // should give successful response
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -836,6 +836,7 @@ describe("quote.vue", () => {
|
||||||
nextFunction
|
nextFunction
|
||||||
);
|
);
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
await nextTick();
|
||||||
expect(nextFunction).toHaveBeenCalled();
|
expect(nextFunction).toHaveBeenCalled();
|
||||||
expect(baseMixin.methods.isFormValid).toHaveBeenCalled();
|
expect(baseMixin.methods.isFormValid).toHaveBeenCalled();
|
||||||
expect(baseMixin.methods.isFormValid()).toBe(true);
|
expect(baseMixin.methods.isFormValid()).toBe(true);
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ import { storeActions } from "@/constants/store-actions";
|
||||||
import { deepClone } from "@/helpers/object-helper";
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { experimentSettings } from "@/constants/experiments";
|
import { experimentSettings, experimentUniverses } from "@/constants/experiments";
|
||||||
import { required } from "@/helpers/validation-rules";
|
import { required } from "@/helpers/validation-rules";
|
||||||
import { errorMessages } from "@/constants/error-messages";
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
import { Form, defineRule } from "vee-validate";
|
import { Form, defineRule } from "vee-validate";
|
||||||
|
|
@ -154,12 +154,18 @@ import {
|
||||||
findLineItemsWithPartType,
|
findLineItemsWithPartType,
|
||||||
} from "@/helpers/service-package-helper";
|
} from "@/helpers/service-package-helper";
|
||||||
import { nextTick } from "vue";
|
import { nextTick } from "vue";
|
||||||
import { packageNames } from "@/constants/package-names";
|
import { packageNames, externalParamPackageLabels } from "@/constants/package-names";
|
||||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
import { containsRecalParts } from "@/helpers/recal-helper";
|
import { containsRecalParts } from "@/helpers/recal-helper";
|
||||||
import { externalParameterStatus } from "@/constants/external-parameters";
|
import { externalParameterStatus } from "@/constants/external-parameters";
|
||||||
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
import { saveQuote } from "@/helpers/heritage-integration/order-helper.js";
|
||||||
import { getBoolFromString } from "@/helpers/boolean-helper";
|
import { getBoolFromString } from "@/helpers/boolean-helper";
|
||||||
|
import {
|
||||||
|
getSessionKeyValue,
|
||||||
|
getUserIdValue,
|
||||||
|
getDeviceIdValue,
|
||||||
|
} from "@/helpers/heritage-integration/cookie-helper";
|
||||||
|
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
||||||
|
|
||||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
||||||
|
|
@ -189,6 +195,31 @@ export default {
|
||||||
"quote"
|
"quote"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const shouldExposeSkipQuote = store.getters.isRecalibrationOnOrder;
|
||||||
|
const skipQuoteExperiment = store.getters.applicationUser.experiments.find(
|
||||||
|
(e) => e.universeName === experimentUniverses.IGQ_SkipQuote
|
||||||
|
);
|
||||||
|
const hasExposedSkipQuote = skipQuoteExperiment?.isExposed;
|
||||||
|
|
||||||
|
const shouldSendExposeRequest =
|
||||||
|
shouldExposeSkipQuote && !hasExposedSkipQuote && skipQuoteExperiment;
|
||||||
|
|
||||||
|
if (shouldSendExposeRequest) {
|
||||||
|
// Don't await -- response is not needed so can fire fully asynchronously.
|
||||||
|
baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
storeActions.LOG_EXPERIMENT_EXPOSURE_AND_UPDATE_STORE,
|
||||||
|
{
|
||||||
|
userId: getUserIdValue(),
|
||||||
|
deviceId: getDeviceIdValue(),
|
||||||
|
sessionKey: getSessionKeyValue(),
|
||||||
|
pageName: to.query.fmgPage,
|
||||||
|
experiment: skipQuoteExperiment,
|
||||||
|
},
|
||||||
|
"quote",
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
resultKey: "cmsContent",
|
resultKey: "cmsContent",
|
||||||
|
|
@ -213,6 +244,12 @@ export default {
|
||||||
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
||||||
const showSaveProgressPopup = isEmailInStoreOnPageLoad ? false : true;
|
const showSaveProgressPopup = isEmailInStoreOnPageLoad ? false : true;
|
||||||
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
|
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
|
||||||
|
const shouldSkipToInsurance =
|
||||||
|
getBoolFromString(
|
||||||
|
experimentMixin.methods.getSettingValue(experimentSettings.SKIP_TO_INSURANCE)
|
||||||
|
) &&
|
||||||
|
shouldExposeSkipQuote &&
|
||||||
|
!hasExposedSkipQuote;
|
||||||
|
|
||||||
const lineItems = deepClone(store.getters.order.lineItems);
|
const lineItems = deepClone(store.getters.order.lineItems);
|
||||||
lineItems.vaps = lineItems.vaps ?? [];
|
lineItems.vaps = lineItems.vaps ?? [];
|
||||||
|
|
@ -302,6 +339,7 @@ export default {
|
||||||
vm.availableLineItems = pricingResults;
|
vm.availableLineItems = pricingResults;
|
||||||
vm.holdParentAccountNumber = holdParentAccountNumber;
|
vm.holdParentAccountNumber = holdParentAccountNumber;
|
||||||
vm.holdBillToAccountNumber = holdBillToAccountNumber;
|
vm.holdBillToAccountNumber = holdBillToAccountNumber;
|
||||||
|
vm.skipToInsurance = shouldSkipToInsurance;
|
||||||
|
|
||||||
if (revalidatePromoResponse) {
|
if (revalidatePromoResponse) {
|
||||||
const revalidateAlerts = buildToastMessagesFromRevalidateOrValidatePromoResponse(
|
const revalidateAlerts = buildToastMessagesFromRevalidateOrValidatePromoResponse(
|
||||||
|
|
@ -434,21 +472,16 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// did user intentionally select insurance?
|
const insuranceSelection = true;
|
||||||
vm.isInsuranceSelected = true;
|
const servicePackage = store.getters.externalParameterQuote.servicePackage;
|
||||||
vm.servicePackage = store.getters.externalParameterQuote.servicePackage;
|
|
||||||
await nextTick();
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
vm.servicePackage != null &&
|
servicePackage != null &&
|
||||||
isExternalParameter === externalParameterStatus.ACTIVE
|
isExternalParameter === externalParameterStatus.ACTIVE
|
||||||
) {
|
) {
|
||||||
const isValid = await baseMixin.methods.isFormValid(vm.$refs.theForm);
|
await vm.skip(insuranceSelection, servicePackage);
|
||||||
if (isValid) {
|
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
|
||||||
vm.forwardButtonAction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||||
} else {
|
} else {
|
||||||
if (externalThreshold) thresholdToUse = externalThreshold;
|
if (externalThreshold) thresholdToUse = externalThreshold;
|
||||||
|
|
@ -467,6 +500,11 @@ export default {
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.skipToInsurance && !vm.showSaveProgressPopup) {
|
||||||
|
// skip ahead only if no email popup.
|
||||||
|
await vm.skip(true, externalParamPackageLabels.GLASS_ONLY);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -482,6 +520,7 @@ export default {
|
||||||
showSaveProgressModal: null,
|
showSaveProgressModal: null,
|
||||||
isSaveProgressComplete: null,
|
isSaveProgressComplete: null,
|
||||||
packageNumber: null,
|
packageNumber: null,
|
||||||
|
skipToInsurance: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -584,8 +623,13 @@ export default {
|
||||||
updateSaveProgressAsSaved() {
|
updateSaveProgressAsSaved() {
|
||||||
this.showSaveProgressModal = false;
|
this.showSaveProgressModal = false;
|
||||||
},
|
},
|
||||||
closeSaveProgressPopup() {
|
async closeSaveProgressPopup() {
|
||||||
this.showSaveProgressPopup = false;
|
this.showSaveProgressPopup = false;
|
||||||
|
|
||||||
|
if (this.skipToInsurance) {
|
||||||
|
// skip ahead now if in IGQ skip experiment
|
||||||
|
await this.skip(true, externalParamPackageLabels.GLASS_ONLY);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
|
|
@ -729,6 +773,20 @@ export default {
|
||||||
this.pushEventToGA("quote", this.GaActions.SERVICE_PACKAGE_PRICE, eventLabel, true);
|
this.pushEventToGA("quote", this.GaActions.SERVICE_PACKAGE_PRICE, eventLabel, true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
async skip(insuranceSelection, packageSelection) {
|
||||||
|
this.isInsuranceSelected = insuranceSelection;
|
||||||
|
this.servicePackage = packageSelection;
|
||||||
|
|
||||||
|
// Allow selections to filter through sub-logic
|
||||||
|
await nextTick();
|
||||||
|
await nextTick();
|
||||||
|
|
||||||
|
const isValid = await baseMixin.methods.isFormValid(this.$refs.theForm);
|
||||||
|
if (isValid) {
|
||||||
|
showFmgLoadingModal(true);
|
||||||
|
await this.forwardButtonAction();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
lineItemsCloneForWatcher: {
|
lineItemsCloneForWatcher: {
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,11 @@ export default {
|
||||||
|
|
||||||
this.$emit("servicePackageDiscountSelected", supportingItems);
|
this.$emit("servicePackageDiscountSelected", supportingItems);
|
||||||
},
|
},
|
||||||
|
servicePackage(newValue) {
|
||||||
|
if (newValue !== null) {
|
||||||
|
this.selectDefaultPackage();
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
nullSafeAvailableLineItems() {
|
nullSafeAvailableLineItems() {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
:estimatedServiceMinutesMaximum="
|
:estimatedServiceMinutesMaximum="
|
||||||
selectableDatesData.estimatedServiceMinutesMaximum
|
selectableDatesData.estimatedServiceMinutesMaximum
|
||||||
"
|
"
|
||||||
@waitListRequested-emitted="handleWaitListRequested"
|
@waitListRequested="handleWaitListRequested"
|
||||||
@time-slot-modal-closed="timeSlotModalClosed"
|
@time-slot-modal-closed="timeSlotModalClosed"
|
||||||
validationRules="time-slot-selection-required"
|
validationRules="time-slot-selection-required"
|
||||||
@TimeSlotSelected="forwardButtonAction" />
|
@TimeSlotSelected="forwardButtonAction" />
|
||||||
|
|
@ -250,9 +250,15 @@ export default {
|
||||||
isRecalibrationOnOrder && shouldHideRecalibration
|
isRecalibrationOnOrder && shouldHideRecalibration
|
||||||
? getItemsWithoutRecalParts(lineItems.glassParts)
|
? getItemsWithoutRecalParts(lineItems.glassParts)
|
||||||
: (lineItems.glassParts ?? []);
|
: (lineItems.glassParts ?? []);
|
||||||
|
const supportingItemsFromStore = lineItems?.supportingItems;
|
||||||
const supportingItemsWithoutFees = baseMixin.methods.filterOutCertainPartTypesOrNumbers(
|
const supportingItemsWithoutFees = baseMixin.methods.filterOutCertainPartTypesOrNumbers(
|
||||||
lineItems.supportingItems,
|
lineItems.supportingItems,
|
||||||
{ partNumbersToRemove: [partNumberStrings.RECYCLE_FEE] }
|
{
|
||||||
|
partNumbersToRemove: [
|
||||||
|
partNumberStrings.RECYCLE_FEE,
|
||||||
|
partNumberStrings.PRICING_BY_DAY_UPCHARGE,
|
||||||
|
],
|
||||||
|
}
|
||||||
);
|
);
|
||||||
const lineItemsToBePriced = {
|
const lineItemsToBePriced = {
|
||||||
glassParts: glassParts,
|
glassParts: glassParts,
|
||||||
|
|
@ -266,8 +272,8 @@ export default {
|
||||||
|
|
||||||
// Check to see if includePricingByDayUpcharge should already be set (based on order lineItems)
|
// Check to see if includePricingByDayUpcharge should already be set (based on order lineItems)
|
||||||
let includePricingByDayUpcharge = false;
|
let includePricingByDayUpcharge = false;
|
||||||
if (supportingItemsWithoutFees) {
|
if (supportingItemsFromStore) {
|
||||||
const pricingByDayUpchargeFeeIndex = supportingItemsWithoutFees.findIndex(
|
const pricingByDayUpchargeFeeIndex = supportingItemsFromStore?.findIndex(
|
||||||
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
||||||
);
|
);
|
||||||
if (pricingByDayUpchargeFeeIndex > -1) {
|
if (pricingByDayUpchargeFeeIndex > -1) {
|
||||||
|
|
@ -300,7 +306,9 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get pricingByDayUpcharge needed for Pricing By Day
|
// Get pricingByDayUpcharge needed for Pricing By Day
|
||||||
const pricingByDayUpchargePartPromise = getPricingByDayPartWithPrice();
|
const pricingByDayUpchargePartPromise = showPricingByDay
|
||||||
|
? getPricingByDayPartWithPrice()
|
||||||
|
: null;
|
||||||
|
|
||||||
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
const premiumFeePromise = baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
storeActions.GET_MOBILE_PREMIUM_FEE,
|
storeActions.GET_MOBILE_PREMIUM_FEE,
|
||||||
|
|
@ -348,10 +356,12 @@ export default {
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
|
||||||
const pricingByDayUpcharge = await baseMixin.methods.getTotalLineItemPrice(
|
const pricingByDayUpcharge = showPricingByDay
|
||||||
resultMap.pricingByDayUpchargePart,
|
? await baseMixin.methods.getTotalLineItemPrice(
|
||||||
false
|
resultMap.pricingByDayUpchargePart,
|
||||||
);
|
false
|
||||||
|
)
|
||||||
|
: null;
|
||||||
|
|
||||||
const datePickerInitialData = resultMap.datePickerInitialData;
|
const datePickerInitialData = resultMap.datePickerInitialData;
|
||||||
datePickerInitialData.pricingByDayBasePrice = pricingByDayBasePrice;
|
datePickerInitialData.pricingByDayBasePrice = pricingByDayBasePrice;
|
||||||
|
|
@ -620,24 +630,26 @@ export default {
|
||||||
const supportingItems = this.getSupportingItems();
|
const supportingItems = this.getSupportingItems();
|
||||||
|
|
||||||
// if we have a pricing by day upcharge, then save/update supporting items with it
|
// if we have a pricing by day upcharge, then save/update supporting items with it
|
||||||
const pricingByDayUpchargeFeeIndex = supportingItems?.findIndex(
|
if (this.showPricingByDay) {
|
||||||
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
const pricingByDayUpchargeFeeIndex = supportingItems?.findIndex(
|
||||||
);
|
(item) => item.partType == PRICING_BY_DAY_PART_TYPE
|
||||||
|
);
|
||||||
|
|
||||||
if (this.includePricingByDayUpcharge) {
|
if (this.includePricingByDayUpcharge) {
|
||||||
if (pricingByDayUpchargeFeeIndex > -1) {
|
if (pricingByDayUpchargeFeeIndex > -1) {
|
||||||
supportingItems[pricingByDayUpchargeFeeIndex].laborAmount =
|
supportingItems[pricingByDayUpchargeFeeIndex].laborAmount =
|
||||||
this.pricingByDayUpchargeLineItem.laborAmount;
|
this.pricingByDayUpchargeLineItem.laborAmount;
|
||||||
supportingItems[pricingByDayUpchargeFeeIndex].sellingPrice =
|
supportingItems[pricingByDayUpchargeFeeIndex].sellingPrice =
|
||||||
this.pricingByDayUpchargeLineItem.sellingPrice;
|
this.pricingByDayUpchargeLineItem.sellingPrice;
|
||||||
supportingItems[pricingByDayUpchargeFeeIndex].kitPrice =
|
supportingItems[pricingByDayUpchargeFeeIndex].kitPrice =
|
||||||
this.pricingByDayUpchargeLineItem.kitPrice;
|
this.pricingByDayUpchargeLineItem.kitPrice;
|
||||||
|
} else {
|
||||||
|
supportingItems.push(this.pricingByDayUpchargeLineItem);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
supportingItems.push(this.pricingByDayUpchargeLineItem);
|
if (pricingByDayUpchargeFeeIndex >= 0) {
|
||||||
}
|
supportingItems.splice(pricingByDayUpchargeFeeIndex, 1);
|
||||||
} else {
|
}
|
||||||
if (pricingByDayUpchargeFeeIndex >= 0) {
|
|
||||||
supportingItems.splice(pricingByDayUpchargeFeeIndex, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@
|
||||||
v-if="waitListRequested"
|
v-if="waitListRequested"
|
||||||
class="mt-5 rounded waitlist-success"
|
class="mt-5 rounded waitlist-success"
|
||||||
ref="waitlistSuccessMessage">
|
ref="waitlistSuccessMessage">
|
||||||
<img :src="WaitListSuccessImage" class="success-image" />
|
<img :src="waitListSuccessImage" class="success-image" />
|
||||||
<span v-html="WaitListSuccessText" class="success-text"></span>
|
<span v-html="waitListSuccessText" class="success-text"></span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="mt-5 mb-2 supplemental-information"
|
class="mt-5 mb-2 supplemental-information"
|
||||||
|
|
@ -366,10 +366,10 @@ export default {
|
||||||
displayWaitListFeature() {
|
displayWaitListFeature() {
|
||||||
return this.displayWaitList;
|
return this.displayWaitList;
|
||||||
},
|
},
|
||||||
WaitListSuccessImage() {
|
waitListSuccessImage() {
|
||||||
return this.getCmsContent("WaitListSuccessWidget", "Image");
|
return this.getCmsContent("WaitListSuccessWidget", "Image");
|
||||||
},
|
},
|
||||||
WaitListSuccessText() {
|
waitListSuccessText() {
|
||||||
return this.getCmsContent("WaitListSuccessWidget", "BodyText");
|
return this.getCmsContent("WaitListSuccessWidget", "BodyText");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -539,7 +539,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
waitListChecked(event) {
|
waitListChecked(event) {
|
||||||
this.$emit("waitListRequested-emitted", event.target.checked);
|
this.$emit("waitListRequested", event.target.checked);
|
||||||
},
|
},
|
||||||
scrollToSuccessMessage() {
|
scrollToSuccessMessage() {
|
||||||
const successMessageElement = this.$refs.waitlistSuccessMessage;
|
const successMessageElement = this.$refs.waitlistSuccessMessage;
|
||||||
|
|
@ -625,10 +625,10 @@ export default {
|
||||||
border: 1px solid #0c7e47;
|
border: 1px solid #0c7e47;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-size: $h5-font-size;
|
font-size: $h5-font-size;
|
||||||
padding: 12px 16px;
|
padding: 0.75rem 1rem;
|
||||||
margin-bottom: -8px;
|
margin-bottom: -0.5rem;
|
||||||
.success-text {
|
.success-text {
|
||||||
margin-left: 8px;
|
margin-left: 0.5rem;
|
||||||
strong {
|
strong {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 0%;
|
letter-spacing: 0%;
|
||||||
|
|
@ -636,8 +636,8 @@ export default {
|
||||||
}
|
}
|
||||||
.success-image {
|
.success-image {
|
||||||
margin-top: 4.5px;
|
margin-top: 4.5px;
|
||||||
width: 16px;
|
width: 1rem;
|
||||||
height: 16px;
|
height: 1rem;
|
||||||
color: #0c7e47;
|
color: #0c7e47;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
import { partNumberStrings } from "@/constants/part-number-strings";
|
||||||
|
|
||||||
export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
|
export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
|
||||||
if (!serviceZipCode) {
|
if (!serviceZipCode) {
|
||||||
|
|
@ -42,6 +43,50 @@ export async function getPricedMobileFeePart(serviceZipCode, pageNameToLog) {
|
||||||
return pricingResults[0];
|
return pricingResults[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getPricedRecycleFeePart(serviceZipCode, pageNameToLog) {
|
||||||
|
if (!serviceZipCode) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const zipCodeData = await getZipCodeData(serviceZipCode);
|
||||||
|
|
||||||
|
// Get supporting items
|
||||||
|
const supportingItems = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
storeActions.GET_SUPPORTING_ITEMS,
|
||||||
|
null,
|
||||||
|
pageNameToLog,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
supportingItems.data === null ||
|
||||||
|
supportingItems.data === undefined ||
|
||||||
|
supportingItems.data === ""
|
||||||
|
) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const recycleFeePart = supportingItems.data.find(
|
||||||
|
(item) => item.partNumber === partNumberStrings.RECYCLE_FEE
|
||||||
|
);
|
||||||
|
|
||||||
|
if (recycleFeePart) {
|
||||||
|
// Get the Recycle Fee Part Price
|
||||||
|
const pricingResults = await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
storeActions.PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
|
||||||
|
{
|
||||||
|
availableLineItems: [recycleFeePart],
|
||||||
|
serviceZipCode: serviceZipCode,
|
||||||
|
serviceZipCodeCtu: zipCodeData.zipCodeCtu,
|
||||||
|
},
|
||||||
|
pageNameToLog,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
return pricingResults[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export async function getServiceabilityDetails(serviceZipCode, lineItems, pageNameToLog) {
|
export async function getServiceabilityDetails(serviceZipCode, lineItems, pageNameToLog) {
|
||||||
// Get the Mobile Fee Part
|
// Get the Mobile Fee Part
|
||||||
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
return await baseMixin.methods.dispatchStoreActionWithLogging(
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,23 @@ const mockGetPricedMobileFeePart = (mockServiceZipCode) => {
|
||||||
return Promise.resolve(mobileFeePart);
|
return Promise.resolve(mobileFeePart);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mockGetPricedRecycleFeePart = (mockServiceZipCode) => {
|
||||||
|
let recycleFeePart = {};
|
||||||
|
|
||||||
|
if (mockServiceZipCode === "43235") {
|
||||||
|
recycleFeePart = {
|
||||||
|
partNumber: "RECYCLE FEE",
|
||||||
|
description: "RECYCLE FEE",
|
||||||
|
partType: "FEE",
|
||||||
|
laborAmount: 39.99,
|
||||||
|
sellingPrice: 0,
|
||||||
|
kitPrice: 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve(recycleFeePart);
|
||||||
|
};
|
||||||
|
|
||||||
const mockGetServiceabilityDetails = (mockServiceZipCode) => {
|
const mockGetServiceabilityDetails = (mockServiceZipCode) => {
|
||||||
const serviceabilityDetails = {
|
const serviceabilityDetails = {
|
||||||
isGlassServiceableInshop: true,
|
isGlassServiceableInshop: true,
|
||||||
|
|
@ -123,6 +140,9 @@ jest.mock(
|
||||||
getPricedMobileFeePart: jest.fn((mockServiceZipCode) => {
|
getPricedMobileFeePart: jest.fn((mockServiceZipCode) => {
|
||||||
return mockGetPricedMobileFeePart(mockServiceZipCode);
|
return mockGetPricedMobileFeePart(mockServiceZipCode);
|
||||||
}),
|
}),
|
||||||
|
getPricedRecycleFeePart: jest.fn((mockServiceZipCode) => {
|
||||||
|
return mockGetPricedRecycleFeePart(mockServiceZipCode);
|
||||||
|
}),
|
||||||
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
||||||
return mockGetServiceabilityDetails(mockServiceZipCode);
|
return mockGetServiceabilityDetails(mockServiceZipCode);
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ import vehicleProtectedQuestion from "@/layouts/service-location/mobile-location
|
||||||
import { deepClone } from "@/helpers/object-helper";
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
import {
|
import {
|
||||||
getPricedMobileFeePart,
|
getPricedMobileFeePart,
|
||||||
|
getPricedRecycleFeePart,
|
||||||
getServiceabilityDetails,
|
getServiceabilityDetails,
|
||||||
getBillToAccountNumber,
|
getBillToAccountNumber,
|
||||||
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||||
|
|
@ -267,6 +268,12 @@ export default {
|
||||||
"service-location"
|
"service-location"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// retrieve recycle fee part
|
||||||
|
const recycleFeePart = await getPricedRecycleFeePart(
|
||||||
|
serviceZipCode,
|
||||||
|
"service-location"
|
||||||
|
);
|
||||||
|
|
||||||
// retrieve serviceability details
|
// retrieve serviceability details
|
||||||
const serviceabilityDetails = await getServiceabilityDetails(
|
const serviceabilityDetails = await getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
|
|
@ -280,6 +287,7 @@ export default {
|
||||||
|
|
||||||
// update content related to service zip code
|
// update content related to service zip code
|
||||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||||
|
this.$emit("updated-recycle-fee-part", recycleFeePart);
|
||||||
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
||||||
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
||||||
this.$emit("updated-mobile-ctu", zipCodeData.zipCodeCtu);
|
this.$emit("updated-mobile-ctu", zipCodeData.zipCodeCtu);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
ref="serviceZipCodeQuestion"
|
ref="serviceZipCodeQuestion"
|
||||||
:mobileFeePart="mobileFeePart"
|
:mobileFeePart="mobileFeePart"
|
||||||
@updated-mobile-fee-part="setMobileFeePart"
|
@updated-mobile-fee-part="setMobileFeePart"
|
||||||
|
@updated-recycle-fee-part="setRecycleFeePart"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
@updated-contains-military-base="setContainsMilitaryBase"
|
@updated-contains-military-base="setContainsMilitaryBase"
|
||||||
@updated-bill-to-account-number="setBillToAccountNumber"
|
@updated-bill-to-account-number="setBillToAccountNumber"
|
||||||
|
|
@ -90,6 +91,7 @@
|
||||||
:mobileFeePart="mobileFeePart"
|
:mobileFeePart="mobileFeePart"
|
||||||
:mobileFeeApplies="mobileFeeApplies"
|
:mobileFeeApplies="mobileFeeApplies"
|
||||||
@updated-mobile-fee-part="setMobileFeePart"
|
@updated-mobile-fee-part="setMobileFeePart"
|
||||||
|
@updated-recycle-fee-part="setRecycleFeePart"
|
||||||
@updated-serviceability="setServiceabilityDetails"
|
@updated-serviceability="setServiceabilityDetails"
|
||||||
@updated-contains-military-base="setContainsMilitaryBase"
|
@updated-contains-military-base="setContainsMilitaryBase"
|
||||||
@updated-mobile-ctu="setCtuForMobile"
|
@updated-mobile-ctu="setCtuForMobile"
|
||||||
|
|
@ -195,6 +197,7 @@ export default {
|
||||||
selectedAppointmentType: this.getSelectedAppointmentType(),
|
selectedAppointmentType: this.getSelectedAppointmentType(),
|
||||||
selectedProvider: this.getSelectedProvider(),
|
selectedProvider: this.getSelectedProvider(),
|
||||||
mobileFeePart: null,
|
mobileFeePart: null,
|
||||||
|
recycleFeePart: null,
|
||||||
zipContainsMilitaryBase: false,
|
zipContainsMilitaryBase: false,
|
||||||
zipCodeCtu: null,
|
zipCodeCtu: null,
|
||||||
billToAccountNumber: null,
|
billToAccountNumber: null,
|
||||||
|
|
@ -480,6 +483,9 @@ export default {
|
||||||
setMobileFeePart(mobileFeePart) {
|
setMobileFeePart(mobileFeePart) {
|
||||||
this.mobileFeePart = mobileFeePart;
|
this.mobileFeePart = mobileFeePart;
|
||||||
},
|
},
|
||||||
|
setRecycleFeePart(recycleFeePart) {
|
||||||
|
this.recycleFeePart = recycleFeePart;
|
||||||
|
},
|
||||||
//creating async function as the computed property can not directly handle asynchronous operations or promises.
|
//creating async function as the computed property can not directly handle asynchronous operations or promises.
|
||||||
async setMobileLocationQuestions(newValue) {
|
async setMobileLocationQuestions(newValue) {
|
||||||
var newZipCode = newValue.addressQuestions.zipCode;
|
var newZipCode = newValue.addressQuestions.zipCode;
|
||||||
|
|
@ -592,6 +598,7 @@ export default {
|
||||||
},
|
},
|
||||||
updateAndSaveSupportingItems() {
|
updateAndSaveSupportingItems() {
|
||||||
let supportingItems = store.getters.lineItems.supportingItems;
|
let supportingItems = store.getters.lineItems.supportingItems;
|
||||||
|
let shouldSaveSupportingItems = false;
|
||||||
|
|
||||||
supportingItems =
|
supportingItems =
|
||||||
!supportingItems && this.isMobileStaticRecalibrationApplicable
|
!supportingItems && this.isMobileStaticRecalibrationApplicable
|
||||||
|
|
@ -603,6 +610,21 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update recyle fee price
|
||||||
|
if (this.recycleFeePart) {
|
||||||
|
const recycleFeeIndex = supportingItems.findIndex(
|
||||||
|
(item) => item.partNumber == partNumberStrings.RECYCLE_FEE
|
||||||
|
);
|
||||||
|
if (recycleFeeIndex >= 0) {
|
||||||
|
supportingItems[recycleFeeIndex].laborAmount = this.recycleFeePart.laborAmount;
|
||||||
|
supportingItems[recycleFeeIndex].sellingPrice =
|
||||||
|
this.recycleFeePart.sellingPrice;
|
||||||
|
supportingItems[recycleFeeIndex].kitPrice = this.recycleFeePart.kitPrice;
|
||||||
|
|
||||||
|
shouldSaveSupportingItems = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if we have a mobile fee, then save/update supporting items
|
// if we have a mobile fee, then save/update supporting items
|
||||||
if (this.selectedAppointmentType == "Mobile") {
|
if (this.selectedAppointmentType == "Mobile") {
|
||||||
const mobileFeeIndex = supportingItems.findIndex(
|
const mobileFeeIndex = supportingItems.findIndex(
|
||||||
|
|
@ -617,11 +639,7 @@ export default {
|
||||||
if (this.mobileFeePart !== null) supportingItems.push(this.mobileFeePart);
|
if (this.mobileFeePart !== null) supportingItems.push(this.mobileFeePart);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchStoreAction(
|
shouldSaveSupportingItems = true;
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
|
||||||
supportingItems,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
// if it's not a mobile, then make sure we remove any that may have been added
|
// if it's not a mobile, then make sure we remove any that may have been added
|
||||||
const removeMobileFeeIndex = supportingItems?.findIndex(
|
const removeMobileFeeIndex = supportingItems?.findIndex(
|
||||||
|
|
@ -630,13 +648,18 @@ export default {
|
||||||
|
|
||||||
if (removeMobileFeeIndex >= 0) {
|
if (removeMobileFeeIndex >= 0) {
|
||||||
supportingItems.splice(removeMobileFeeIndex, 1);
|
supportingItems.splice(removeMobileFeeIndex, 1);
|
||||||
this.dispatchStoreAction(
|
shouldSaveSupportingItems = true;
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
|
||||||
supportingItems,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use shouldSaveSupportingItems flag to determine if we need to save supporting items. Prevents unnecessary/multiple saves
|
||||||
|
if (shouldSaveSupportingItems) {
|
||||||
|
this.dispatchStoreAction(
|
||||||
|
this.storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
||||||
|
supportingItems,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.navigatingForward = true;
|
this.navigatingForward = true;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,23 @@ const mockGetPricedMobileFeePart = (mockServiceZipCode) => {
|
||||||
return Promise.resolve(mobileFeePart);
|
return Promise.resolve(mobileFeePart);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const mockGetPricedRecycleFeePart = (mockServiceZipCode) => {
|
||||||
|
let recycleFeePart = {};
|
||||||
|
|
||||||
|
if (mockServiceZipCode === "43235") {
|
||||||
|
recycleFeePart = {
|
||||||
|
partNumber: "RECYCLE FEE",
|
||||||
|
description: "RECYCLE FEE",
|
||||||
|
partType: "FEE",
|
||||||
|
laborAmount: 39.99,
|
||||||
|
sellingPrice: 0,
|
||||||
|
kitPrice: 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return Promise.resolve(recycleFeePart);
|
||||||
|
};
|
||||||
|
|
||||||
const mockGetServiceabilityDetails = (mockServiceZipCode) => {
|
const mockGetServiceabilityDetails = (mockServiceZipCode) => {
|
||||||
const serviceabilityDetails = {
|
const serviceabilityDetails = {
|
||||||
isGlassServiceableInshop: true,
|
isGlassServiceableInshop: true,
|
||||||
|
|
@ -49,6 +66,9 @@ jest.mock(
|
||||||
getPricedMobileFeePart: jest.fn((mockServiceZipCode) => {
|
getPricedMobileFeePart: jest.fn((mockServiceZipCode) => {
|
||||||
return mockGetPricedMobileFeePart(mockServiceZipCode);
|
return mockGetPricedMobileFeePart(mockServiceZipCode);
|
||||||
}),
|
}),
|
||||||
|
getPricedRecycleFeePart: jest.fn((mockServiceZipCode) => {
|
||||||
|
return mockGetPricedRecycleFeePart(mockServiceZipCode);
|
||||||
|
}),
|
||||||
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
getServiceabilityDetails: jest.fn((mockServiceZipCode) => {
|
||||||
return mockGetServiceabilityDetails(mockServiceZipCode);
|
return mockGetServiceabilityDetails(mockServiceZipCode);
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ import alert from "@/ux-components/alert/alert";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getPricedMobileFeePart,
|
getPricedMobileFeePart,
|
||||||
|
getPricedRecycleFeePart,
|
||||||
getServiceabilityDetails,
|
getServiceabilityDetails,
|
||||||
getBillToAccountNumber,
|
getBillToAccountNumber,
|
||||||
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
|
||||||
|
|
@ -164,6 +165,12 @@ export default {
|
||||||
"service-location"
|
"service-location"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// retrieve recycle fee part
|
||||||
|
const recycleFeePart = await getPricedRecycleFeePart(
|
||||||
|
serviceZipCode,
|
||||||
|
"service-location"
|
||||||
|
);
|
||||||
|
|
||||||
// retrieve serviceability details
|
// retrieve serviceability details
|
||||||
const serviceabilityDetails = await getServiceabilityDetails(
|
const serviceabilityDetails = await getServiceabilityDetails(
|
||||||
serviceZipCode,
|
serviceZipCode,
|
||||||
|
|
@ -177,6 +184,7 @@ export default {
|
||||||
|
|
||||||
// update content related to service zip code
|
// update content related to service zip code
|
||||||
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
this.$emit("updated-mobile-fee-part", mobileFeePart);
|
||||||
|
this.$emit("updated-recycle-fee-part", recycleFeePart);
|
||||||
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
this.$emit("updated-serviceability", serviceabilityDetails.data);
|
||||||
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
|
||||||
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
this.$emit("updated-bill-to-account-number", billToAccountNumber);
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,12 @@ export default {
|
||||||
return "widget-name-" + this.cmsWidgetName;
|
return "widget-name-" + this.cmsWidgetName;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
if (!store.getters.externalParameterState?.isExternalParameter) {
|
||||||
|
showFmgLoadingModal(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function encodeUriData(payload) {
|
function encodeUriData(payload) {
|
||||||
|
|
|
||||||
|
|
@ -433,9 +433,6 @@ router.afterEach(async (to, from) => {
|
||||||
await saveSession({ pageNameToLog: to.query.fmgPage });
|
await saveSession({ pageNameToLog: to.query.fmgPage });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!store.getters.externalParameterState?.isExternalParameter) {
|
|
||||||
showFmgLoadingModal(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Push page view to GA
|
// Push page view to GA
|
||||||
analyticsMixin.methods.pushPageViewToGA();
|
analyticsMixin.methods.pushPageViewToGA();
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,8 @@ export const mutations = {
|
||||||
// if we're loading a session and we do not have a provider number yet, then set isInsurance to null so that
|
// if we're loading a session and we do not have a provider number yet, then set isInsurance to null so that
|
||||||
// a service package is not selected by default on the quote page.
|
// a service package is not selected by default on the quote page.
|
||||||
if (
|
if (
|
||||||
!sessionInformation.order.payment.isInsurance &&
|
(sessionInformation.order.payment.isInsurance === null ||
|
||||||
|
sessionInformation.order.payment.isInsurance === undefined) &&
|
||||||
!sessionInformation.order.serviceLocation.provider?.providerNumber
|
!sessionInformation.order.serviceLocation.provider?.providerNumber
|
||||||
) {
|
) {
|
||||||
state.order.payment.isInsurance = null;
|
state.order.payment.isInsurance = null;
|
||||||
|
|
@ -1891,6 +1892,97 @@ export const actions = {
|
||||||
pageNameToLog: pageNameToLog,
|
pageNameToLog: pageNameToLog,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
submitDonationPartToSV2(
|
||||||
|
context,
|
||||||
|
{ payload: { donationAmount, submittedOrder }, pageNameToLog }
|
||||||
|
) {
|
||||||
|
donationAmount = parseInt(donationAmount);
|
||||||
|
/* Request contract
|
||||||
|
{
|
||||||
|
"donationAmount": 5,
|
||||||
|
"savedSessionId": "96b1a16e-410a-4d08-8421-fe36e82b2275",
|
||||||
|
"paymentInfo": {
|
||||||
|
"parentAccountNumber": 167132,
|
||||||
|
"billToAccountNumber": 87291,
|
||||||
|
"providerNumber": "005819",
|
||||||
|
"carId": "CR00069266",
|
||||||
|
"make": "Acura",
|
||||||
|
"model": "MDX",
|
||||||
|
"year": 2020,
|
||||||
|
"eon": "S1820397",
|
||||||
|
"zipCode": "43015",
|
||||||
|
"state": "OH",
|
||||||
|
"referralNumber": "1821895",
|
||||||
|
"referralDate": "2025-03-20T16:27:38.93",
|
||||||
|
"referralSequenceNumber": "1821895",
|
||||||
|
"serviceZipCode": "43015",
|
||||||
|
"isReplacement": true,
|
||||||
|
"deductible": 0,
|
||||||
|
"coverageStatus": null,
|
||||||
|
"coverageSubStatus": null,
|
||||||
|
"serverData": "ZtCNOF1tCLQBAx2NRKHE/n/fqD8zUxRfYtDuTu7uUiPpeg7i6TmwXwggssX5KsXVQbeft+PN+vXYfBFJytLVYgbafNDR0JH3izVTIOh7KGTeB6YaPuCJmodF4SfgVVDHD9LEmEH9wNzM9j3pFjgfXehOFH11SH9dNwTkXIbsGzAeu64DRyJsDdpamM/BPOxlJj60S/R8vnUM8mjyM7B9a63NskFI6BCVIh5mxDE4cSMUgb4zFtwvDgTPxJSwXqKShtoY6ryB8n5UPNkG/Z5tjVuJ7/8RV7WrURM7PN7xLfp6pVEeipWyeFnVEK33G9JOuB6yH75jPO6vMCYRNi0p0pg6laasFDy3hmfuy2W/N0qtcJLVa5N0bUMFFuPQusyEeqsEZ/zx1Srlvsk7i0DF8pTyBcm3JTF5BOWm60wg3ntEOqfRuQqzFc5updILwLAIp39CwJG/fs5Mj3HCDcUKwYlK70fAARtJwFu7wI0vqW5bUSUvJkvm1JRPlyWJ8JNY4Oq1apYqhZS9bps5ofgiOYJbBhPEboEnVukoTkQiYjgbMtBwVGKGL2nNEd77osoEg1KXhEQS+0KD3PoUu/bZkGub6FNGE6iKeFPt9gDSs+S21s22rVSaZkgaoC6SkufPpN6aV78Jx69nMIDd4go4pj2IJX4kS1pD1NEOSWjN4bgVKAtV6/bxBvhNJwnqUE+mE8eAmULsezub4LMhPqA58y/ZlO44jt/qkAw9nuVDRPBve+TdJTotID5dIqJJd6/vkDoHTVaSrbkCBbdG6d9By8AEbKuVrQS/+VurUnYEd2TGahPbOyRdNlud8RB4+4af0ZRFmiKkr6ppa5IbHbTIZ2qtyeOSbIOkv8O7xK/GL6e6Iaaz0wDHaQZC4Ea8FczjpFOlQgixfYcYJBb/W2db+uRvZ3lftVyJ/d082CGbYplOa+aTxymVcQSjBRbXzs6GZ2ytDqRYcRe94F9x/XSVj7g+mih7VS+YH0eOEp0ViTuWP8B1dVnOV5yTkdMbr8n9Q82G4v5brtQdiMDMY3HS6mxPb1IiKiqFX6Jgju8sIMxkJFZQ3iIkAJuOqUYkG1ZW7s4uI6hT46bRqzYaQA18CFu56qaMblOBFuxlJIsYsnMePh2xAH89oay5Kc88xwT2T/4+dzYQ0CqhQ4MTBB7nXelav2rMCjaLQ/V/a5r1TnLr2n0GbvODQeNl97qzi5lDYKlnuF8nOfOqZNOsPSsrsk3UZJJYZwNxDZaweHIeeg5P2ZW5agswPx/U5DkU1MzE1VAQ+DQAenaE2SLo4dSPBHMmt2gLpgu0LaCuzTR2IL/EM+Tpdn/Pcv1E7lPJIycIIwO7QGJcVkwCx8CJ/WCo6xDMq+9zjSVbqAaL5MzySZCeFCMyZxvEk7qXig6rflB3K3Jay4qSFjBxBXhOEuT6zKXyhR41IXRtZRmtPkscypFEUXvR5nJV7AQUIbljGEcikOLmSiCEnl8dI2Ny9xCHLOro8UXqVUy8dHGmTRGTE/mS1JNZ3y4XaZSyHcABVWbZcR3KIXVxd6rtUA/pBvWpbq8nH3WWlJGqkoxUVEridtXqcBuzTKg3/i6vLs0/pHGwdM38XizKcIxykvJrur3vEQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Uncomment and use when endpoint integration is finalized
|
||||||
|
return globalMethods.callHttpClient({
|
||||||
|
method: endpoints.AddDonationPart.method,
|
||||||
|
endpoint: endpoints.AddDonationPart.url,
|
||||||
|
payload: {
|
||||||
|
donationAmount: donationAmount,
|
||||||
|
savedSessionId: "96b1a16e-410a-4d08-8421-fe36e82b2275",
|
||||||
|
paymentInfo: {
|
||||||
|
parentAccountNumber: submittedSessionData.parentAccountNumber,
|
||||||
|
billToAccountNumber: submittedSessionData.billToAccountNumber,
|
||||||
|
providerNumber: submittedSessionData.providerNumber,
|
||||||
|
carId: "CR00069266",
|
||||||
|
make: "Acura",
|
||||||
|
model: "MDX",
|
||||||
|
year: 2020,
|
||||||
|
eon: "S1820397",
|
||||||
|
zipCode: "43015",
|
||||||
|
state: "OH",
|
||||||
|
referralNumber: "1821895",
|
||||||
|
referralDate: "2025-03-20T16:27:38.93",
|
||||||
|
referralSequenceNumber: "1821895",
|
||||||
|
serviceZipCode: "43015",
|
||||||
|
isReplacement: true,
|
||||||
|
deductible: 0,
|
||||||
|
coverageStatus: null,
|
||||||
|
coverageSubStatus: null,
|
||||||
|
serverData: "ZtCNOF1tCLQBAx2NRKHE/n/fqD8zUxRfYtDuTu7uUiPpeg7i6TmwXwggssX5KsXVQbeft+PN+vXYfBFJytLVYgbafNDR0JH3izVTIOh7KGTeB6YaPuCJmodF4SfgVVDHD9LEmEH9wNzM9j3pFjgfXehOFH11SH9dNwTkXIbsGzAeu64DRyJsDdpamM/BPOxlJj60S/R8vnUM8mjyM7B9a63NskFI6BCVIh5mxDE4cSMUgb4zFtwvDgTPxJSwXqKShtoY6ryB8n5UPNkG/Z5tjVuJ7/8RV7WrURM7PN7xLfp6pVEeipWyeFnVEK33G9JOuB6yH75jPO6vMCYRNi0p0pg6laasFDy3hmfuy2W/N0qtcJLVa5N0bUMFFuPQusyEeqsEZ/zx1Srlvsk7i0DF8pTyBcm3JTF5BOWm60wg3ntEOqfRuQqzFc5updILwLAIp39CwJG/fs5Mj3HCDcUKwYlK70fAARtJwFu7wI0vqW5bUSUvJkvm1JRPlyWJ8JNY4Oq1apYqhZS9bps5ofgiOYJbBhPEboEnVukoTkQiYjgbMtBwVGKGL2nNEd77osoEg1KXhEQS+0KD3PoUu/bZkGub6FNGE6iKeFPt9gDSs+S21s22rVSaZkgaoC6SkufPpN6aV78Jx69nMIDd4go4pj2IJX4kS1pD1NEOSWjN4bgVKAtV6/bxBvhNJwnqUE+mE8eAmULsezub4LMhPqA58y/ZlO44jt/qkAw9nuVDRPBve+TdJTotID5dIqJJd6/vkDoHTVaSrbkCBbdG6d9By8AEbKuVrQS/+VurUnYEd2TGahPbOyRdNlud8RB4+4af0ZRFmiKkr6ppa5IbHbTIZ2qtyeOSbIOkv8O7xK/GL6e6Iaaz0wDHaQZC4Ea8FczjpFOlQgixfYcYJBb/W2db+uRvZ3lftVyJ/d082CGbYplOa+aTxymVcQSjBRbXzs6GZ2ytDqRYcRe94F9x/XSVj7g+mih7VS+YH0eOEp0ViTuWP8B1dVnOV5yTkdMbr8n9Q82G4v5brtQdiMDMY3HS6mxPb1IiKiqFX6Jgju8sIMxkJFZQ3iIkAJuOqUYkG1ZW7s4uI6hT46bRqzYaQA18CFu56qaMblOBFuxlJIsYsnMePh2xAH89oay5Kc88xwT2T/4+dzYQ0CqhQ4MTBB7nXelav2rMCjaLQ/V/a5r1TnLr2n0GbvODQeNl97qzi5lDYKlnuF8nOfOqZNOsPSsrsk3UZJJYZwNxDZaweHIeeg5P2ZW5agswPx/U5DkU1MzE1VAQ+DQAenaE2SLo4dSPBHMmt2gLpgu0LaCuzTR2IL/EM+Tpdn/Pcv1E7lPJIycIIwO7QGJcVkwCx8CJ/WCo6xDMq+9zjSVbqAaL5MzySZCeFCMyZxvEk7qXig6rflB3K3Jay4qSFjBxBXhOEuT6zKXyhR41IXRtZRmtPkscypFEUXvR5nJV7AQUIbljGEcikOLmSiCEnl8dI2Ny9xCHLOro8UXqVUy8dHGmTRGTE/mS1JNZ3y4XaZSyHcABVWbZcR3KIXVxd6rtUA/pBvWpbq8nH3WWlJGqkoxUVEridtXqcBuzTKg3/i6vLs0/pHGwdM38XizKcIxykvJrur3vEQ=="
|
||||||
|
}
|
||||||
|
},
|
||||||
|
logApiCall: true,
|
||||||
|
pageNameToLog: pageNameToLog,
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Response contract
|
||||||
|
{
|
||||||
|
"wasSuccessful": true,
|
||||||
|
"wasLocked": true
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
let result;
|
||||||
|
|
||||||
|
switch (donationAmount) {
|
||||||
|
case 1:
|
||||||
|
result = { wasSuccessful: true, wasLocked: false };
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
result = { wasSuccessful: false, wasLocked: true };
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
result = { wasSuccessful: false, wasLocked: false };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
result = { wasSuccessful: null, wasLocked: null }; // Default case if amount doesn't match
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
getPartFromCapabilityQuestionAnswer(context, { payload, pageNameToLog }) {
|
getPartFromCapabilityQuestionAnswer(context, { payload, pageNameToLog }) {
|
||||||
const glassLocation = payload;
|
const glassLocation = payload;
|
||||||
|
|
@ -3206,16 +3298,16 @@ export const actions = {
|
||||||
"running addDonationToSubmittedOrder()... adding donation to supportingItems in session storage "
|
"running addDonationToSubmittedOrder()... adding donation to supportingItems in session storage "
|
||||||
);
|
);
|
||||||
submittedOrder.lineItems.supportingItems.push({
|
submittedOrder.lineItems.supportingItems.push({
|
||||||
partNumber: "DONATION",
|
partNumber: `DONATION_${donationAmount}`,
|
||||||
description: null,
|
description: `DONATION $${donationAmount}`,
|
||||||
partType: "DONATION",
|
partType: partTypeStrings.DONATION,
|
||||||
isInsurable: false,
|
isInsurable: false,
|
||||||
isChildPart: false,
|
isChildPart: false,
|
||||||
laborAmount: 0,
|
laborAmount: 0,
|
||||||
sellingPrice: donationAmount,
|
sellingPrice: donationAmount,
|
||||||
kitPrice: 0,
|
kitPrice: 0,
|
||||||
salesTax: null,
|
salesTax: 0,
|
||||||
id: "donation-" + donationAmount,
|
id: `donation-${donationAmount}`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// filter out all donations
|
// filter out all donations
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue