CSR-2194 | Repair flow fix

vee-validate weirdness fix
This commit is contained in:
Scott Kiener 2024-09-03 09:20:58 -04:00
parent 210c4257fd
commit d5b36dbbde

View file

@ -66,6 +66,11 @@ defineRule(
defineRule(
"check-for-repair-and-replace",
(selectedWindshieldDamageType, selectedDamageLocations) => {
// vee-validate adds an extra arrray on initial selection
// remove here
selectedDamageLocations[0] = selectedDamageLocations[0].filter((location) => {
return !Array.isArray(location);
});
return (
selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
(!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) &&