Merge pull request #1614 from Safelite/feature/csr-1651

Remove unneeded damage check
This commit is contained in:
chloeherdsafelite 2023-12-05 09:41:11 -05:00 committed by GitHub
commit 17017982cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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],
]; ];