This commit is contained in:
Sneha 2023-06-16 19:16:42 +05:30
parent fd073c8a99
commit 59c7ddb9c3
2 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,4 @@
export const singleWindshieldCarid = [
export const singleWindshieldCarIds = [
"CR00063803",
"CR00064709",
"CR00062396",

View file

@ -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