commit
d569de3d1e
6 changed files with 41 additions and 30 deletions
|
|
@ -10,6 +10,8 @@ const storeMutations = {
|
|||
UPDATE_MODEL: "updateModel",
|
||||
UPDATE_STYLE: "updateStyle",
|
||||
UPDATE_VEHICLE_SUBTYPE: "updateVehicleSubType",
|
||||
UPDATE_VEHICLE_SPECIAL_CLASS: "updateVehicleSpecialClass",
|
||||
UPDATE_IS_BIGTRUCK: "updateIsBigTruck",
|
||||
UPDATE_CAR_ID: "updateCarId",
|
||||
UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory",
|
||||
UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl",
|
||||
|
|
|
|||
|
|
@ -9,9 +9,3 @@ const vehicleCategories = {
|
|||
};
|
||||
|
||||
export { vehicleCategories };
|
||||
|
||||
const vehicleSubTypes = {
|
||||
HEAVY_TRUCK: "HEAVY TRUCK",
|
||||
};
|
||||
|
||||
export { vehicleSubTypes };
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ export default {
|
|||
return store.getters.order.serviceLocation.zipCode;
|
||||
},
|
||||
getIsVehicleHeavyTruckFromStore() {
|
||||
return store.getters.isHeavyTruckVehicle;
|
||||
return store.getters.order.vehicle?.isBigTruck ?? false;
|
||||
},
|
||||
getIsVehicleProtectedFromStore() {
|
||||
return store.getters.order.serviceLocation.isVehicleProtected;
|
||||
|
|
|
|||
|
|
@ -179,12 +179,12 @@ export default {
|
|||
}
|
||||
});
|
||||
|
||||
this.pushEventToGA(
|
||||
this.GaCategories.SERVICE_LOCATION,
|
||||
gaAction,
|
||||
shops.join(","),
|
||||
true
|
||||
);
|
||||
var joinedShops = shops.join(",");
|
||||
if (!joinedShops) {
|
||||
joinedShops = "no-shops";
|
||||
}
|
||||
|
||||
this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, gaAction, joinedShops, true);
|
||||
}
|
||||
|
||||
if (this.answers.length === 0) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
placeHolderText="Select style"
|
||||
customDropdownId="styleQuestionField" />
|
||||
|
||||
<div v-if="isHeavyTruck">
|
||||
<div v-if="isBigTruckAndCanService">
|
||||
<div class="separator-line"></div>
|
||||
<textboxQuestion
|
||||
class="mb-4"
|
||||
|
|
@ -110,7 +110,6 @@ import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
|
|||
import { applicationConfig } from "../../constants/application-config";
|
||||
import { queryStrings } from "@/constants/query-strings";
|
||||
import { getQuerystringParameter } from "@/helpers/querystring-helper";
|
||||
import { vehicleSubTypes } from "@/constants/vehicle-categories.js";
|
||||
|
||||
//define validation rules
|
||||
defineRule("year-required", required(errorMessages.YEAR_REQUIRED));
|
||||
|
|
@ -130,11 +129,11 @@ export default {
|
|||
selectedStyle: this.selectedStylefromStore(),
|
||||
carId: this.getCarIdfromStore(),
|
||||
category: this.getCategoryfromStore(),
|
||||
isBigTruck: this.getIsBigTruckfromStore(),
|
||||
imageUrl: this.getImagefromStore(),
|
||||
imageVifNumber: this.getImageVifNumberfromStore(),
|
||||
imageVifColor: this.getImageVifColorfromStore(),
|
||||
serviceZipCode: this.getZipFromStore() ?? this.$route.query.zipcode,
|
||||
vehicleSubType: this.getVehicleSubTypefromStore(),
|
||||
yearOptions: [],
|
||||
makeOptions: [],
|
||||
modelOptions: [],
|
||||
|
|
@ -325,7 +324,7 @@ export default {
|
|||
this.selectedMake = null;
|
||||
this.selectedModel = null;
|
||||
this.selectedStyle = null;
|
||||
this.vehicleSubType = null;
|
||||
this.isBigTruck = false;
|
||||
this.canSafeliteService = false;
|
||||
this.carId = null;
|
||||
if (year) {
|
||||
|
|
@ -346,7 +345,7 @@ export default {
|
|||
this.modelOptions = [];
|
||||
this.selectedModel = null;
|
||||
this.selectedStyle = null;
|
||||
this.vehicleSubType = null;
|
||||
this.isBigTruck = null;
|
||||
this.carId = null;
|
||||
if (make) {
|
||||
const result = await this.getModelOptions(this.selectedYear, make);
|
||||
|
|
@ -365,7 +364,7 @@ export default {
|
|||
this.resetAlert();
|
||||
this.styleOptions = [];
|
||||
this.selectedStyle = null;
|
||||
this.vehicleSubType = null;
|
||||
this.isBigTruck = false;
|
||||
this.carId = null;
|
||||
if (model) {
|
||||
const result = await this.getStyleOptions(
|
||||
|
|
@ -430,8 +429,8 @@ export default {
|
|||
!!this.carId
|
||||
);
|
||||
},
|
||||
isHeavyTruck() {
|
||||
return this.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK && this.canSafeliteService;
|
||||
isBigTruckAndCanService() {
|
||||
return this.isBigTruck && this.canSafeliteService;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -484,6 +483,8 @@ export default {
|
|||
this.displayNoServiceAlert = !result?.data.canSafeliteService;
|
||||
this.canSafeliteService = result?.data.canSafeliteService;
|
||||
this.vehicleSubType = result?.data.vehicleSubType;
|
||||
this.vehicleSpecialClass = result?.data.vehicleSpecialClass;
|
||||
this.isBigTruck = result?.data.isBigTruck;
|
||||
},
|
||||
resetAlert() {
|
||||
this.displayNoServiceAlert = false;
|
||||
|
|
@ -498,6 +499,8 @@ export default {
|
|||
model: this.selectedModel,
|
||||
style: this.selectedStyle,
|
||||
vehicleSubType: this.vehicleSubType,
|
||||
vehicleSpecialClass: this.vehicleSpecialClass,
|
||||
isBigTruck: this.isBigTruck,
|
||||
carId: this.carId,
|
||||
category: this.category,
|
||||
canSafeliteService: this.canSafeliteService,
|
||||
|
|
@ -508,7 +511,7 @@ export default {
|
|||
false
|
||||
);
|
||||
|
||||
if (this.isHeavyTruck) {
|
||||
if (this.isBigTruck) {
|
||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||
await this.dispatchStoreAction(
|
||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||
|
|
@ -608,8 +611,8 @@ export default {
|
|||
getImageVifColorfromStore() {
|
||||
return store.getters.vehicle.imageVifColor;
|
||||
},
|
||||
getVehicleSubTypefromStore() {
|
||||
return store.getters.vehicle.vehicleSubType;
|
||||
getIsBigTruckfromStore() {
|
||||
return store.getters.vehicle.isBigTruck;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ import {
|
|||
import { externalParameterStatus } from "@/constants/external-parameters";
|
||||
import { experimentSettings } from "@/constants/experiments";
|
||||
import experimentMixin from "@/mixins/experiment-mixin.js";
|
||||
import { vehicleSubTypes } from "@/constants/vehicle-categories.js";
|
||||
|
||||
// Export State
|
||||
const getDefaultState = () => {
|
||||
|
|
@ -63,6 +62,8 @@ const getDefaultState = () => {
|
|||
model: null,
|
||||
style: null,
|
||||
vehicleSubType: null,
|
||||
vehicleSpecialClass: null,
|
||||
isBigTruck: false,
|
||||
carId: null,
|
||||
category: null,
|
||||
vin: null,
|
||||
|
|
@ -217,6 +218,12 @@ export const mutations = {
|
|||
updateVehicleSubType(state, vehicleSubType) {
|
||||
state.order.vehicle.vehicleSubType = vehicleSubType;
|
||||
},
|
||||
updateVehicleSpecialClass(state, vehicleSpecialClass) {
|
||||
state.order.vehicle.vehicleSpecialClass = vehicleSpecialClass;
|
||||
},
|
||||
updateIsBigTruck(state, isBigTruck) {
|
||||
state.order.vehicle.isBigTruck = isBigTruck;
|
||||
},
|
||||
updateCarId(state, carId) {
|
||||
state.order.vehicle.carId = carId;
|
||||
},
|
||||
|
|
@ -847,9 +854,6 @@ export const getters = {
|
|||
|
||||
return false;
|
||||
},
|
||||
isHeavyTruckVehicle: (state) => {
|
||||
return state.order.vehicle.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK;
|
||||
},
|
||||
isMobileAppointment: (state) => {
|
||||
return state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE;
|
||||
},
|
||||
|
|
@ -1849,7 +1853,7 @@ export const actions = {
|
|||
endPoint += `&${glassPieces}`;
|
||||
}
|
||||
|
||||
endPoint += `&isHeavyTruckVehicle=${context.getters.isHeavyTruckVehicle}`;
|
||||
endPoint += `&isHeavyTruckVehicle=${context.getters.order.vehicle.isBigTruck}`;
|
||||
|
||||
return globalMethods.callHttpClient({
|
||||
method: endpoints.GetServiceabilityDetails.method,
|
||||
|
|
@ -1878,7 +1882,7 @@ export const actions = {
|
|||
url += `/${windshieldPartWithRecal.partNumber}`;
|
||||
}
|
||||
//heavy truck vehicle
|
||||
url += `/${context.getters.isHeavyTruckVehicle}`;
|
||||
url += `/${context.getters.order.vehicle.isBigTruck}`;
|
||||
|
||||
return globalMethods.callHttpClient({
|
||||
method: endpoints.GetProviders.method,
|
||||
|
|
@ -2111,6 +2115,8 @@ export const actions = {
|
|||
make: vehicle.make,
|
||||
model: vehicle.model,
|
||||
subType: vehicle.vehicleSubType,
|
||||
specialClass: vehicle.vehicleSpecialClass,
|
||||
isBigTruck: vehicle.isBigTruck,
|
||||
isInsurance: order.payment.isInsurance ?? false,
|
||||
isVerified: order.payment.insuranceCoverage.isVerified ?? false,
|
||||
lineItems: {
|
||||
|
|
@ -2165,6 +2171,8 @@ export const actions = {
|
|||
style: vehicle.style,
|
||||
vin: vehicle.vin,
|
||||
vehicleSubType: vehicle.vehicleSubType,
|
||||
vehicleSpecialClass: vehicle.vehicleSpecialClass,
|
||||
isBigTruck: vehicle.isBigTruck,
|
||||
registration: {
|
||||
firstName: vehicle.registration.firstName,
|
||||
lastName: vehicle.registration.lastName,
|
||||
|
|
@ -2381,6 +2389,8 @@ export const actions = {
|
|||
model,
|
||||
style,
|
||||
vehicleSubType,
|
||||
vehicleSpecialClass,
|
||||
isBigTruck,
|
||||
carId,
|
||||
category,
|
||||
canSafeliteService,
|
||||
|
|
@ -2404,6 +2414,8 @@ export const actions = {
|
|||
context.commit(storeMutations.UPDATE_MODEL, model);
|
||||
context.commit(storeMutations.UPDATE_STYLE, style);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_SPECIAL_CLASS, vehicleSpecialClass);
|
||||
context.commit(storeMutations.UPDATE_IS_BIGTRUCK, isBigTruck);
|
||||
context.commit(storeMutations.UPDATE_CAR_ID, carId);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_CAN_SAFELITE_SERVICE, canSafeliteService);
|
||||
|
|
|
|||
Loading…
Reference in a new issue