INSR-8879: Various fixes
- Fixed some cases for events for specific parts - Fixed error handling/detection in license plate lookup and vin lookup
This commit is contained in:
parent
1d931707b1
commit
19c7d41b62
4 changed files with 9 additions and 16 deletions
|
|
@ -326,14 +326,8 @@ export default {
|
|||
this.displayMatchedDifferentVehicleAlert = false;
|
||||
},
|
||||
customInvalidSubmit({ errors }) {
|
||||
if (errors.length > 0) {
|
||||
const licensePlateError = errors.find(
|
||||
(error) => error.field === 'license-plate-question'
|
||||
);
|
||||
|
||||
if (licensePlateError) {
|
||||
this.pushEventToGA("VehicleDamage", "LicensePlate_NoMatch", "Plate_Required", true, null, '0');
|
||||
}
|
||||
if (errors['license-plate-question']) {
|
||||
this.pushEventToGA("VehicleDamage", "LicensePlate_NoMatch", "Plate_Required", true, null, '0');
|
||||
}
|
||||
this.onInvalidSubmit({ errors });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -505,10 +505,10 @@ export default {
|
|||
case damageLocationsSelected.WINDSHIELD:
|
||||
eventGlassLocation = 'Windshield Replace';
|
||||
break;
|
||||
case damageLocationsSelected.DRIVERSIDE:
|
||||
case damageLocationsSelected.DRIVER:
|
||||
eventGlassLocation = "Driver's Side";
|
||||
break;
|
||||
case damageLocationsSelected.PASSENGERSIDE:
|
||||
case damageLocationsSelected.PASSENGER:
|
||||
eventGlassLocation = "Passenger's Side";
|
||||
break;
|
||||
case damageLocationsSelected.REAR:
|
||||
|
|
|
|||
|
|
@ -291,12 +291,7 @@ export default {
|
|||
this.vehicleFromLookup = null;
|
||||
},
|
||||
checkVinForErrors() {
|
||||
const vinQuestionComponent = this.$refs['vin-question'];
|
||||
if (vinQuestionComponent) {
|
||||
const errorElement = vinQuestionComponent.$el.querySelector('.form-test-error');
|
||||
return errorElement && errorElement.checkVisibility();
|
||||
}
|
||||
return false;
|
||||
return this.$refs['vin-question'].hasErrors;
|
||||
},
|
||||
resetDependentState() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<textboxQuestion
|
||||
id="vin-question-wrapper"
|
||||
ref="vin-question-wrapper"
|
||||
v-model="vin"
|
||||
cmsWidgetName="VinNumberQuestionWidget"
|
||||
disableAutoFill
|
||||
|
|
@ -38,6 +39,9 @@ export default {
|
|||
set(newValue) {
|
||||
this.$emit('update:modelValue', newValue);
|
||||
}
|
||||
},
|
||||
hasErrors() {
|
||||
return this.$refs['vin-question-wrapper']?.meta?.valid === false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue