diff --git a/public/favicon.ico b/public/favicon.ico
index 0dd4da633..398c90449 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ
diff --git a/public/index.html b/public/index.html
index b8a80e384..edf50a0f4 100644
--- a/public/index.html
+++ b/public/index.html
@@ -11,7 +11,7 @@
-
+
<%= htmlWebpackPlugin.options.title %>
diff --git a/src/assets/img/logo.svg b/src/assets/img/logo.svg
index 33c00d936..5892bbdaf 100644
--- a/src/assets/img/logo.svg
+++ b/src/assets/img/logo.svg
@@ -1,8 +1,6 @@
-
\ No newline at end of file
diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue
index 24e12d549..8de05c3c1 100644
--- a/src/fmg-components/funnel-header/funnel-header.vue
+++ b/src/fmg-components/funnel-header/funnel-header.vue
@@ -94,6 +94,7 @@ export default {
}
.logo-image {
- max-width: 78px;
+ max-width: 114px;
+ height: auto;
}
diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue
index 4931b9c61..9c2ce4caf 100644
--- a/src/layouts/estimate/estimate.vue
+++ b/src/layouts/estimate/estimate.vue
@@ -258,8 +258,13 @@ export default {
this.displayNonServiceableZipAlert = false;
const payment = this.$store.getters.payment;
+ const policy = this.$store.getters.policy;
+
const vehicleChangedDuringPolicyLookupInHeritage =
- payment.isInsurance && payment.insuranceCoverage.coverageStatus;
+ payment.isInsurance &&
+ payment.insuranceCoverage.coverageStatus &&
+ policy.policyNumber !== "";
+
if (vehicleChangedDuringPolicyLookupInHeritage) {
navigateToHeritageFunnel({
shouldSaveSession: true,
diff --git a/src/layouts/insurance-company/insurance-company-question.vue b/src/layouts/insurance-company/insurance-company-question.vue
index b69a77d49..49e1eb8c8 100644
--- a/src/layouts/insurance-company/insurance-company-question.vue
+++ b/src/layouts/insurance-company/insurance-company-question.vue
@@ -1,6 +1,6 @@
0) {
- return this.selectedAccountName;
- } else {
- return this.modelValue?.toString();
- }
+ return this.modelValue?.toString();
},
set: function (newValue) {
- this.$emit("update:modelValue", newValue);
+ this.$emit("update:modelValue", newValue); // send data up to v-model on parent, s/b account number
},
},
searchableInsuranceCompanyList() {
@@ -79,6 +69,30 @@ export default {
},
},
methods: {
+ getParentAccountNumber(name) {
+ const matchedItems = this.searchableInsuranceCompanyList?.filter((item) => {
+ return item.accountName?.toString() === name.toString();
+ });
+
+ if (matchedItems.length > 0) {
+ return matchedItems[0].parentAccountNumber;
+ } else {
+ console.error("Error locating accountNumber");
+ return;
+ }
+ },
+ getParentAccountName(number) {
+ const matchedItems = this.searchableInsuranceCompanyList?.filter((item) => {
+ return item.parentAccountNumber?.toString() === number.toString();
+ });
+
+ if (matchedItems.length > 0) {
+ return matchedItems[0].accountName;
+ } else {
+ console.error("Error locating accountName");
+ return;
+ }
+ },
findMatches(request, response) {
const matches = [];
const term = request?.term?.toUpperCase();
@@ -92,26 +106,23 @@ export default {
});
response(matches);
},
- selectParentAccountNumber(parentAccountName) {
+ selectInsuranceCompany(parentAccountName) {
+ // this runs upon user selection within jQueryUI Autocomplete
if (!this.searchableInsuranceCompanyList) {
console.error("No insurance companies found");
return;
}
-
- const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
- return item.accountName === parentAccountName;
- });
-
- if (selectedItem) {
- this.selectedAccountName = parentAccountName;
- this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
- } else {
- console.error("Error locating " + parentAccountName);
- }
+ const parentAccountNumber = this.getParentAccountNumber(parentAccountName);
+ this.selectedAccountNumber = parentAccountNumber;
+ this.selectedAccountName = this.getParentAccountName(parentAccountNumber);
},
},
mounted() {
- const select = this.selectParentAccountNumber;
+ if (this.modelValue.length > 0) {
+ this.selectedAccountName = this.getParentAccountName(this.modelValue?.toString());
+ }
+
+ const select = this.selectInsuranceCompany;
setTimeout(() => {
$("#autocomplete").autocomplete({
source: this.findMatches,
diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue
index 5e3ece93a..55a8149e3 100644
--- a/src/layouts/insurance-company/insurance-company.vue
+++ b/src/layouts/insurance-company/insurance-company.vue
@@ -11,9 +11,11 @@
-
+
+
+
{
);
});
describe("hide back button", () => {
- test("if claim registration is delayed => should hide back button", () => {
- // Arrange
- const { wrapper } = setupMocks({
- funnelCookie: {
- HasDelayedClaimRegistration: true,
- },
- });
-
- // Assert
- expect(wrapper.vm.shouldHideBackButton).toBe(true);
- });
-
test("if claim is verified => should hide back button", () => {
// Arrange
const { wrapper } = setupMocks({
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index 866567101..3b613ad3a 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -93,6 +93,7 @@ import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-que
import alert from "@/ux-components/alert/alert";
// Supporting files
+import { skipVinLookup } from "@/helpers/heritage-integration/navigation-helper";
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
import { storeActions } from "@/constants/store-actions";
@@ -365,25 +366,38 @@ export default {
return this.navigateForward();
},
- navigateForward() {
+ async navigateForward() {
const payment = this.$store.getters.payment;
+ const policy = this.$store.getters.policy;
const vehicleChangedDuringPolicyLookupInHeritage =
payment.isInsurance &&
payment.insuranceCoverage.coverageStatus &&
- payment.insuranceCoverage.coverageStatus !== "";
+ payment.insuranceCoverage.coverageStatus !== "" &&
+ policy.policyNumber !== "";
+
if (vehicleChangedDuringPolicyLookupInHeritage) {
- if (store.getters.damage.isRepair) {
+ const skipVin = await skipVinLookup();
+
+ if (skipVin) {
this.$router.navigateWithSaving(
- this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
+ this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN,
this.$route
);
} else {
- this.$router.navigateWithSaving(
- this.navigationScenarios
- .CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
- this.$route
- );
+ if (store.getters.damage.isRepair) {
+ this.$router.navigateWithSaving(
+ this.navigationScenarios
+ .CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
+ this.$route
+ );
+ } else {
+ this.$router.navigateWithSaving(
+ this.navigationScenarios
+ .CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
+ this.$route
+ );
+ }
}
}
// If vin already exists, navigate directly to vin-lookup
@@ -527,10 +541,7 @@ export default {
return this.$route.params[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT];
},
shouldHideBackButton() {
- return (
- this.$store.getters.payment.insuranceCoverage.isVerified ||
- getFunnelCookie()?.HasDelayedClaimRegistration
- );
+ return this.$store.getters.payment.insuranceCoverage.isVerified;
},
},
diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue
index 18f9064d2..e4a19d335 100644
--- a/src/layouts/vehicle/vehicle.vue
+++ b/src/layouts/vehicle/vehicle.vue
@@ -12,7 +12,7 @@
isDefined(lineItem.salesTax));
- if (isPricingAvailable) {
+ //unverified (in scenarios we don’t display the price)
+ if (
+ order.payment.isInsurance &&
+ isDefined(order.payment.insuranceCoverage.isVerified) &&
+ !order.payment.insuranceCoverage.isVerified
+ ) {
+ payload.priceSubTotal = "";
+ }
+ //deductible (in scenarios we don’t display the price)
+ else if (
+ order.payment.isInsurance &&
+ isDefined(order.payment.insuranceCoverage.isVerified) &&
+ order.payment.insuranceCoverage.isVerified &&
+ isDefined(order.policy.currentDeductible) &&
+ order.policy.currentDeductible == 0
+ ) {
+ payload.priceSubTotal = "";
+ } else if (isPricingAvailable) {
const subtotal = baseMixin.methods
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
.toFixed(2);
@@ -271,8 +288,24 @@ export default {
} else {
payload.priceSubTotal = "";
}
-
- if (isTaxAvailable) {
+ //unverified (in scenarios we don’t display the price)
+ if (
+ order.payment.isInsurance &&
+ isDefined(order.payment.insuranceCoverage.isVerified) &&
+ !order.payment.insuranceCoverage.isVerified
+ ) {
+ payload.priceTotal = "";
+ }
+ //deductible (in scenarios we don’t display the price)
+ else if (
+ order.payment.isInsurance &&
+ isDefined(order.payment.insuranceCoverage.isVerified) &&
+ order.payment.insuranceCoverage.isVerified &&
+ isDefined(order.policy.currentDeductible) &&
+ order.policy.currentDeductible == 0
+ ) {
+ payload.priceTotal = "";
+ } else if (isTaxAvailable) {
const total = baseMixin.methods
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, true)
.toFixed(2);
@@ -295,6 +328,31 @@ export default {
} else {
payload.appointmentType = "";
}
+ //Insurance
+ if (order.payment.isInsurance) {
+ payload.isInsuranceVerified = order.payment.insuranceCoverage.isVerified ?? "";
+ if (!order.payment.insuranceCoverage.isVerified) {
+ payload.isInsuranceItac = "";
+ payload.isInsuranceNoComp = "";
+ } else {
+ payload.isInsuranceItac = order.policy.isItac ?? "";
+ payload.isInsuranceNoComp = order.policy.isNoComp ?? "";
+ }
+ if (
+ order.policy.isItac ||
+ order.policy.isNoComp ||
+ !order.payment.insuranceCoverage.isVerified
+ ) {
+ payload.insuranceDeductible = "";
+ } else {
+ payload.insuranceDeductible = order.policy.currentDeductible ?? "";
+ }
+ } else {
+ payload.isInsuranceVerified = "";
+ payload.insuranceDeductible = "";
+ payload.isInsuranceItac = "";
+ payload.isInsuranceNoComp = "";
+ }
pushToDataLayerIfDefined(payload);
},
diff --git a/src/mixins/analytics-mixin.spec.js b/src/mixins/analytics-mixin.spec.js
index 42aba5f31..e56840c61 100644
--- a/src/mixins/analytics-mixin.spec.js
+++ b/src/mixins/analytics-mixin.spec.js
@@ -454,7 +454,15 @@ describe("analyticsMixin.js", () => {
// Assert
console.log(result);
const allFieldsPopulated = Object.keys(result).every(
- (key) => result[key] === false || !!result[key]
+ (key) =>
+ result[key] === false ||
+ !!result[key] ||
+ (result["accountType"] === "cash"
+ ? result["isInsuranceVerified"] === "" &&
+ result["insuranceDeductible"] === "" &&
+ result["isInsuranceItac"] === "" &&
+ result["isInsuranceNoComp"] === ""
+ : false)
);
expect(allFieldsPopulated).toBe(true);
});
@@ -543,7 +551,15 @@ describe("analyticsMixin.js", () => {
// Assert
console.log(result);
const allFieldsPopulated = Object.keys(result).every(
- (key) => result[key] === false || !!result[key]
+ (key) =>
+ result[key] === false ||
+ !!result[key] ||
+ (result["accountType"] === "cash"
+ ? result["isInsuranceVerified"] === "" &&
+ result["insuranceDeductible"] === "" &&
+ result["isInsuranceItac"] === "" &&
+ result["isInsuranceNoComp"] === ""
+ : false)
);
expect(allFieldsPopulated).toBe(true);
});
diff --git a/src/store/index.js b/src/store/index.js
index 097c16689..ac817c6a1 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -12,7 +12,11 @@ import { singleWindshieldCarIds } from "@/constants/single-windshield-carids";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
import { deepEqual } from "@/helpers/object-helper";
-import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/schedule-constants";
+import {
+ AppointmentTypeStrings,
+ PREMIUM_FEE_PART_TYPE,
+ RouteCodeFlags,
+} from "@/constants/schedule-constants";
import { getQuerystringParameter } from "@/helpers/querystring-helper";
import { deepClone } from "@/helpers/object-helper";
import { queryStrings } from "@/constants/query-strings";
@@ -577,7 +581,7 @@ export const mutations = {
state.order.customer.emailAddress = sessionInformation.order.customer.emailAddress;
state.order.customer.firstName = sessionInformation.order.customer.firstName;
state.order.customer.lastName = sessionInformation.order.customer.lastName;
- state.order.customer.phoneNumber = sessionInformation.order.customer.phoneNumber;
+ state.order.customer.phoneNumber = sessionInformation.order.customer.homePhone;
state.order.customer.isSmsOptIn = sessionInformation.order.customer.isSmsOptIn;
state.applicationUser.experiments = sessionInformation.applicationUser.experiments;
@@ -641,6 +645,9 @@ export const getters = {
isDropOffAppointment: (state) => {
return state.order.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF;
},
+ isOvernightDropOffAppointment: (state) => {
+ return state.order.schedule.routeCode?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF);
+ },
isRecalibrationOnOrder: (state) => {
return getHasRecalibrationPart(state);
},
@@ -1498,17 +1505,9 @@ export const actions = {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
- let lineItems = [
- ...(order.lineItems.supportingItems ?? []),
- ...(order.lineItems.vaps ?? []),
- ...getFlattenedArrayOfLineItemsWithChildParts(order.lineItems.glassParts),
- ];
- lineItems = lineItems.map((lineItem) => {
- return {
- partNumber: lineItem.partNumber,
- partType: lineItem.partType,
- };
- });
+
+ const lineItems = getFlattenedLineItemsWithGlassPartTag(order.lineItems);
+
const glassPieces = order.damage.glassToReplace
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
: [];
@@ -1567,17 +1566,7 @@ export const actions = {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
- let lineItems = [
- ...(order.lineItems.supportingItems ?? []),
- ...(order.lineItems.vaps ?? []),
- ...getFlattenedArrayOfLineItemsWithChildParts(order.lineItems.glassParts),
- ];
- lineItems = lineItems.map((lineItem) => {
- return {
- partNumber: lineItem.partNumber,
- partType: lineItem.partType,
- };
- });
+ const lineItems = getFlattenedLineItemsWithGlassPartTag(order.lineItems);
const glassPieces = order.damage.glassToReplace
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
: [];
@@ -1748,7 +1737,10 @@ export const actions = {
lastFour: order.payment.ccToken.lastFour,
},
},
- policy: {},
+ policy: {
+ isItac: order.policy?.isItac,
+ isNoComp: order.policy?.isNoComp,
+ },
serviceLocation: {
streetAddress: order.serviceLocation.address,
streetAddress2: order.serviceLocation.address2,
@@ -1819,7 +1811,7 @@ export const actions = {
savedSessionId: savedSessionId?.toString(),
referralNumber: referralNumber?.toString(),
referralDate: referralDate?.toString(),
- parentAccountNumber: parentAccountNumber,
+ parentAccountNumber: parentAccountNumber?.toString(),
referralCorrelationId: referralCorrelationId,
},
logApiCall: true,
@@ -1837,7 +1829,10 @@ export const actions = {
});
// clear the state if the existing EON does not equal what is returned from loadSession
- if (context.state.order.eon && context.state.order.eon != response.data.eon) {
+ if (
+ context.state.order.eon &&
+ context.state.order.eon != response.data.order.eon
+ ) {
context.commit(storeMutations.RESET_STATE);
}
@@ -2893,6 +2888,28 @@ function getFlattenedArrayOfLineItemsWithChildParts(lineItems) {
return flattenedArray;
}
+function getFlattenedLineItemsWithGlassPartTag(lineItems) {
+ const nonGlassLineItems = [...(lineItems.supportingItems ?? []), ...(lineItems.vaps ?? [])];
+ const mappedNonGlassLineItems = nonGlassLineItems.map((lineItem) => {
+ return {
+ partNumber: lineItem.partNumber,
+ partType: lineItem.partType,
+ isGlassPart: false,
+ };
+ });
+
+ const glassLineItems = [...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts)];
+ const mappedGlassLineItems = glassLineItems.map((lineItem) => {
+ return {
+ partNumber: lineItem.partNumber,
+ partType: lineItem.partType,
+ isGlassPart: true,
+ };
+ });
+
+ return [...mappedNonGlassLineItems, ...mappedGlassLineItems];
+}
+
function buildQueryStringParameterFromArrayOfComplexObjects(arrayOfObjects, parameterName) {
let queryStringParameter = "";
for (let i = 0; i < arrayOfObjects.length; i++) {
@@ -3075,7 +3092,8 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
});
});
- if (!routeCodeFound) {
+ //reset schedule if jobMin is null because when switching from cash to insurance dynamo returns null for jobMin
+ if (!routeCodeFound || order.schedule.jobMinMinutes == null) {
context.commit(storeMutations.RESET_SCHEDULE);
return;
}
diff --git a/src/styles/common-typography-styles.scss b/src/styles/common-typography-styles.scss
index 72b2e5875..b15c07a88 100644
--- a/src/styles/common-typography-styles.scss
+++ b/src/styles/common-typography-styles.scss
@@ -13,26 +13,31 @@ h1,
line-height: 1.325;
font-weight: 300;
}
+
h2,
.h2 {
line-height: 1.325;
font-weight: 300;
}
+
h3,
.h3 {
line-height: 1.375;
font-weight: 300;
}
+
h4,
.h4 {
line-height: 1.6;
font-weight: 300;
}
+
h5,
.h5 {
line-height: 1.325;
font-weight: 400;
}
+
h6,
.h6 {
line-height: 1.7;
@@ -70,3 +75,69 @@ caption,
line-height: 1.4;
font-weight: 500;
}
+
+// Poppins styles from Google Fonts
+
+// Regular styles
+
+.poppins-light {
+ font-family: "Poppins", sans-serif;
+ font-weight: 300;
+ font-style: normal;
+}
+
+.poppins-regular {
+ font-family: "Poppins", sans-serif;
+ font-weight: 400;
+ font-style: normal;
+}
+
+.poppins-medium {
+ font-family: "Poppins", sans-serif;
+ font-weight: 500;
+ font-style: normal;
+}
+
+.poppins-semibold {
+ font-family: "Poppins", sans-serif;
+ font-weight: 600;
+ font-style: normal;
+}
+
+.poppins-bold {
+ font-family: "Poppins", sans-serif;
+ font-weight: 700;
+ font-style: normal;
+}
+
+// Italic styles
+
+.poppins-light-italic {
+ font-family: "Poppins", sans-serif;
+ font-weight: 300;
+ font-style: italic;
+}
+
+.poppins-regular-italic {
+ font-family: "Poppins", sans-serif;
+ font-weight: 400;
+ font-style: italic;
+}
+
+.poppins-medium-italic {
+ font-family: "Poppins", sans-serif;
+ font-weight: 500;
+ font-style: italic;
+}
+
+.poppins-semibold-italic {
+ font-family: "Poppins", sans-serif;
+ font-weight: 600;
+ font-style: italic;
+}
+
+.poppins-bold-italic {
+ font-family: "Poppins", sans-serif;
+ font-weight: 700;
+ font-style: italic;
+}
diff --git a/src/styles/ux-variables.scss b/src/styles/ux-variables.scss
index 2d26125aa..0ca01ca76 100644
--- a/src/styles/ux-variables.scss
+++ b/src/styles/ux-variables.scss
@@ -10,7 +10,7 @@ $blue-200: #c1dfee;
$blue-300: #9fcee6;
$blue-400: #69adcf; // Used in theme
$blue-500: #3b8fb8;
-$blue: #1574a1; // Default Blue
+$blue: #0070d1; // Default Blue
$blue-700: #06577c;
$blue-800: #003d58;
$blue-900: #002433; // Used in theme
@@ -20,7 +20,7 @@ $red-100: #ffe6e4;
$red-200: #fcbfbb;
$red-300: #f89892;
$red-400: #e65c53;
-$red: #d4281c; // Default Red
+$red: #db0020; // Default Red
$red-600: #ac160b;
$red-700: #840900;
$red-800: #5b0600;
@@ -115,7 +115,7 @@ $theme-colors: (
$body-color: $gray-600;
//Fonts
-$font-family-sans-serif: Roboto, Arial, Helvetica, sans-serif;
+$font-family-sans-serif: Poppins, Arial, Helvetica, sans-serif;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
// stylelint-enable value-keyword-case