Merge pull request #1614 from Safelite/feature/csr-1651
Remove unneeded damage check
This commit is contained in:
commit
17017982cf
2 changed files with 2 additions and 10 deletions
|
|
@ -2495,15 +2495,7 @@ export const actions = {
|
|||
|
||||
isVinOptionalVehicle(context) {
|
||||
//Optional for carIds with only a single windshield
|
||||
if (
|
||||
singleWindshieldCarIds.find((item) => item === context.state.order.vehicle.carId) &&
|
||||
context.state.order.damage.glassToReplace.length == 1 &&
|
||||
context.state.order.damage.glassToReplace.find(
|
||||
(glassToReplace) =>
|
||||
glassToReplace.glassLocation.toLowerCase() ===
|
||||
damageLocationsSelected.WINDSHIELD.toLowerCase()
|
||||
)
|
||||
) {
|
||||
if (singleWindshieldCarIds.find((item) => item === context.state.order.vehicle.carId)) {
|
||||
return true;
|
||||
}
|
||||
//Optional for specific YMMSs
|
||||
|
|
|
|||
|
|
@ -3329,7 +3329,7 @@ describe("isVinOptionalVehicle", () => {
|
|||
"CR00062396",
|
||||
"make3",
|
||||
[{ glassLocation: "windshield" }, { glassLocation: "driver" }],
|
||||
false,
|
||||
true,
|
||||
],
|
||||
["CR00066428", "make4", [{ glassLocation: "rear" }], false],
|
||||
];
|
||||
|
|
|
|||
Loading…
Reference in a new issue