Display error when VIN scan fails.

This commit is contained in:
Chloe Herd 2023-03-08 15:54:03 -05:00
parent b5fbdfec93
commit 0a317093b5
2 changed files with 24 additions and 3 deletions

View file

@ -132,7 +132,7 @@ export default {
document.getElementById(this.inputId).dispatchEvent(new Event("change"));
})
.catch((error) => {
console.log(error);
this.$emit("imageLookupError");
});
e.target.value = null;
},

View file

@ -8,7 +8,16 @@
:displayGenericVehicleImage="false" />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<div class="fade-on-route-transition sub-container make-tall">
<div class="row mt-2">
<div class="row mb-2">
<div class="col">
<alert
:manualHeadline="AlertVinScanFailedHeader"
:manualCopy="AlertVinScanFailedBody"
v-if="displayVinScanFailedAlert"
alertClass="alert-danger" />
</div>
</div>
<div class="row my-2">
<div class="col">
<textboxQuestion
cmsWidgetName="VinNumberQuestionWidget"
@ -20,7 +29,8 @@
:isDisabled="vinPopulatedOnPageLoad"
maxLength="17"
includeCameraIcon
:mask="vinMask" />
:mask="vinMask"
@image-lookup-error="displayVinScanAlert" />
</div>
</div>
<div class="row mb-2">
@ -188,6 +198,7 @@ export default {
displayNonServiceableZipAlert: false,
displayVinNotFoundAlert: false,
displayMatchedDifferentVehicleAlert: false,
displayVinScanFailedAlert: false,
};
},
methods: {
@ -381,11 +392,15 @@ export default {
await this.navigateForwardWithSingleCarMatch();
}
},
displayVinScanAlert() {
this.displayVinScanFailedAlert = true;
},
resetAlerts() {
this.displayMatchedDifferentVehicleAlert = false;
this.displayNonServiceableZipAlert = false;
this.displayInvalidZipAlert = false;
this.displayVinNotFoundAlert = false;
this.displayVinScanFailedAlert = false;
},
},
mounted() {
@ -432,6 +447,12 @@ export default {
getIsWindshieldOnly()
);
},
AlertVinScanFailedHeader() {
return "VIN scan failed.";
},
AlertVinScanFailedBody() {
return "Please try again or enter your VIN manually.";
},
isInsuranceVerified() {
return (
store.getters.payment.insuranceCoverage.isVerified ||