diff --git a/src/store/index.js b/src/store/index.js index 180d17627..e58f484e7 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1532,12 +1532,13 @@ export const actions = { }, isVinOptionalVehicle(context) { if ( - singleWindshieldCarid.find((item) => item === context.state.order.vehicle.carId) && + singleWindshieldCarid.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; } diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 286fbae9e..74731d491 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -2818,7 +2818,7 @@ describe("isVinOptionalVehicle", () => { "CR00062396", "make3", [{ glassLocation: "windshield" }, { glassLocation: "driver" }], - true, + false, ], ["CR00066428", "make4", [{ glassLocation: "rear" }], false], ];