diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue
index 0d3692721..b50b180c0 100644
--- a/src/layouts/vin-lookup/vin-lookup.vue
+++ b/src/layouts/vin-lookup/vin-lookup.vue
@@ -31,59 +31,59 @@
{
vm.setCmsContent(resultMap.cmsContent);
- vm.matchedDifferentVehicleWidget = {
- headline: resultMap.cmsContent.MatchedDifferentVehicle.HeadlineText,
- copy: resultMap.cmsContent.MatchedDifferentVehicle.BodyText
- };
- vm.noMatchAlertWidget = {
- headline: resultMap.cmsContent.NoMatchAlertWidget.HeadlineText,
- copy: resultMap.cmsContent.NoMatchAlertWidget.BodyText
- };
- vm.noServiceZipWidget = {
- headline: resultMap.cmsContent.NoServiceZipWidget.HeadlineText,
- copy: resultMap.cmsContent.NoServiceZipWidget.BodyText
- };
- vm.vinFoundWidget = {
- headline: resultMap.cmsContent.VinFoundWidget.HeadlineText,
- copy: resultMap.cmsContent.VinFoundWidget.BodyText
- };
- vm.vinFoundReadOnlyWidget = {
- headline: resultMap.cmsContent.VinFoundReadOnlyWidget.HeadlineText,
- copy: resultMap.cmsContent.VinFoundReadOnlyWidget.BodyText
- };
- vm.foundWindshieldAlertWidget = {
- headline: resultMap.cmsContent.FoundWindshieldAlert.HeadlineText,
- copy: resultMap.cmsContent.FoundWindshieldAlert.BodyText
- };
- vm.vinNotFoundWidget = {
- headline: resultMap.cmsContent.VinNotFound.HeadlineText,
- copy: resultMap.cmsContent.VinNotFound.BodyText
- };
- vm.perfectMatchNewVinAlertWidget = {
- headline: resultMap.cmsContent.PerfectMatchNewVinAlert.HeadlineText,
- copy: resultMap.cmsContent.PerfectMatchNewVinAlert.BodyText
- };
});
},
props: {
@@ -194,6 +162,7 @@ export default {
vin: '',
zip: '',
email: '',
+ customAlertData: {},
};
},
methods: {
@@ -212,17 +181,25 @@ export default {
},
async forwardButtonAction() {
const zipValidation = await this.validateZip(this.zip);
- console.log(zipValidation);
if (!zipValidation.data.isServiceable) {
+ this.customAlertData.zip = this.zip;
this.$refs.funnelFooter.removeLoader();
this.noServiceZip = true;
return;
}
const vinLookup = await this.lookupVin(this.vin).catch(() => {
this.$refs.funnelFooter.removeLoader();
- this.vinNotValid = true;
+ this.noMatchAlert = true;
return;
});
+ if (vinLookup.data.carId !== store.getters.vehicle.carId) {
+ this.customAlertData.vehicleInfo = vinLookup.data.vehicle;
+ this.$refs.funnelFooter.removeLoader();
+ this.foundWindshieldAlert = true;
+ return;
+ }
+ const carInfo = this.vinDoesNotMatchCarId ? vinLookup.data : store.getters.vehicle;
+ this.updateStore(carInfo)
const partsData = await baseMixin.methods.dispatchNonBlockingStoreAction(
this.storeActions.GET_PARTS_OR_QUESTIONS,
{
@@ -258,22 +235,22 @@ export default {
{ vin }
);
},
- updateStore() {
+ updateStore(carInfo) {
// if(vehicleDamage){
// store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
// }
- store.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
- store.commit(storeMutations.UPDATE_YEAR, null);
- store.commit(storeMutations.UPDATE_MAKE, null);
- store.commit(storeMutations.UPDATE_MODEL, null);
- store.commit(storeMutations.UPDATE_STYLE, null);
- store.commit(storeMutations.UPDATE_CAR_ID, null);
- store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null);
- store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null);
- store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null);
- store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null);
- store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP, null);
- store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_VIN, this.vin);
+ store.commit(storeMutations.UPDATE_YEAR, carInfo.year);
+ store.commit(storeMutations.UPDATE_MAKE, carInfo.make);
+ store.commit(storeMutations.UPDATE_MODEL, carInfo.model);
+ store.commit(storeMutations.UPDATE_STYLE, carInfo.style);
+ store.commit(storeMutations.UPDATE_CAR_ID, carInfo.carId);
+ store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, carInfo.category);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, carInfo.imageUrl);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, carInfo.imageVifNumber);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, carInfo.imageColor);
+ store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP, this.zip);
+ store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
},
components: {
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index 5b27f385a..515658e16 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -5,12 +5,7 @@
:class="[isDismissible ? 'alert-dismissible' : '', this.alertClass]"
>
{{ alertHeadline }}
-
-
- {{ para }}
-
-
- {{ alertCopy }}
+ {{ alertCopy }}