Merge branch 'release/2025.04.24' into feature/CASH-188

This commit is contained in:
scottkiener-at-safelite 2025-04-21 08:58:18 -04:00 committed by GitHub
commit 0b4bd2ca69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 53 additions and 380 deletions

View file

@ -5,6 +5,7 @@
:class="[
this.buttonLabelSubCopy ? 'has-subheader' : '',
this.additionalButtonData.isInsuranceSelected ? 'is-insurance' : '',
this.hasPackageDiscount() ? 'has-package-discount' : '',
]"
for="testradio">
<div class="package-specs">
@ -54,12 +55,7 @@
v-html="this.buttonFooterCopy"></div>
</div>
<div
v-if="
this.additionalButtonData.servicePackageDiscount &&
this.additionalButtonData.Text
"
class="special-save-box">
<div v-if="hasPackageDiscount()" class="special-save-box">
<span v-html="this.additionalButtonData.Text"></span>
</div>
<span class="pricing-info">
@ -78,7 +74,7 @@
<span>in 4 interest-free payments</span>
<div>
or
<span v-html="this.buttonAuxillaryCopy"></span>
<span v-html="truncatedSinglePayment()"></span>
<span
class="strikethrough-price"
v-if="shouldDisplayStrikeThroughPrice"
@ -141,6 +137,14 @@ export default {
const decimalPrice = parseFloat(this.buttonAuxillaryCopy.replace("$", ""));
return "$" + (decimalPrice / 4).toFixed(2);
},
truncatedSinglePayment() {
return "$" + Math.trunc(this.buttonAuxillaryCopy.replace("$", ""));
},
hasPackageDiscount() {
return (
this.additionalButtonData.servicePackageDiscount && this.additionalButtonData.Text
);
},
},
};
</script>
@ -209,12 +213,6 @@ export default {
}
&.has-subheader {
min-height: 150px;
&.is-insurance {
min-height: 72px;
}
& > .package-specs {
& > div:first-of-type {
display: flex;
@ -222,6 +220,10 @@ export default {
}
}
&.has-package-discount {
min-height: 150px;
}
&:before {
content: "";
position: relative;

View file

@ -11,6 +11,7 @@
</div>
</div>
<div class="footer-inner-wrapper">
<p class="mx-3 my-0 pb-1">&copy; 2025 Safelite Group</p>
<textLink
linkType="newWindowLink"
text="Terms of service"
@ -32,11 +33,6 @@
linkType="navigation"
text="Cookie preferences"
href="javascript:OneTrust.ToggleInfoDisplay();" />
<textLink
linkType="newWindowLink"
text="Warranty"
href="//www.safelite.com/national-lifetime-warranty"
target="_blank" />
<textLink
linkType="newWindowLink"
text="Notice at collection"
@ -83,6 +79,14 @@ export default {
justify-content: center;
align-items: center;
p {
font-size: 0.875rem;
color: $black;
@include media-breakpoint-up(md) {
font-size: 1rem;
}
}
:deep(a) {
text-decoration: none;
&.new-window-link {

View file

@ -72,6 +72,7 @@ export class Logger {
applicationConfig.CONSUMER_CF_DISTRO + applicationConfig.FRONTEND_LOGGER_PATH;
const headers = {
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings),
[headerKeys.APPLICATION_NAME]: applicationConfig.APPLICATION_NAME,
};
axios({

View file

@ -182,39 +182,6 @@ describe("address-lookup.vue", () => {
// Assert
expect(wrapper.findComponent({ ref: "alertVinNotFound" }).isVisible()).toBe(true);
});
test("should show the AlertNoService when displayNoServiceAlert is true", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: true,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Set displayNoServiceAlert to true
await wrapper.setData({ displayNoServiceAlert: true });
// Check if the AlertNoService component is rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(true);
});
test("should hide the AlertNoService when displayNoServiceAlert is false", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: false,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Ensure displayNoServiceAlert is false
await wrapper.setData({ displayNoServiceAlert: false });
// Check if the AlertNoService component is not rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(false);
});
});
describe("navigation", () => {
@ -774,18 +741,6 @@ function setupMocks({
wrapper.vm.setCmsContent = jest.fn();
wrapper.vm.$refs.navbar.updateButtonText = jest.fn();
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
const closestShops = {
data: {
providers: [
{ id: 1, name: "Shop 1" },
{ id: 2, name: "Shop 2" },
],
},
};
wrapper.vm.findClosestApplicableShops = jest.fn().mockImplementation(() => {
return new Promise((resolve) => resolve(closestShops));
});
return { wrapper };
}

View file

@ -81,20 +81,13 @@
</div>
</div>
</transition>
<alert
ref="AlertNoService"
v-if="displayNoServiceAlert"
class="my-4"
cmsWidgetName="AlertNoServiceWidget"
alertClass="alert-danger"
v-bind:isDismissible="false" />
<navbar
cmsWidgetName="FunnelFooterWidget"
ref="navbar"
:isDisabled="!meta.valid"
@ForwardClicked="forwardButtonAction"
@back-clicked="backButtonAction"
:isForwardActionDisabled="!meta.valid || displayNoServiceAlert" />
:isForwardActionDisabled="!meta.valid" />
</div>
</div>
</div>
@ -171,8 +164,6 @@ export default {
emailOrSms: this.getEmailOrSmsFromStore(),
},
serviceZipCode: this.getServiceZipFromStore(),
carId: this.getCarIdfromStore(),
isHeavyTruck: this.getIsVehicleHeavyTruckFromStore(),
displayNonServiceableZipAlert: false,
displayVinNotFoundAlert: false,
displayMatchedDifferentVehicleAlert: false,
@ -184,7 +175,6 @@ export default {
displayInvalidZipAlert: false,
showServiceZipField: this.getServiceZipFromStore(),
isZipServiceable: false,
displayNoServiceAlert: false,
};
},
methods: {
@ -229,19 +219,6 @@ export default {
getServiceZipFromStore() {
return this.$store.getters.order.serviceLocation.zipCode;
},
getCarIdfromStore() {
return store.getters.vehicle.carId;
},
getIsVehicleHeavyTruckFromStore() {
return store.getters.isHeavyTruckVehicle;
},
async findClosestApplicableShops() {
return await this.dispatchStoreActionWithLogging(
storeActions.GET_CLOSEST_APPLICABLE_SHOPS,
{ zip: this.serviceZipCode, carId: this.carId },
"address-lookup"
);
},
async forwardButtonAction() {
this.resetWarningsAndErrors();
@ -301,17 +278,6 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayInvalidZipAlert = false;
if (this.serviceZipCode != null && this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
const carsFound = resultMap.vinLookupResponse.vinVehicles;
// Handle cases for different amounts of VINS found for the address.
@ -463,7 +429,6 @@ export default {
this.displayNonServiceableZipAlert = false;
this.displayMatchedDifferentVehicleAlert = false;
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
this.displayNoServiceAlert = false;
},
},
mounted() {
@ -515,7 +480,6 @@ export default {
handler(newValue) {
// If they modify the service zip code, then hide the error message.
this.displayNonServiceableZipAlert = false;
this.displayNoServiceAlert = false;
},
},
showServiceZipField: {

View file

@ -56,7 +56,10 @@
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" />
<textBlock cmsWidgetName="DisclaimerCopyWidget" typeStyle="caption" />
<textBlock
class="mb-5"
cmsWidgetName="DisclaimerCopyWidget"
typeStyle="caption" />
</div>
</div>
</div>

View file

@ -203,3 +203,9 @@ export default {
},
};
</script>
<style lang="scss">
.ui-autocomplete {
z-index: 3;
}
</style>

View file

@ -611,42 +611,6 @@ describe("license-plate-lookup.vue", () => {
expect(arePagePrerequisitesValid).toBe(false);
});
});
describe("alerts", () => {
test("should show the AlertNoService when displayNoServiceAlert is true", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: true,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Set displayNoServiceAlert to true
await wrapper.setData({ displayNoServiceAlert: true });
// Check if the AlertNoService component is rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(true);
});
test("should hide the AlertNoService when displayNoServiceAlert is false", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: false,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Ensure displayNoServiceAlert is false
await wrapper.setData({ displayNoServiceAlert: false });
// Check if the AlertNoService component is not rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(false);
});
});
});
function setupMocks({
@ -752,18 +716,5 @@ function setupMocks({
wrapper.vm.getCmsContent = jest.fn().mockImplementation(() => "");
wrapper.vm.$refs.navbar.updateButtonText = jest.fn();
wrapper.vm.$refs.navbar.removeLoader = jest.fn();
const closestShops = {
data: {
providers: [
{ id: 1, name: "Shop 1" },
{ id: 2, name: "Shop 2" },
],
},
};
wrapper.vm.findClosestApplicableShops = jest.fn().mockImplementation(() => {
return new Promise((resolve) => resolve(closestShops));
});
return { wrapper, apiPromise };
}

View file

@ -77,14 +77,6 @@
alertClass="alert-warning"
v-bind:isDismissible="false" />
<alert
ref="AlertNoService"
v-if="displayNoServiceAlert"
class="my-4"
cmsWidgetName="AlertNoServiceWidget"
alertClass="alert-danger"
v-bind:isDismissible="false" />
<navbar
ref="navbar"
cmsWidgetName="FunnelFooterWidget"
@ -166,8 +158,6 @@ export default {
registrationZipCode: this.getRegistrationZipFromStore() ?? this.$route.query.zipcode,
emailOrSms: this.getEmailOrSmsFromStore(),
serviceZipCode: this.getServiceZipFromStore(),
carId: this.getCarIdfromStore(),
isHeavyTruck: this.getIsVehicleHeavyTruckFromStore(),
displayNonServiceableZipAlert: false,
displayVinNotFoundAlert: false,
displayMatchedDifferentVehicleAlert: false,
@ -178,7 +168,6 @@ export default {
displayInvalidZipAlert: false,
showServiceZipField: this.getServiceZipFromStore(),
isZipServiceable: false,
displayNoServiceAlert: false,
};
},
methods: {
@ -211,19 +200,6 @@ export default {
getServiceZipFromStore() {
return this.$store.getters.order.serviceLocation.zipCode;
},
getCarIdfromStore() {
return store.getters.vehicle.carId;
},
getIsVehicleHeavyTruckFromStore() {
return store.getters.isHeavyTruckVehicle;
},
async findClosestApplicableShops() {
return await this.dispatchStoreActionWithLogging(
storeActions.GET_CLOSEST_APPLICABLE_SHOPS,
{ zip: this.serviceZipCode, carId: this.carId },
"license-plate-lookup"
);
},
async forwardButtonAction() {
this.resetWarningsAndErrors();
@ -281,17 +257,6 @@ export default {
this.displayInvalidZipAlert = true;
return this.$refs.navbar.removeLoader();
}
if (this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
// Check if the CarId has changed.
this.isCarIdDifferent =
vinLookup.data.vehicle.carId !== this.$store.getters.vehicle.carId;
@ -406,7 +371,6 @@ export default {
this.displayMatchedDifferentVehicleAlert = false;
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
this.displayInvalidZipAlert = false;
this.displayNoServiceAlert = false;
},
},
mounted() {
@ -451,7 +415,6 @@ export default {
serviceZipCode() {
// If they modify the service zip code, then hide the error message.
this.displayNonServiceableZipAlert = false;
this.displayNoServiceAlert = false;
this.$refs.navbar.updateButtonText(
this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
);

View file

@ -275,8 +275,8 @@ export default {
const emailFromStore = store.getters.order.customer.emailAddress;
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
const isPopupSkipped =
store.getters.pageData(fmgPageValues.QUOTE).saveProgressPopupSkipped === true;
const showSaveProgressPopup = isEmailInStoreOnPageLoad || isPopupSkipped ? false : true;
store.getters.pageData(fmgPageValues.QUOTE)?.saveProgressPopupSkipped === true;
const showSaveProgressPopup = !(isEmailInStoreOnPageLoad || isPopupSkipped);
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
const shouldSkipToInsurance =
getBoolFromString(

View file

@ -100,7 +100,7 @@ describe("appointment-type-question.vue", () => {
]);
});
it("Should display only the In-Shop answer when only in-shop service is available", async () => {
it("Should display only the In-Shop and Drop-Off answers when only in-shop service is available", async () => {
// Arrange/Act
const { wrapper } = setupMocks({
mixins: [mockMixin],
@ -108,7 +108,6 @@ describe("appointment-type-question.vue", () => {
cmsWidgetName: cmsWidgetName,
isServiceableInshop: true,
isServiceableMobile: false,
isServiceableDropoff: false,
},
mountOptions: {
attachTo: document.body,
@ -124,6 +123,13 @@ describe("appointment-type-question.vue", () => {
SubWidgetName: "",
Text: "In-shop",
},
{
AnswerImageUrl: "",
Name: "Dropoff",
SubText: "",
SubWidgetName: "",
Text: "Drop-off",
},
]);
});

View file

@ -32,7 +32,6 @@ export default {
cmsWidgetName: String,
isServiceableMobile: Boolean,
isServiceableInshop: Boolean,
isServiceableDropoff: Boolean,
mobileFeeApplies: Boolean,
},
computed: {
@ -46,7 +45,7 @@ export default {
const shouldShowMobile = this.isServiceableMobile;
const shouldShowInshop = this.isServiceableInshop;
const shouldShowDropoff =
this.isServiceableDropoff && !this.$store.getters.damage.isRepair;
this.isServiceableInshop && !this.$store.getters.damage.isRepair;
var answers = this.answersFromCms
? this.answersFromCms.filter((answer) => {
@ -78,11 +77,6 @@ export default {
isMobileOnly() {
return this.isServiceableMobile && !this.isServiceableInshop;
},
isInshopOnly() {
return (
this.isServiceableInshop && !this.isServiceableMobile && !this.isServiceableDropoff
);
},
},
watch: {
answersToDisplay: {
@ -92,7 +86,7 @@ export default {
newValue.length == 1 &&
newValue.findIndex((answer) => answer.Name == "Mobile") != -1
) {
this.selectedValue = "Mobile";
this.selectedValues = "Mobile";
}
},
immediate: true,
@ -100,14 +94,7 @@ export default {
isMobileOnly: {
handler(newValue) {
if (newValue) {
this.selectedValue = "Mobile";
}
},
},
isInshopOnly: {
handler(newValue) {
if (newValue) {
this.selectedValue = "Inshop";
this.selectedValues = "Mobile";
}
},
},

View file

@ -76,7 +76,6 @@
v-show="isAppointmentTypeDisplayed"
:isServiceableMobile="isServiceableMobile"
:isServiceableInshop="isServiceableInshop"
:isServiceableDropoff="isServiceableDropoff"
:isDisplayed="isAppointmentTypeDisplayed"
:mobileFeeApplies="mobileFeeApplies"
ref="appointmentTypeQuestion"
@ -197,8 +196,6 @@ export default {
isVehicleProtected: this.getIsVehicleProtectedFromStore(),
isGlassServiceableInshop: null,
isRecalibrationServiceableInshop: null,
isGlassServiceableDropoff: null,
isRecalibrationServiceableDropoff: null,
isGlassServiceableMobile: null,
isRecalibrationServiceableMobile: null,
selectedAppointmentType: this.getSelectedAppointmentType(),
@ -357,13 +354,6 @@ export default {
return this.isGlassServiceableInshop;
}
},
isServiceableDropoff() {
if (this.isRecalibrationServiceableDropoff !== null) {
return this.isGlassServiceableDropoff && this.isRecalibrationServiceableDropoff;
} else {
return this.isGlassServiceableDropoff;
}
},
isShopQuestionDisplayed() {
return (
this.selectedAppointmentType === "Inshop" ||
@ -569,9 +559,6 @@ export default {
this.isGlassServiceableInshop = serviceabilityDetails.isGlassServiceableInshop;
this.isRecalibrationServiceableInshop =
serviceabilityDetails.isRecalibrationServiceableInshop;
this.isGlassServiceableDropoff = serviceabilityDetails.isGlassServiceableDropoff;
this.isRecalibrationServiceableDropoff =
serviceabilityDetails.isRecalibrationServiceableDropoff;
this.isGlassServiceableMobile = serviceabilityDetails.isGlassServiceableMobile;
this.isRecalibrationServiceableMobile =
serviceabilityDetails.isRecalibrationServiceableMobile;

View file

@ -415,33 +415,6 @@ describe("service-zip.vue", () => {
expect(wrapper.vm.displayInvalidZipAlert).toBe(false);
expect(wrapper.vm.displayNonServiceableZipAlert).toBe(false);
});
test("should show the AlertNoService when displayNoServiceAlert is true", async () => {
// Arrange
// no changes to store
applyMockStoreDataToGetters();
const wrapper = setupMocks({});
wrapper.vm.serviceZipCode = "12345";
// Act
wrapper.vm.displayNoServiceAlert = true;
// Check if the AlertNoService component is rendered
expect(wrapper.vm.displayNoServiceAlert).toBe(true);
});
test("should hide the AlertNoService when displayNoServiceAlert is false", async () => {
// Arrange
// no changes to store
applyMockStoreDataToGetters();
const wrapper = setupMocks({});
wrapper.vm.serviceZipCode = "12345";
//ACT
wrapper.vm.displayNoServiceAlert = false;
// Check if the AlertNoService component is rendered
expect(wrapper.vm.displayNoServiceAlert).toBe(false);
});
});
});
@ -538,16 +511,5 @@ function setupMocks({ customMountOptions, customZipQuery, customZipDataResponse
];
const wrapper = shallowMount(serviceZip, mountOptions);
wrapper.vm.findClosestApplicableShops = jest.fn().mockImplementation(() => {
return Promise.resolve({
data: {
providers: [
{ id: 1, name: "Shop 1" },
{ id: 2, name: "Shop 2" },
],
},
});
});
return wrapper;
}

View file

@ -47,18 +47,10 @@
v-if="displayNonServiceableZipAlert"
alertClass="alert-danger" />
<alert
ref="AlertNoService"
v-if="displayNoServiceAlert"
class="my-4"
cmsWidgetName="AlertNoServiceWidget"
alertClass="alert-danger"
v-bind:isDismissible="false" />
<navbar
cmsWidgetName="FunnelFooterWidget"
ref="navbar"
:isForwardActionDisabled="!meta.valid || displayNoServiceAlert"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" />
</div>
@ -118,11 +110,8 @@ export default {
return {
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
emailOrSms: this.getEmailOrSmsFromStore(),
carId: this.getCarIdfromStore(),
isHeavyTruck: this.getIsVehicleHeavyTruckFromStore(),
displayInvalidZipAlert: false,
displayNonServiceableZipAlert: false,
displayNoServiceAlert: false,
};
},
@ -195,19 +184,6 @@ export default {
arePagePrerequisitesValid() {
return store.getters.damage.isRepair || store.getters.damage.glassToReplace?.length > 0;
},
getCarIdfromStore() {
return store.getters.vehicle.carId;
},
getIsVehicleHeavyTruckFromStore() {
return store.getters.isHeavyTruckVehicle;
},
async findClosestApplicableShops() {
return await this.dispatchStoreActionWithLogging(
storeActions.GET_CLOSEST_APPLICABLE_SHOPS,
{ zip: this.serviceZipCode, carId: this.carId },
"service-zip"
);
},
async backButtonAction() {
const skipVin = await skipVinLookup();
// route to move backwards
@ -276,16 +252,6 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayNonServiceableZipAlert = false;
if (this.isHeavyTruck) {
const closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
const payment = this.$store.getters.payment;
const policy = this.$store.getters.policy;
@ -343,7 +309,6 @@ export default {
watch: {
serviceZipCode() {
this.displayNonServiceableZipAlert = false;
this.displayNoServiceAlert = false;
},
},
components: {

View file

@ -258,39 +258,6 @@ describe("vin-lookup.vue", () => {
// Assert
expect(wrapper.findAllComponents({ name: "alert" }).length).toBe(1);
});
test("should show the AlertNoService when displayNoServiceAlert is true", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: true,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Set displayNoServiceAlert to true
await wrapper.setData({ displayNoServiceAlert: true });
// Check if the AlertNoService component is rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(true);
});
test("should hide the AlertNoService when displayNoServiceAlert is false", async () => {
const { wrapper } = setupMocks({
isZipServiceable: true,
displayNoServiceAlert: false,
lookupVinbyAddressResponse: {
isStatePermissible: true,
vinVehicles: [], // Return no vehicles
},
});
// Ensure displayNoServiceAlert is false
await wrapper.setData({ displayNoServiceAlert: false });
// Check if the AlertNoService component is not rendered
const alertNoService = wrapper.findComponent({ ref: "AlertNoService" });
expect(alertNoService.exists()).toBe(false);
});
});
describe("getVinFromImage", () => {

View file

@ -71,8 +71,7 @@
vinPopulatedOnPageLoad &&
isInsuranceVerified &&
!displayInvalidZipAlert &&
!displayNonServiceableZipAlert &&
!displayNoServiceAlert
!displayNonServiceableZipAlert
"
alertClass="alert-success" />
@ -108,23 +107,14 @@
vinPopulatedOnPageLoad &&
!isInsuranceVerified &&
!displayInvalidZipAlert &&
!displayNonServiceableZipAlert &&
!displayNoServiceAlert
!displayNonServiceableZipAlert
"
alertClass="alert-success" />
<alert
ref="AlertNoService"
v-if="displayNoServiceAlert"
class="my-4"
cmsWidgetName="AlertNoServiceWidget"
alertClass="alert-danger"
v-bind:isDismissible="false" />
<navbar
cmsWidgetName="FunnelFooterWidget"
ref="navbar"
:isForwardActionDisabled="!meta.valid || displayNoServiceAlert"
:isForwardActionDisabled="!meta.valid"
@back-clicked="backButtonAction"
@ForwardClicked="forwardButtonAction" />
</div>
@ -207,8 +197,6 @@ export default {
vin: this.getVinFromStore(),
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
emailOrSms: this.getEmailOrSmsFromStore(),
carId: this.getCarIdfromStore(),
isHeavyTruck: this.getIsVehicleHeavyTruckFromStore(),
isCarIdDifferent: false,
customAlertData: {},
previouslyEnteredCarId: "",
@ -219,7 +207,6 @@ export default {
displayVinNotFoundAlert: false,
displayMatchedDifferentVehicleAlert: false,
displayVinScanFailedAlert: false,
displayNoServiceAlert: false,
};
},
methods: {
@ -235,12 +222,6 @@ export default {
getZipFromStore() {
return this.$store.getters.order.serviceLocation.zipCode;
},
getCarIdfromStore() {
return store.getters.vehicle.carId;
},
getIsVehicleHeavyTruckFromStore() {
return store.getters.isHeavyTruckVehicle;
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
@ -264,13 +245,6 @@ export default {
);
}
},
async findClosestApplicableShops() {
return await this.dispatchStoreActionWithLogging(
storeActions.GET_CLOSEST_APPLICABLE_SHOPS,
{ zip: this.serviceZipCode, carId: this.carId },
"vin-lookup"
);
},
async forwardButtonAction() {
this.resetAlerts();
@ -303,18 +277,6 @@ export default {
return this.$refs.navbar.removeLoader();
}
this.displayInvalidZipAlert = false;
if (this.isHeavyTruck) {
// If a VIN has already been found. Validate the Service Zip (in case of changes)
var closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
}
// If either lookup fails, remove the loader and stop processing the page.
if (!resultMap.vehicleLookupResponse || !resultMap.zipCodeData.isServiceable) {
// If the vehicle result is undefined, the vin entered was invalid.
@ -431,16 +393,6 @@ export default {
);
}
closestShops = await this.findClosestApplicableShops(
this.serviceZipCode,
this.carId
);
this.displayNoServiceAlert = !closestShops?.data?.providers?.length;
if (this.displayNoServiceAlert) {
return this.$refs.navbar.removeLoader();
}
// if no value due to field being optional, blank both phone and email address
if (!this.emailOrSms) {
await this.dispatchStoreAction(storeActions.SAVE_PHONE_NUMBER, "", false);
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, "", false);
@ -522,7 +474,6 @@ export default {
this.displayInvalidZipAlert = false;
this.displayVinNotFoundAlert = false;
this.displayVinScanFailedAlert = false;
this.displayNoServiceAlert = false;
},
},
mounted() {
@ -599,7 +550,6 @@ export default {
},
serviceZipCode() {
this.displayNonServiceableZipAlert = false;
this.displayNoServiceAlert = false;
},
},
components: {