diff --git a/src/constants/coverage-status.js b/src/constants/coverage-status.js
new file mode 100644
index 000000000..1c75c00a6
--- /dev/null
+++ b/src/constants/coverage-status.js
@@ -0,0 +1,20 @@
+const coverageStatus = {
+ PENDING: "Pending",
+ NOCOMP: "NoComp",
+ VERIFIED: "Verified",
+};
+
+export function coverageStatusValue(intCoverageStatus) {
+ switch (intCoverageStatus) {
+ case 0:
+ return coverageStatus.PENDING;
+ case 1:
+ return coverageStatus.NOCOMP;
+ case 2:
+ return coverageStatus.VERIFIED;
+ default:
+ return null;
+ }
+}
+
+export { coverageStatus };
diff --git a/src/constants/experiments.js b/src/constants/experiments.js
index ee83ec447..eb7fed508 100644
--- a/src/constants/experiments.js
+++ b/src/constants/experiments.js
@@ -4,6 +4,7 @@ const experimentUniverses = {
const experimentSettings = {
GOOGLE_CUSTOM_DIMENSION_INDEX: "Google Custom Dimension Index",
+ SUPPRESS_VIN_CAPTURE: "SuppressVinCapture",
DISPLAY_AVAILABILITY_INDICATORS: "DisplayAvailabilityIndicators",
PIA_EXPERIENCE: "PIA Experience",
PIA_INSURANCE: "DisplayPIAInsurance",
diff --git a/src/constants/insurance.js b/src/constants/insurance.js
deleted file mode 100644
index 2574fdbc6..000000000
--- a/src/constants/insurance.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import { cartItemTypes } from "@/constants/cart-item-types";
-
-export const payWithInsuranceStates = ["AZ", "CT", "FL", "KY", "MA", "MN", "NY", "SC"];
-
-export const cartItemTypesCoveredByInsurance = [
- cartItemTypes.GLASS_PARTS,
- cartItemTypes.SUPPORTING_ITEMS,
- cartItemTypes.RECYCLE_FEE,
- cartItemTypes.REPLACE_FEE,
- cartItemTypes.SUPPLIES_REPAIR,
-];
-
-export const coverageStatus = {
- PENDING: "Pending",
- NOCOMP: "NoComp",
- VERIFIED: "Verified",
-};
-
-export function coverageStatusValue(intCoverageStatus) {
- switch (intCoverageStatus) {
- case 0:
- return coverageStatus.PENDING;
- case 1:
- return coverageStatus.NOCOMP;
- case 2:
- return coverageStatus.VERIFIED;
- default:
- return null;
- }
-}
diff --git a/src/constants/pay-with-insurance-states.js b/src/constants/pay-with-insurance-states.js
new file mode 100644
index 000000000..e65589557
--- /dev/null
+++ b/src/constants/pay-with-insurance-states.js
@@ -0,0 +1 @@
+export const payWithInsuranceStates = ["AZ", "CT", "FL", "KY", "MA", "MN", "NY", "SC"];
diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js
index c290dd1db..519de0855 100644
--- a/src/constants/tint-mapper.js
+++ b/src/constants/tint-mapper.js
@@ -33,7 +33,6 @@ const tintMap = {
{ name: "green tint", src: "Glass-NoShade-GreenTint.svg" },
{ name: "gray tint privacy", src: "Glass-NoShade-GrayTint.svg" },
{ name: "blue tint", src: "Glass-NoShade-BlueTint.svg" },
- { name: "green tint privacy", src: "Glass-NoShade-Privacy.svg" },
// No shade or tint
{ name: "clear", src: "Glass-NoShade-NoTint.svg" },
diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue
index a8227036a..9a0f1b876 100644
--- a/src/fmg-components/cart/cart.vue
+++ b/src/fmg-components/cart/cart.vue
@@ -11,7 +11,9 @@
class="col d-flex justify-content-between py-0">
{{ amountDueText }}
{{
- getLineItemAmount(amountDue, showCoverageAsPending)
+ showCoverageAsPending
+ ? verifyingCoverageText
+ : getFormattedAmount("", amountDue)
}}
@@ -22,10 +24,9 @@
{{
- getLineItemAmount(
- deductibleLineItem.subTotal,
- showCoverageAsPending
- )
+ showCoverageAsPending
+ ? verifyingCoverageText
+ : getFormattedAmount("", deductibleLineItem.subTotal)
}}
@@ -34,12 +35,12 @@
- {{ getLineItemAmount(packagePrice) }}
+ {{ getFormattedAmount("", packagePrice) }}
- {{ getLineItemAmount(packagePriceWithoutDiscount) }}
+ {{ getFormattedAmount("", packagePriceWithoutDiscount) }}
@@ -100,7 +101,7 @@
(showCoverageAsVerified && !cartItem.isCoveredByInsurance)
"
>{{
- getLineItemAmount(cartItem.subTotal, null, cartItem.category)
+ getFormattedAmount(cartItem.category, Math.abs(cartItem.subTotal))
}}
@@ -108,19 +109,27 @@
{{ subtotalText }}
- {{ getLineItemAmount(subTotal, showCoverageAsPending) }}
+ {{
+ showCoverageAsPending
+ ? verifyingCoverageText
+ : getFormattedAmount("", subTotal)
+ }}
{{ salesTaxText }}
- {{ getLineItemAmount(salesTax) }}
+ {{ getFormattedAmount("", salesTax) }}
- {{ amountPaidText }}
- {{ getLineItemAmount(amountPaid) }}
+ {{ amountPaidText }}{{ getFormattedAmount("", amountPaid) }}
{{ amountDueText }}
- {{ getLineItemAmount(amountDue, showCoverageAsPending) }}
+ {{
+ showCoverageAsPending
+ ? verifyingCoverageText
+ : getFormattedAmount("", amountDue)
+ }}
lineItemsToKeep.cartItemType != cartItemType
@@ -529,9 +535,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.FRONT_WIPERS
- ),
+ isCoveredByInsurance: false,
};
frontWiperLineItems.forEach((lineItem) => {
@@ -569,9 +573,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.REAR_WIPERS
- ),
+ isCoveredByInsurance: false,
};
rearWiperLineItems.forEach((lineItem) => {
@@ -609,9 +611,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.RAIN_DEFENSE
- ),
+ isCoveredByInsurance: false,
};
rainDefenseLineItem.cartItemType = cartItem.cartItemType;
@@ -632,7 +632,7 @@ export default {
if (this.glassParts.length > 0) {
this.glassParts.forEach((lineItem) => {
- let cartItem = {
+ let glassPartCartItem = {
name: null,
category: cartItemCategories.GLASS_PARTS,
cartItemType: cartItemTypes.GLASS_PARTS,
@@ -642,25 +642,24 @@ export default {
(lineItem.kitPrice ?? 0) +
(lineItem.laborAmount ?? 0) +
(lineItem.sellingPrice ?? 0),
+
salesTax: lineItem.salesTax ?? 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.GLASS_PARTS
- ),
+ isCoveredByInsurance: true,
};
if (lineItem.childParts?.length > 0) {
lineItem.childParts.forEach((childPartLineItem) => {
- cartItem.subTotal +=
+ glassPartCartItem.subTotal +=
(childPartLineItem.kitPrice ?? 0) +
(childPartLineItem.laborAmount ?? 0) +
(childPartLineItem.sellingPrice ?? 0);
- cartItem.salesTax += childPartLineItem.salesTax;
+ glassPartCartItem.salesTax += childPartLineItem.salesTax;
});
}
- glassPartCartItems.push(cartItem);
+ glassPartCartItems.push(glassPartCartItem);
});
}
@@ -686,9 +685,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.REPLACE_FEE
- ),
+ isCoveredByInsurance: true,
};
recycleFeeLineItem.cartItemType = cartItem.cartItemType;
@@ -726,9 +723,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.SUPPLIES_REPAIR
- ),
+ isCoveredByInsurance: true,
};
suppliesRepairLineItem.cartItemType = cartItem.cartItemType;
@@ -764,9 +759,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.MOBILE_FEE
- ),
+ isCoveredByInsurance: false,
};
mobileFeeLineItem.cartItemType = cartItem.cartItemType;
@@ -845,9 +838,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.SUPPORTING_ITEMS
- ),
+ isCoveredByInsurance: true,
};
otherSupportingItemsLineItems.forEach((lineItem) => {
@@ -885,9 +876,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(
- cartItemTypes.EARLY_BIRD
- ),
+ isCoveredByInsurance: false,
};
premiumAppointmentDiscountLineItem.cartItemType = cartItem.cartItemType;
@@ -933,7 +922,7 @@ export default {
subTotal: 0,
salesTax: 0,
lineItems: [],
- isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes(promoCode),
+ isCoveredByInsurance: false,
};
promoLineItems.forEach((promoLineItem) => {
diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js
index a0d3bb92c..cb3844bfc 100644
--- a/src/helpers/heritage-integration/navigation-helper.js
+++ b/src/helpers/heritage-integration/navigation-helper.js
@@ -5,6 +5,9 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import { storeActions } from "@/constants/store-actions.js";
+import { settleAllPromises } from "@/helpers/layout-helper";
+import experimentMixin from "@/mixins/experiment-mixin";
+import { experimentSettings } from "@/constants/experiments";
import { includesWindshieldReplacement } from "@/helpers/damage-helper";
import store from "@/store";
import router from "@/router";
@@ -30,7 +33,7 @@ export async function getDirectNavigation(toRoute) {
// vehicle -> vehicle-damage
// quote -> vin-lookup/estimate
// insurance-company -> vin-lookup/estimate
- if (store.getters.requiresVerifiedRedirecting) {
+ if (store.getters.payment.insuranceCoverage.isVerified) {
if (fmgPageValue === fmgPageValues.VEHICLE) {
return fmgPageValues.VEHICLE_DAMAGE;
}
@@ -74,7 +77,7 @@ export async function getImplicitNavigation(toRoute) {
if (quoteComponent.methods.arePagePrerequisitesValid()) {
// Do not send to quote if verified insurance user.
- if (store.getters.requiresVerifiedRedirecting) {
+ if (store.getters.payment.insuranceCoverage.isVerified) {
return fmgPageValues.HERITAGE;
} else {
return fmgPageValues.QUOTE;
@@ -139,7 +142,11 @@ export async function skipVinLookup() {
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
: false;
- return isVinOptionalVehicle || !includesWindshieldReplacement();
+ return (
+ isVinOptionalVehicle ||
+ !includesWindshieldReplacement() ||
+ experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true")
+ );
}
export async function skipVinLookupNotRepair() {
@@ -151,7 +158,11 @@ export async function skipVinLookupNotRepair() {
? await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE)
: false;
- return isVinOptionalVehicle || !includesWindshieldReplacement();
+ return (
+ isVinOptionalVehicle ||
+ !includesWindshieldReplacement() ||
+ experimentMixin.methods.hasSettingEqualTo(experimentSettings.SUPPRESS_VIN_CAPTURE, "true")
+ );
}
async function getLazyLoadedComponent(pageName) {
diff --git a/src/helpers/heritage-integration/navigation-helper.spec.js b/src/helpers/heritage-integration/navigation-helper.spec.js
index 671a1b46e..963a6434c 100644
--- a/src/helpers/heritage-integration/navigation-helper.spec.js
+++ b/src/helpers/heritage-integration/navigation-helper.spec.js
@@ -115,6 +115,16 @@ describe("getPageToRouteExistingOrderTo", () => {
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
store.commit(storeMutations.UPDATE_MAKE, "acura");
+ const mockExperimentsList = [
+ {
+ universeName: "ConceptFunnel",
+ settings: {
+ SuppressVinCapture: false,
+ },
+ },
+ ];
+ store.commit(storeMutations.UPDATE_EXPERIMENTS, mockExperimentsList);
+
// Mock out the lazy load calls for all components.
mockLazyLoadComponentReturnValues({
[fmgPageValues.VEHICLE]: true,
@@ -361,7 +371,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
// Act
const result = await getPageToRouteExistingOrderTo(toRoute);
@@ -380,7 +389,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
store.commit(storeMutations.UPDATE_IS_REPAIR, true);
store.commit(storeMutations.UPDATE_MAKE, "acura");
@@ -400,7 +408,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
store.commit(storeMutations.UPDATE_IS_REPAIR, true);
store.commit(storeMutations.UPDATE_MAKE, "acura");
@@ -422,7 +429,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
store.commit(storeMutations.UPDATE_MAKE, "acura");
store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, [
@@ -445,7 +451,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
store.commit(storeMutations.UPDATE_MAKE, "acura");
store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, [
@@ -471,7 +476,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, false);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "55555");
// Act
const result = await getPageToRouteExistingOrderTo(toRoute);
@@ -489,7 +493,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, false);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "55555");
// Act
const result = await getPageToRouteExistingOrderTo(toRoute);
@@ -507,7 +510,6 @@ describe("getPageToRouteExistingOrderTo", () => {
};
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, false);
- store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "55555");
// Act
const result = await getPageToRouteExistingOrderTo(toRoute);
diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue
index 39da072a3..1947bec22 100644
--- a/src/layouts/confirmation/confirmation.vue
+++ b/src/layouts/confirmation/confirmation.vue
@@ -96,7 +96,7 @@ import { convertDateStringToDate } from "@/layouts/schedule/helpers/schedule-hel
import { deepClone } from "@/helpers/object-helper";
import { Form } from "vee-validate";
import { get12HourTimeFormat, get12HourTimeMobileFormat } from "@/helpers/date-helper";
-import { coverageStatus } from "@/constants/insurance";
+import { coverageStatus } from "@/constants/coverage-status";
export default {
name: "confirmation",
diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue
index b298132ca..9c2ce4caf 100644
--- a/src/layouts/estimate/estimate.vue
+++ b/src/layouts/estimate/estimate.vue
@@ -112,6 +112,8 @@ import {
skipVinLookup,
skipVinLookupNotRepair,
} from "@/helpers/heritage-integration/navigation-helper";
+import experimentMixin from "@/mixins/experiment-mixin";
+import { experimentSettings } from "@/constants/experiments";
import vinPagesMixin from "@/mixins/vin-pages-mixin";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
diff --git a/src/layouts/insurance-company/insurance-company-question.vue b/src/layouts/insurance-company/insurance-company-question.vue
index f8f7bbc6a..49e1eb8c8 100644
--- a/src/layouts/insurance-company/insurance-company-question.vue
+++ b/src/layouts/insurance-company/insurance-company-question.vue
@@ -96,29 +96,15 @@ export default {
findMatches(request, response) {
const matches = [];
const term = request?.term?.toUpperCase();
- const nonPriorityMatches = [];
-
this.searchableInsuranceCompanyList.forEach((company, index) => {
if (
- company.accountName.toUpperCase().indexOf(term) !== -1 ||
- company.altTerms.toUpperCase().indexOf(term) !== -1
+ company.accountName.indexOf(term) !== -1 ||
+ company.altTerms.indexOf(term) !== -1
) {
matches.push(company.accountName);
}
});
-
- // Prioritize matched typed entries to top of list
- const priorityMatches = matches.filter((companyName, index) => {
- if (companyName.toUpperCase().indexOf(term) === 0) {
- return companyName;
- } else {
- nonPriorityMatches.push(companyName);
- }
- });
-
- const prioritizedMatches = [...priorityMatches, ...nonPriorityMatches];
-
- response(prioritizedMatches);
+ response(matches);
},
selectInsuranceCompany(parentAccountName) {
// this runs upon user selection within jQueryUI Autocomplete
@@ -126,14 +112,9 @@ export default {
console.error("No insurance companies found");
return;
}
- if (parentAccountName) {
- const parentAccountNumber = this.getParentAccountNumber(parentAccountName);
- this.selectedAccountNumber = parentAccountNumber;
- this.selectedAccountName = this.getParentAccountName(parentAccountNumber);
- } else {
- this.selectedAccountNumber = "";
- this.selectedAccountName = "";
- }
+ const parentAccountNumber = this.getParentAccountNumber(parentAccountName);
+ this.selectedAccountNumber = parentAccountNumber;
+ this.selectedAccountName = this.getParentAccountName(parentAccountNumber);
},
},
mounted() {
@@ -150,12 +131,20 @@ export default {
},
minLength: 0, // Necessary to display fmenu when clearing input
+ // Bold matching letters as you type in the input
+ search: function (event, ui) {
+ setTimeout(() => {
+ let w = $(this).autocomplete("widget").find("div");
+ let regExpString = "(" + this.value + ")";
+ let re = new RegExp(regExpString, "i");
+ w.html((i, html) =>
+ html.replace(re, "$1")
+ );
+ }, 5);
+ },
select: function (event, ui) {
select(ui.item.value);
},
- change: function (event, ui) {
- select(ui?.item?.value);
- },
});
}, 0);
},
diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue
index a15de8311..55a8149e3 100644
--- a/src/layouts/insurance-company/insurance-company.vue
+++ b/src/layouts/insurance-company/insurance-company.vue
@@ -20,7 +20,7 @@
@@ -44,7 +44,7 @@ import { storeActions } from "@/constants/store-actions";
import { Form, defineRule } from "vee-validate";
import baseMixin from "@/mixins/base-mixin.js";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
-import { applicationConfig } from "@/constants/application-config";
+
import store from "@/store";
export default {
@@ -84,22 +84,9 @@ export default {
originalList: [],
};
},
- computed: {
- isParentAccountNumber() {
- return !!this.parentAccountNumber;
- },
- },
methods: {
- isCashParentAccountNumber() {
- return (
- applicationConfig.CASH_PARENT_ACCOUNT_NUMBER.toString() ===
- store.getters.order?.payment?.parentAccountNumber.toString()
- );
- },
parentAccountNumberFromStore() {
- const accountNumber = !this.isCashParentAccountNumber()
- ? store.getters.order?.payment?.parentAccountNumber.toString()
- : "";
+ const accountNumber = store.getters.order?.payment?.parentAccountNumber.toString();
return accountNumber;
},
arePagePrerequisitesValid() {
diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue
index 0910920a9..07414ae7d 100644
--- a/src/layouts/payment-method/payment-method.vue
+++ b/src/layouts/payment-method/payment-method.vue
@@ -113,7 +113,7 @@ import { errorMessages } from "@/constants/error-messages";
import { AppointmentTypeStrings } from "@/constants/schedule-constants";
import { partTypeStrings } from "@/constants/part-type-strings";
import { mapTaxedLineItemsToStoreFormat } from "../../store";
-import { coverageStatus } from "@/constants/insurance";
+import { coverageStatus } from "@/constants/coverage-status";
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
@@ -559,12 +559,10 @@ export default {
const piaExperience = this.getSettingValue(experimentSettings.PIA_EXPERIENCE);
const piaInsurance = this.getSettingValue(experimentSettings.PIA_INSURANCE);
- var isEnabled = false;
- if (this.isInsurance) {
- isEnabled = piaInsurance === "true" && this.currentDeductible !== 0;
- } else {
- isEnabled = piaExperience === "PIA Optional" || piaExperience === "PIA Required";
- }
+ const isEnabled =
+ piaExperience === "PIA Optional" ||
+ piaExperience === "PIA Required" ||
+ piaInsurance === "true";
return !isEnabled;
},
diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue
index e21780181..90378efea 100644
--- a/src/layouts/payment/payment.vue
+++ b/src/layouts/payment/payment.vue
@@ -224,7 +224,7 @@ import { deepClone } from "@/helpers/object-helper";
import { submitWorkOrder } from "@/helpers/heritage-integration/order-helper.js";
import iframeResize from "../../../node_modules/iframe-resizer/js/iframeResizer.js";
import { routerParams } from "@/router/router-constants/router-params";
-import { coverageStatus } from "@/constants/insurance";
+import { coverageStatus } from "@/constants/coverage-status";
export default {
name: "payment",
diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue
index bf36b7d06..f7e82156a 100644
--- a/src/layouts/quote/quote.vue
+++ b/src/layouts/quote/quote.vue
@@ -98,7 +98,7 @@ import { required } from "@/helpers/validation-rules";
import { errorMessages } from "@/constants/error-messages";
import { Form, defineRule } from "vee-validate";
import { applicationConfig } from "@/constants/application-config";
-import { payWithInsuranceStates } from "@/constants/insurance";
+import { payWithInsuranceStates } from "@/constants/pay-with-insurance-states";
import {
revalidatePromosAndValidateQueryStringPromo,
buildToastMessagesFromRevalidateOrValidatePromoResponse,
diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
index 64bf159ff..ca452ac01 100644
--- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
+++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue
@@ -32,7 +32,6 @@ export default {
cmsWidgetName: String,
isServiceableMobile: Boolean,
isServiceableInshop: Boolean,
- mobileFeeApplies: Boolean,
},
computed: {
questionText() {
@@ -46,8 +45,7 @@ export default {
const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff =
this.isServiceableInshop && !this.$store.getters.damage.isRepair;
-
- var answers = this.answersFromCms
+ return this.answersFromCms
? this.answersFromCms.filter((answer) => {
return (
(answer.Name == AppointmentTypeStrings.IN_SHOP && shouldShowInshop) ||
@@ -56,15 +54,6 @@ export default {
);
})
: [];
-
- if (!this.mobileFeeApplies) {
- answers.forEach((item) => {
- if (item.Name.toLowerCase() === "mobile") {
- item.SubText = item.SubText.replace("*", "");
- }
- });
- }
- return answers;
},
selectedValue: {
get: function () {
diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
index 4558c3294..debc25f89 100644
--- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
+++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue
@@ -25,7 +25,6 @@
@@ -154,7 +153,6 @@ export default {
alertInvalidZipWidgetName: String,
customComponentId: String,
validationRules: String,
- mobileFeeApplies: Boolean,
},
computed: {
mobileLocationLinkPromptText() {
diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue
index b83db7ebc..89b3320fd 100644
--- a/src/layouts/service-location/service-location.vue
+++ b/src/layouts/service-location/service-location.vue
@@ -67,7 +67,6 @@
:isServiceableMobile="isServiceableMobile"
:isServiceableInshop="isServiceableInshop"
:isDisplayed="isAppointmentTypeDisplayed"
- :mobileFeeApplies="mobileFeeApplies"
ref="appointmentTypeQuestion"
groupName="appointmentTypeQuestion"
cmsWidgetName="AppointmentTypeQuestionWidget"
@@ -81,7 +80,6 @@
v-if="selectedAppointmentType === 'Mobile'"
v-model="mobileLocationQuestions"
:mobileFeePart="mobileFeePart"
- :mobileFeeApplies="mobileFeeApplies"
@updated-mobile-fee-part="setMobileFeePart"
@updated-serviceability="setServiceabilityDetails"
@updated-contains-military-base="setContainsMilitaryBase"
@@ -141,7 +139,7 @@ import {
getShopProviderData,
} from "@/layouts/service-location/helpers/service-location-helper/service-location-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
-import { applicationConfig } from "@/constants/application-config";
+
import { Provider } from "@/layouts/service-location/classes/provider";
import store from "@/store";
@@ -302,13 +300,6 @@ export default {
return this.isGlassServiceableMobile;
}
},
- mobileFeeApplies() {
- if (this.mobileFeePart) {
- return true;
- } else {
- return false;
- }
- },
isServiceableInshop() {
if (this.isRecalibrationServiceableInshop !== null) {
return this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop;
@@ -359,26 +350,17 @@ export default {
methods: {
arePagePrerequisitesValid() {
// insurance drops the recycle fee on replace orders so it won't be in supportingItems
- if (store.getters.payment.isInsurance) {
- if (
- store.getters.payment.parentAccountNumber !==
- applicationConfig.CASH_PARENT_ACCOUNT_NUMBER &&
- store.getters.order.policy.policyNumber &&
- store.getters.order.serviceLocation.zipCode
- ) {
- return true;
- } else {
- return false;
- }
+ if (store.getters.payment.isInsurance && !store.getters.order.damage.isRepair) {
+ return (
+ store.getters.order.serviceLocation.zipCode !== null &&
+ store.getters.payment.isInsurance !== null
+ );
} else {
- if (
- store.getters.lineItems.supportingItems &&
- store.getters.order.serviceLocation.zipCode
- ) {
- return true;
- } else {
- return false;
- }
+ return (
+ store.getters.lineItems.supportingItems !== null &&
+ store.getters.order.serviceLocation.zipCode !== null &&
+ store.getters.payment.isInsurance !== null
+ );
}
},
setData(zipCodeData, serviceabilityDetails, mobileFeePart, shopProviderData) {
diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js
index 36f694d5e..1a2939d3d 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.spec.js
+++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js
@@ -728,7 +728,6 @@ describe("vehicle-damage.vue", () => {
getters: {
vehicle: {},
payment: { insuranceCoverage: { isVerified: true } },
- requiresVerifiedRedirecting: true,
},
},
},
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index ec19c3800..3b613ad3a 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -541,7 +541,7 @@ export default {
return this.$route.params[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT];
},
shouldHideBackButton() {
- return this.$store.getters.requiresVerifiedRedirecting;
+ return this.$store.getters.payment.insuranceCoverage.isVerified;
},
},
diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue
index 82dc54f22..e4a19d335 100644
--- a/src/layouts/vehicle/vehicle.vue
+++ b/src/layouts/vehicle/vehicle.vue
@@ -348,7 +348,7 @@ export default {
isDisabled(options) {
if (
!options.length ||
- store.getters.requiresVerifiedRedirecting ||
+ store.getters.payment?.insuranceCoverage?.isVerified ||
getFunnelCookie()?.HasDelayedClaimRegistration
) {
return true;
diff --git a/src/layouts/vin-lookup/vin-lookup.spec.js b/src/layouts/vin-lookup/vin-lookup.spec.js
index 39aa0f008..1d7d3f493 100644
--- a/src/layouts/vin-lookup/vin-lookup.spec.js
+++ b/src/layouts/vin-lookup/vin-lookup.spec.js
@@ -22,7 +22,6 @@ jest.mock("@/store", () => ({
customer: {
emailAddress: "builddigitaltest@safelite.com",
},
- referralNumber: "666666",
},
payment: {
insuranceCoverage: {
diff --git a/src/router/index.js b/src/router/index.js
index 2ce833135..90ac5881b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -116,22 +116,6 @@ const routes = [
}
}
- // Reroute around pages that should not be available.
-
- // Exception 1: Integrated Users should not see vehicle or quote pages.
- if (store.getters.requiresVerifiedRedirecting) {
- if (to.query.fmgPage === fmgPageValues.VEHICLE) {
- to.query.fmgPage = fmgPageValues.VEHICLE_DAMAGE;
- } else if (
- to.query.fmgPage === fmgPageValues.QUOTE ||
- to.query.fmgPage === fmgPageValues.INSURANCE_COMPANY
- ) {
- // Push to heritage if going to quote & integrated.
- await navigateToHeritageFunnel({ shouldSaveSession: false });
- return next(false);
- }
- }
-
await runExperiments(to.query.fmgPage);
// Process funnel cookie.
@@ -160,7 +144,6 @@ const routes = [
if (!isExistingFmgPageName(to.query.fmgPage)) {
console.log("Not an existing fmg page name:" + to.query.fmgPage);
GoToFunnelStartOn404(next);
- return;
}
// Get route info for the given url. Names will have a 1:1 relationship with names in the Cms.
@@ -245,7 +228,7 @@ router.beforeEach(async (to, from, next) => {
// Refresh page if navigating to self to prevent locking.
// For now only carved out for vehicle; all modals are opened through anchor tags at the moment,
// which also self navigate, but relied on the page remaining the same on self-navigation.
- } else if (toQueryPage === fromQueryPage && toQueryPage === getRedirectedStartPage()) {
+ } else if (toQueryPage === fromQueryPage && toQueryPage === funnelStartPageName) {
router.go(0);
} else {
next();
@@ -494,7 +477,7 @@ async function DisplayPageError() {
// we use the pageError querystring as a counter to how many times a user has experienced an error and been routed here.
// once they receive more than 1 pageerrors, we'll reset their state to hopefully correct any issues they may be having.
var navPage = fmgPageValues.VEHICLE;
- if (store.getters.requiresVerifiedRedirecting) {
+ if (store.getters.payment.insuranceCoverage.isVerified) {
navPage = fmgPageValues.VEHICLE_DAMAGE;
}
@@ -559,12 +542,4 @@ async function runExperiments(nextPage) {
);
}
-function getRedirectedStartPage() {
- if (store.getters.requiresVerifiedRedirecting) {
- return fmgPageValues.VEHICLE_DAMAGE;
- } else {
- return funnelStartPageName;
- }
-}
-
export default router;
diff --git a/src/store/index.js b/src/store/index.js
index 5d142a1f9..64a7518d9 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -33,8 +33,7 @@ import {
} from "@/helpers/promotions-helper";
import { getDateDifferenceInDays } from "@/helpers/date-helper";
import sharedMutations from "./vuex-shared-mutations/vuexSharedMutations";
-import { coverageStatus, coverageStatusValue } from "@/constants/insurance";
-
+import { coverageStatus, coverageStatusValue } from "@/constants/coverage-status";
// Export State
const getDefaultState = () => {
return {
@@ -776,9 +775,6 @@ export const getters = {
}
return false;
},
- requiresVerifiedRedirecting: (state) => {
- return state.order?.referralNumber?.length === 6;
- },
};
function getNonFalseValuesOfPropertyInArrayOfObjects(array, propertyName) {
@@ -1386,9 +1382,7 @@ export const actions = {
getMobileFeePart(context, { pageNameToLog }) {
const damageType = context.getters.damage.isRepair ? "Repair" : "Replace";
const parentAccountNumber = context.getters.payment.parentAccountNumber;
- const billToAccountNumber = context.getters.payment.billToAccountNumber
- ? context.getters.payment.billToAccountNumber
- : applicationConfig.CASH_DEFAULT_BILL_TO_ACCOUNT_NUMBER;
+ const billToAccountNumber = context.getters.payment.billToAccountNumber;
return globalMethods.callHttpClient({
method: endpoints.GetMobileFeePart.method,