diff --git a/src/constants/single-windshield-carid.js b/src/constants/single-windshield-carids.js similarity index 99% rename from src/constants/single-windshield-carid.js rename to src/constants/single-windshield-carids.js index 078046027..3e6fb10bc 100644 --- a/src/constants/single-windshield-carid.js +++ b/src/constants/single-windshield-carids.js @@ -1,4 +1,4 @@ -export const singleWindshieldCarid = [ +export const singleWindshieldCarIds = [ "CR00063803", "CR00064709", "CR00062396", diff --git a/src/store/index.js b/src/store/index.js index 4a5ccc328..ea1122f0c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -8,7 +8,7 @@ import { storeActions } from "@/constants/store-actions"; import { applicationConfig } from "@/constants/application-config"; import { experimentTriggers } from "@/constants/experiments"; import { damageLocationsSelected } from "@/constants/damage-locations-selected"; -import { singleWindshieldCarid } from "@/constants/single-windshield-carid"; +import { singleWindshieldCarIds } from "@/constants/single-windshield-carids"; import { fmgPageValues } from "@/router/router-constants/fmgPage-values"; import router from "@/router"; import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js"; @@ -1531,8 +1531,9 @@ export const actions = { context.commit(storeMutations.UPDATE_VEHICLE_VIN, null); }, isVinOptionalVehicle(context) { + //Optional for carIds with only a single windshield if ( - singleWindshieldCarid.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) => @@ -1542,7 +1543,7 @@ export const actions = { ) { return true; } - + //Optional for specific YMMSs switch (context.state.order.vehicle.make.toLowerCase()) { case "mercedes benz": case "volkswagen": @@ -1551,14 +1552,12 @@ export const actions = { return true; default: } - if ( context.state.order.vehicle.make.toLowerCase() === "ford" && context.state.order.vehicle.year >= 2018 ) { return true; } - if ( context.state.order.vehicle.make.toLowerCase() === "bmw" && context.state.order.vehicle.year <= 2017