Merge pull request #1958 from Safelite/feature/CSR-2194

CSR-2194 | Repair flow fix
This commit is contained in:
scottkiener 2024-09-03 09:43:46 -04:00 committed by GitHub
commit 5c5007b17e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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) &&