Remove unneeded damage check

This commit is contained in:
Chloe Herd 2023-12-05 09:31:08 -05:00
parent 71398ec72a
commit 25f56e51c4
2 changed files with 2 additions and 10 deletions

View file

@ -2495,15 +2495,7 @@ export const actions = {
isVinOptionalVehicle(context) { isVinOptionalVehicle(context) {
//Optional for carIds with only a single windshield //Optional for carIds with only a single windshield
if ( if (singleWindshieldCarIds.find((item) => item === context.state.order.vehicle.carId)) {
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()
)
) {
return true; return true;
} }
//Optional for specific YMMSs //Optional for specific YMMSs

View file

@ -3329,7 +3329,7 @@ describe("isVinOptionalVehicle", () => {
"CR00062396", "CR00062396",
"make3", "make3",
[{ glassLocation: "windshield" }, { glassLocation: "driver" }], [{ glassLocation: "windshield" }, { glassLocation: "driver" }],
false, true,
], ],
["CR00066428", "make4", [{ glassLocation: "rear" }], false], ["CR00066428", "make4", [{ glassLocation: "rear" }], false],
]; ];