CSR-2194 | Repair flow fix
vee-validate weirdness fix
This commit is contained in:
parent
210c4257fd
commit
d5b36dbbde
1 changed files with 5 additions and 0 deletions
|
|
@ -66,6 +66,11 @@ defineRule(
|
||||||
defineRule(
|
defineRule(
|
||||||
"check-for-repair-and-replace",
|
"check-for-repair-and-replace",
|
||||||
(selectedWindshieldDamageType, selectedDamageLocations) => {
|
(selectedWindshieldDamageType, selectedDamageLocations) => {
|
||||||
|
// vee-validate adds an extra arrray on initial selection
|
||||||
|
// remove here
|
||||||
|
selectedDamageLocations[0] = selectedDamageLocations[0].filter((location) => {
|
||||||
|
return !Array.isArray(location);
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
|
selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
|
||||||
(!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) &&
|
(!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue