CSR-762 Fix repair/replace combo rule
This commit is contained in:
parent
3fad6ae842
commit
d093a9b842
1 changed files with 2 additions and 2 deletions
|
|
@ -57,8 +57,8 @@ defineRule("windshield-replace-options-required", required(errorMessages.WINSHIE
|
|||
|
||||
defineRule("check-for-repair-and-replace", (selectedWindshieldDamageType, selectedDamageLocations) => {
|
||||
return selectedWindshieldDamageType.toString() != damageLocationsSelected.REPAIR ||
|
||||
!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) ||
|
||||
selectedDamageLocations.length === 1;
|
||||
(!selectedDamageLocations.includes(damageLocationsSelected.WINDSHIELD) && !selectedDamageLocations[0]?.includes(damageLocationsSelected.WINDSHIELD)) ||
|
||||
(selectedDamageLocations.length === 1 && selectedDamageLocations[0].length === 1);
|
||||
});
|
||||
defineRule("repair-only", (value) => {
|
||||
return value.toString() === damageLocationsSelected.REPAIR;
|
||||
|
|
|
|||
Loading…
Reference in a new issue