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;
|
this.displayMatchedDifferentVehicleAlert = false;
|
||||||
},
|
},
|
||||||
customInvalidSubmit({ errors }) {
|
customInvalidSubmit({ errors }) {
|
||||||
if (errors.length > 0) {
|
if (errors['license-plate-question']) {
|
||||||
const licensePlateError = errors.find(
|
this.pushEventToGA("VehicleDamage", "LicensePlate_NoMatch", "Plate_Required", true, null, '0');
|
||||||
(error) => error.field === 'license-plate-question'
|
|
||||||
);
|
|
||||||
|
|
||||||
if (licensePlateError) {
|
|
||||||
this.pushEventToGA("VehicleDamage", "LicensePlate_NoMatch", "Plate_Required", true, null, '0');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.onInvalidSubmit({ errors });
|
this.onInvalidSubmit({ errors });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -505,10 +505,10 @@ export default {
|
||||||
case damageLocationsSelected.WINDSHIELD:
|
case damageLocationsSelected.WINDSHIELD:
|
||||||
eventGlassLocation = 'Windshield Replace';
|
eventGlassLocation = 'Windshield Replace';
|
||||||
break;
|
break;
|
||||||
case damageLocationsSelected.DRIVERSIDE:
|
case damageLocationsSelected.DRIVER:
|
||||||
eventGlassLocation = "Driver's Side";
|
eventGlassLocation = "Driver's Side";
|
||||||
break;
|
break;
|
||||||
case damageLocationsSelected.PASSENGERSIDE:
|
case damageLocationsSelected.PASSENGER:
|
||||||
eventGlassLocation = "Passenger's Side";
|
eventGlassLocation = "Passenger's Side";
|
||||||
break;
|
break;
|
||||||
case damageLocationsSelected.REAR:
|
case damageLocationsSelected.REAR:
|
||||||
|
|
|
||||||
|
|
@ -291,12 +291,7 @@ export default {
|
||||||
this.vehicleFromLookup = null;
|
this.vehicleFromLookup = null;
|
||||||
},
|
},
|
||||||
checkVinForErrors() {
|
checkVinForErrors() {
|
||||||
const vinQuestionComponent = this.$refs['vin-question'];
|
return this.$refs['vin-question'].hasErrors;
|
||||||
if (vinQuestionComponent) {
|
|
||||||
const errorElement = vinQuestionComponent.$el.querySelector('.form-test-error');
|
|
||||||
return errorElement && errorElement.checkVisibility();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
resetDependentState() {}
|
resetDependentState() {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
id="vin-question-wrapper"
|
id="vin-question-wrapper"
|
||||||
|
ref="vin-question-wrapper"
|
||||||
v-model="vin"
|
v-model="vin"
|
||||||
cmsWidgetName="VinNumberQuestionWidget"
|
cmsWidgetName="VinNumberQuestionWidget"
|
||||||
disableAutoFill
|
disableAutoFill
|
||||||
|
|
@ -38,6 +39,9 @@ export default {
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
this.$emit('update:modelValue', newValue);
|
this.$emit('update:modelValue', newValue);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
hasErrors() {
|
||||||
|
return this.$refs['vin-question-wrapper']?.meta?.valid === false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue