Merge branch 'develop' into rlsmerge/2025.02.06-to-develop

This commit is contained in:
CarlNation 2025-02-06 05:40:52 -05:00
commit 9557cce6d0
12 changed files with 86 additions and 101 deletions

View file

@ -12,6 +12,7 @@ module.exports = {
"!src/constants/*.js", "!src/constants/*.js",
"!src/router/**/*.js", "!src/router/**/*.js",
"!src/helpers/unit-test-helper.js", "!src/helpers/unit-test-helper.js",
"!src/helpers/logger.js",
"!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue",
"!src/layouts/reveal/**/*.vue", "!src/layouts/reveal/**/*.vue",
"!src/layouts/payment-method/**/*.vue", "!src/layouts/payment-method/**/*.vue",

View file

@ -5,5 +5,5 @@ export const headerKeys = {
SESSION_SEQUENCE_NUMBER: "X-Session-Sequence-Number", SESSION_SEQUENCE_NUMBER: "X-Session-Sequence-Number",
TRANSACTION_ID: "X-Transaction-Id", TRANSACTION_ID: "X-Transaction-Id",
EON: "X-Enterprise-Order-Number", EON: "X-Enterprise-Order-Number",
LOG_ENABLED: "log-enabled" LOG_ENABLED: "log-enabled",
}; };

View file

@ -46,6 +46,7 @@ const queryStrings = {
ORGANIC_SOCIAL: "organic_social", ORGANIC_SOCIAL: "organic_social",
EXPERIMENTS: "experiments", EXPERIMENTS: "experiments",
FROM_HERITAGE: "fromheritage", FROM_HERITAGE: "fromheritage",
PHONE_NUMBER: "phonenumber",
}; };
export { queryStrings }; export { queryStrings };

View file

@ -76,6 +76,7 @@ const storeActions = {
SAVE_SERVICE_LOCATION: "saveServiceLocation", SAVE_SERVICE_LOCATION: "saveServiceLocation",
SAVE_SCHEDULE: "saveSchedule", SAVE_SCHEDULE: "saveSchedule",
SAVE_EMAIL: "saveEmail", SAVE_EMAIL: "saveEmail",
SAVE_PHONE_NUMBER: "savePhoneNumber",
SAVE_REGISTRATION_LICENSE_PLATE_LOOKUP: "saveRegistrationLicensePlateLookup", SAVE_REGISTRATION_LICENSE_PLATE_LOOKUP: "saveRegistrationLicensePlateLookup",
SAVE_VIN: "saveVin", SAVE_VIN: "saveVin",
SAVE_REGISTRATION_ADDRESS_LOOKUP: "saveRegistrationAddressLookup", SAVE_REGISTRATION_ADDRESS_LOOKUP: "saveRegistrationAddressLookup",

View file

@ -16,8 +16,6 @@ const storeMutations = {
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor", UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
UPDATE_VEHICLE_VIN: "updateVehicleVin", UPDATE_VEHICLE_VIN: "updateVehicleVin",
UPDATE_VEHICLE: "updateVehicle", UPDATE_VEHICLE: "updateVehicle",
UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE:
"updateIsMobileStaticRecalibrationApplicable",
UPDATE_IS_REPAIR: "updateIsRepair", UPDATE_IS_REPAIR: "updateIsRepair",
UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips", UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips",
@ -41,6 +39,7 @@ const storeMutations = {
// CUSTOMER MUTATIONS // CUSTOMER MUTATIONS
UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress", UPDATE_CUSTOMER_EMAIL_ADDRESS: "updateCustomerEmailAddress",
UPDATE_CUSTOMER_PHONE_NUMBER: "updateCustomerPhoneNumber",
UPDATE_CUSTOMER_DETAILS: "updateCustomerDetails", UPDATE_CUSTOMER_DETAILS: "updateCustomerDetails",
// ORDER MUTATIONS // ORDER MUTATIONS
@ -107,6 +106,7 @@ const storeMutations = {
UPDATE_EXTERNAL_PARAMETER_VIN_SELECTION: "updateExternalParameterVinSelection", UPDATE_EXTERNAL_PARAMETER_VIN_SELECTION: "updateExternalParameterVinSelection",
UPDATE_EXTERNAL_PARAMETER_SERVICE_PACKAGE: "updateExternalParameterServicePackage", UPDATE_EXTERNAL_PARAMETER_SERVICE_PACKAGE: "updateExternalParameterServicePackage",
UPDATE_EXTERNAL_PARAMETER_SOURCE: "updateExternalParameterSource", UPDATE_EXTERNAL_PARAMETER_SOURCE: "updateExternalParameterSource",
UPDATE_EXTERNAL_PARAMETER_PHONE_NUMBER: "updateExternalParameterPhoneNumber",
//RESET EXTERNAL_PARAMETER MUTATIONS //RESET EXTERNAL_PARAMETER MUTATIONS
RESET_EXTERNAL_PARAMETER_VEHICLE_STATE: "resetExternalParameterVehicleState", RESET_EXTERNAL_PARAMETER_VEHICLE_STATE: "resetExternalParameterVehicleState",
@ -115,6 +115,7 @@ const storeMutations = {
RESET_EXTERNAL_PARAMETER_SERVICEZIP_STATE: "resetExternalParameterServiceZipState", RESET_EXTERNAL_PARAMETER_SERVICEZIP_STATE: "resetExternalParameterServiceZipState",
RESET_EXTERNAL_PARAMETER_QUOTE_STATE: "resetExternalParameterQuoteState", RESET_EXTERNAL_PARAMETER_QUOTE_STATE: "resetExternalParameterQuoteState",
RESET_EXTERNAL_PARAMETER_SOURCE_STATE: "resetExternalParameterSourceState", RESET_EXTERNAL_PARAMETER_SOURCE_STATE: "resetExternalParameterSourceState",
RESET_EXTERNAL_PARAMETER_CUSTOMER_STATE: "resetExternalParameterCustomerState",
RESET_IS_EXTERNAL_PARAMETER: "resetIsExternalParameter", RESET_IS_EXTERNAL_PARAMETER: "resetIsExternalParameter",
//Affiliate Cookies //Affiliate Cookies

View file

@ -219,7 +219,7 @@ export default {
.textbox-question { .textbox-question {
padding: 0; padding: 0;
margin: 0 0 1.5rem 0; margin: 0 0 1.5rem 0;
label { label {
text-align: left; text-align: left;
font-weight: 900; font-weight: 900;
@ -258,7 +258,7 @@ export default {
&.progress-saved { &.progress-saved {
.modal-footer-button, .modal-footer-button,
.modal-disclaimer { .modal-disclaimer {
display: none; display: none;
} }
.skip-button { .skip-button {

View file

@ -116,39 +116,39 @@ export default {
// send part question data to SPS API for logging // send part question data to SPS API for logging
const orderFromStore = await deepClone(store.getters.order); const orderFromStore = await deepClone(store.getters.order);
const ctu = orderFromStore.serviceLocation?.zipCodeCtu const ctu = orderFromStore.serviceLocation?.zipCodeCtu;
const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers; const partsOrQuestions = orderFromStore.damage?.partQuestionAnswers;
partsOrQuestions.forEach(pqa => { if (partsOrQuestions) {
const payloadPartQuestions = []; partsOrQuestions.forEach(pqa => {
pqa.answeredQuestions.forEach(answer => { const payloadPartQuestions = [];
payloadPartQuestions.push({ pqa.answeredQuestions.forEach(answer => {
questionSeq: answer?.questionNum, payloadPartQuestions.push({
questionText: answer?.questionText, questionSeq: answer?.questionNum,
answerText: answer?.selectedAnswerText, questionText: answer?.questionText,
basePart: pqa?.result, answerText: answer?.selectedAnswerText,
basePart: pqa?.result,
});
}); });
const payload = {
eon: orderFromStore.eon,
ctu: ctu,
workOrderId: orderFromStore.workOrderId,
workOrderNumber: orderFromStore.workOrderNumber,
carId: orderFromStore.vehicle.carId,
glassLocation: pqa?.glassLocation,
partQuestions: payloadPartQuestions,
};
baseMixin.methods.dispatchStoreAction(
storeActions.LOG_PART_QUESTIONS,
payload,
false
);
}); });
}
const payload = {
eon: orderFromStore.eon,
ctu: ctu,
workOrderId: orderFromStore.workOrderId,
workOrderNumber: orderFromStore.workOrderNumber,
carId: orderFromStore.vehicle.carId,
glassLocation: pqa?.glassLocation,
partQuestions: payloadPartQuestions,
};
baseMixin.methods.dispatchStoreAction(
storeActions.LOG_PART_QUESTIONS,
payload,
false
);
});
// Create order // Create order
await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); // This nulls the Store order await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); // This nulls the Store order

View file

@ -182,9 +182,6 @@ beforeEach(() => {
zipCode: "43235", zipCode: "43235",
state: "OH", state: "OH",
}, },
vehicle: {
isMobileStaticRecalibrationApplicable: true,
},
}, },
damage: { damage: {
isRepair: false, isRepair: false,

View file

@ -191,8 +191,6 @@ export default {
isRecalibrationServiceableInshop: null, isRecalibrationServiceableInshop: null,
isGlassServiceableMobile: null, isGlassServiceableMobile: null,
isRecalibrationServiceableMobile: null, isRecalibrationServiceableMobile: null,
isVehicleMobileStaticRecalibrationApplicable:
this.getIsVehicleMobileStaticRecalibrationApplicableFromStore(),
selectedAppointmentType: this.getSelectedAppointmentType(), selectedAppointmentType: this.getSelectedAppointmentType(),
selectedProvider: this.getSelectedProvider(), selectedProvider: this.getSelectedProvider(),
mobileFeePart: null, mobileFeePart: null,
@ -322,9 +320,8 @@ export default {
isMobileStaticRecalibrationApplicable() { isMobileStaticRecalibrationApplicable() {
return ( return (
this.displayMSR && this.displayMSR &&
this.isVehicleMobileStaticRecalibrationApplicable &&
this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE && this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE &&
(this.isInsurance ? this.mobileFeePart?.isInsurable : true) (this.isInsurance && !this.isITAC ? this.mobileFeePart?.isInsurable : true)
); );
}, },
displayMSR() { displayMSR() {
@ -401,6 +398,9 @@ export default {
isInsurance() { isInsurance() {
return store.getters.payment.isInsurance; return store.getters.payment.isInsurance;
}, },
isITAC() {
return store.getters.order.policy.isItac;
},
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
@ -509,9 +509,6 @@ export default {
getSelectedProvider() { getSelectedProvider() {
return store.getters.order.serviceLocation.provider; return store.getters.order.serviceLocation.provider;
}, },
getIsVehicleMobileStaticRecalibrationApplicableFromStore() {
return store.getters.order.vehicle.isMobileStaticRecalibrationApplicable;
},
resetMobileLocation() { resetMobileLocation() {
this.streetAddress = ""; this.streetAddress = "";
this.apartmentNumberOrBusinessName = ""; this.apartmentNumberOrBusinessName = "";

View file

@ -80,7 +80,11 @@ import vehicleQuestion from "@/layouts/vehicle/vehicle-question/vehicle-question
// Supporting files // Supporting files
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { experimentUniverses } from "@/constants/experiments"; import { experimentUniverses } from "@/constants/experiments";
import { getSessionKeyValue, getUserIdValue, getDeviceIdValue } from "@/helpers/heritage-integration/cookie-helper"; import {
getSessionKeyValue,
getUserIdValue,
getDeviceIdValue,
} from "@/helpers/heritage-integration/cookie-helper";
import { settleAllPromises } from "@/helpers/layout-helper"; import { settleAllPromises } from "@/helpers/layout-helper";
import { Form, defineRule } from "vee-validate"; import { Form, defineRule } from "vee-validate";
import { required } from "@/helpers/validation-rules"; import { required } from "@/helpers/validation-rules";
@ -117,7 +121,6 @@ export default {
modelOptions: [], modelOptions: [],
styleOptions: [], styleOptions: [],
displayNoServiceAlert: false, displayNoServiceAlert: false,
isMobileStaticRecalibrationApplicable: this.getIsMobileStaticRecalibrationApplicable(),
}; };
}, },
@ -440,8 +443,6 @@ export default {
this.imageVifNumber = result?.data.imageVifNumber; this.imageVifNumber = result?.data.imageVifNumber;
this.imageVifColor = result?.data.imageVifColor; this.imageVifColor = result?.data.imageVifColor;
this.displayNoServiceAlert = !result?.data.canSafeliteService; this.displayNoServiceAlert = !result?.data.canSafeliteService;
this.isMobileStaticRecalibrationApplicable =
result?.data.isMobileStaticRecalibrationApplicable;
}, },
resetAlert() { resetAlert() {
this.displayNoServiceAlert = false; this.displayNoServiceAlert = false;
@ -460,8 +461,6 @@ export default {
imageUrl: this.imageUrl, imageUrl: this.imageUrl,
imageVifNumber: this.imageVifNumber, imageVifNumber: this.imageVifNumber,
imageVifColor: this.imageVifColor, imageVifColor: this.imageVifColor,
isMobileStaticRecalibrationApplicable:
this.isMobileStaticRecalibrationApplicable,
}, },
false false
); );
@ -537,9 +536,6 @@ export default {
getImageVifColorfromStore() { getImageVifColorfromStore() {
return store.getters.vehicle.imageVifColor; return store.getters.vehicle.imageVifColor;
}, },
getIsMobileStaticRecalibrationApplicable() {
return store.getters.vehicle.isMobileStaticRecalibrationApplicable;
},
}, },
components: { components: {

View file

@ -837,6 +837,7 @@ function updateExternalParameterState() {
const externalParameterServicePackage = getQuerystringParameter(queryStrings.SERVICE_PACKAGE); const externalParameterServicePackage = getQuerystringParameter(queryStrings.SERVICE_PACKAGE);
const externalParameterNumberOfChips = getQuerystringParameter(queryStrings.NUMBER_OF_CHIPS); const externalParameterNumberOfChips = getQuerystringParameter(queryStrings.NUMBER_OF_CHIPS);
const externalParameterSource = getQuerystringParameter(queryStrings.EXPERIMENTS); const externalParameterSource = getQuerystringParameter(queryStrings.EXPERIMENTS);
const externalParameterPhoneNumber = getQuerystringParameter(queryStrings.PHONE_NUMBER);
if ( if (
externalParameterYear && externalParameterYear &&
externalParameterMake && externalParameterMake &&
@ -892,6 +893,13 @@ function updateExternalParameterState() {
if (externalParameterSource) { if (externalParameterSource) {
store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_SOURCE, externalParameterSource); store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_SOURCE, externalParameterSource);
} }
if (externalParameterPhoneNumber) {
store.commit(
storeMutations.UPDATE_EXTERNAL_PARAMETER_PHONE_NUMBER,
externalParameterPhoneNumber
);
store.dispatch(storeActions.SAVE_PHONE_NUMBER, externalParameterPhoneNumber);
}
} }
// if there is an existing external parameter state then they have already been through from an external source(LeadGen) and // if there is an existing external parameter state then they have already been through from an external source(LeadGen) and

View file

@ -68,7 +68,6 @@ const getDefaultState = () => {
registration: { registration: {
licensePlate: null, licensePlate: null,
}, },
isMobileStaticRecalibrationApplicable: false,
}, },
serviceLocation: { serviceLocation: {
address: null, address: null,
@ -226,10 +225,6 @@ export const mutations = {
updateVehicleVin(state, vin) { updateVehicleVin(state, vin) {
state.order.vehicle.vin = vin; state.order.vehicle.vin = vin;
}, },
updateIsMobileStaticRecalibrationApplicable(state, isMobileStaticRecalibrationApplicable) {
state.order.vehicle.isMobileStaticRecalibrationApplicable =
isMobileStaticRecalibrationApplicable;
},
updateIsRepair(state, isRepair) { updateIsRepair(state, isRepair) {
state.order.damage.isRepair = isRepair; state.order.damage.isRepair = isRepair;
}, },
@ -343,6 +338,9 @@ export const mutations = {
updateCustomerEmailAddress(state, customerEmailAddress) { updateCustomerEmailAddress(state, customerEmailAddress) {
state.order.customer.emailAddress = customerEmailAddress; state.order.customer.emailAddress = customerEmailAddress;
}, },
updateCustomerPhoneNumber(state, phoneNumber) {
state.order.customer.phoneNumber = phoneNumber;
},
updateVehicle(state, vehicleInfo) { updateVehicle(state, vehicleInfo) {
state.order.vehicle.year = vehicleInfo.year; state.order.vehicle.year = vehicleInfo.year;
state.order.vehicle.make = vehicleInfo.make; state.order.vehicle.make = vehicleInfo.make;
@ -355,8 +353,6 @@ export const mutations = {
state.order.vehicle.imageUrl = vehicleInfo.imageUrl; state.order.vehicle.imageUrl = vehicleInfo.imageUrl;
state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber; state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber;
state.order.vehicle.imageColor = vehicleInfo.imageVifColor; state.order.vehicle.imageColor = vehicleInfo.imageVifColor;
state.order.vehicle.isMobileStaticRecalibrationApplicable =
vehicleInfo.isMobileStaticRecalibrationApplicable;
}, },
updateRegistration(state, registrationInfo) { updateRegistration(state, registrationInfo) {
state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate; state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate;
@ -495,6 +491,10 @@ export const mutations = {
externalParameterState.quote.servicePackage = servicePackage; externalParameterState.quote.servicePackage = servicePackage;
saveExternalParameterState(externalParameterState); saveExternalParameterState(externalParameterState);
}, },
updateExternalParameterPhoneNumber(state, phoneNumber) {
externalParameterState.customer.phoneNumber = phoneNumber;
saveExternalParameterState(externalParameterState);
},
//RESET ExternalParameter MUTATIONS //RESET ExternalParameter MUTATIONS
resetExternalParameterVehicleState(state) { resetExternalParameterVehicleState(state) {
externalParameterState.vehicle.year = null; externalParameterState.vehicle.year = null;
@ -528,6 +528,10 @@ export const mutations = {
externalParameterState.isExternalParameter = externalParameterStatus.INACTIVE; externalParameterState.isExternalParameter = externalParameterStatus.INACTIVE;
saveExternalParameterState(externalParameterState); saveExternalParameterState(externalParameterState);
}, },
resetExternalParameterCustomerState(state) {
externalParameterState.customer.phoneNumber = null;
saveExternalParameterState(externalParameterState);
},
// RESET DEPENDENCY MUTATIONS // RESET DEPENDENCY MUTATIONS
resetVehicleState(state) { resetVehicleState(state) {
@ -541,7 +545,6 @@ export const mutations = {
state.order.vehicle.imageUrl = null; state.order.vehicle.imageUrl = null;
state.order.vehicle.imageVifNumber = null; state.order.vehicle.imageVifNumber = null;
state.order.vehicle.imageColor = null; state.order.vehicle.imageColor = null;
state.order.vehicle.isMobileStaticRecalibrationApplicable = false;
}, },
resetDamageState(state) { resetDamageState(state) {
state.order.damage.isRepair = null; state.order.damage.isRepair = null;
@ -984,6 +987,7 @@ export const getters = {
externalParameterQuote: (state) => externalParameterState?.quote, externalParameterQuote: (state) => externalParameterState?.quote,
externalParameterServiceZip: (state) => externalParameterState?.serviceZip, externalParameterServiceZip: (state) => externalParameterState?.serviceZip,
externalParameterEstimate: (state) => externalParameterState?.estimate, externalParameterEstimate: (state) => externalParameterState?.estimate,
externalParameterCustomer: (state) => externalParameterState?.customer,
isExternalParameter: (state) => externalParameterState?.isExternalParameter, isExternalParameter: (state) => externalParameterState?.isExternalParameter,
}; };
@ -1448,16 +1452,7 @@ export const actions = {
logPartQuestions( logPartQuestions(
context, context,
{ { eon, ctu, workOrderId, workOrderNumber, carId, glassLocation, partQuestions, userAgent }
eon,
ctu,
workOrderId,
workOrderNumber,
carId,
glassLocation,
partQuestions,
userAgent,
}
) { ) {
var payload = { var payload = {
applicationName: applicationConfig.APPLICATION_NAME, applicationName: applicationConfig.APPLICATION_NAME,
@ -1468,15 +1463,14 @@ export const actions = {
carId: carId, carId: carId,
glassLocation: glassLocation, glassLocation: glassLocation,
partQuestions: partQuestions, partQuestions: partQuestions,
userAgent: navigator.userAgent userAgent: navigator.userAgent,
}; };
return globalMethods return globalMethods.callHttpClient({
.callHttpClient({ method: endpoints.LogPartQuestions.method,
method: endpoints.LogPartQuestions.method, endpoint: endpoints.LogPartQuestions.url,
endpoint: endpoints.LogPartQuestions.url, payload: payload,
payload: payload, });
});
}, },
// Misc Actions // Misc Actions
@ -1654,8 +1648,6 @@ export const actions = {
const coverageStatus = coverageStatusEnum(order.payment?.insuranceCoverage?.coverageStatus); const coverageStatus = coverageStatusEnum(order.payment?.insuranceCoverage?.coverageStatus);
const coverageType = coverageTypeEnum(order.payment?.insuranceCoverage?.coverageType); const coverageType = coverageTypeEnum(order.payment?.insuranceCoverage?.coverageType);
const isItacOptimized = order.policy?.isItac ?? false; const isItacOptimized = order.policy?.isItac ?? false;
const isMobileStaticRecalibrationApplicable =
order.vehicle?.isMobileStaticRecalibrationApplicable;
const zipCode = const zipCode =
serviceZipCode ?? serviceZipCode ??
order.serviceLocation?.provider?.address?.zipCode ?? order.serviceLocation?.provider?.address?.zipCode ??
@ -1671,12 +1663,10 @@ export const actions = {
var endPoint = `${endpoints.GetMobileFeePart.url}/?serviceType=${serviceType}&facilityType=${facilityType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItacOptimized=${isItacOptimized}&zipCode=${zipCode}`; var endPoint = `${endpoints.GetMobileFeePart.url}/?serviceType=${serviceType}&facilityType=${facilityType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItacOptimized=${isItacOptimized}&zipCode=${zipCode}`;
if (isMobileStaticRecalibrationApplicable) { const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]);
const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]); const carId = order.vehicle?.carId;
const carId = order.vehicle?.carId; if (recalPartNumber && carId) {
if (recalPartNumber && carId) { endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`;
endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`;
}
} }
if (coverageStatus) { if (coverageStatus) {
@ -2279,18 +2269,7 @@ export const actions = {
// Vehicle // Vehicle
saveVehicle( saveVehicle(
context, context,
{ { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }
year,
make,
model,
style,
carId,
category,
imageUrl,
imageVifNumber,
imageVifColor,
isMobileStaticRecalibrationApplicable,
}
) { ) {
if ( if (
context.state.order.vehicle.year != year || context.state.order.vehicle.year != year ||
@ -2311,10 +2290,6 @@ export const actions = {
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
context.commit(
storeMutations.UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE,
isMobileStaticRecalibrationApplicable
);
} }
}, },
@ -3039,6 +3014,10 @@ export const actions = {
context.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, email === "" ? null : email); context.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, email === "" ? null : email);
}, },
savePhoneNumber(context, phoneNumber) {
context.commit(storeMutations.UPDATE_CUSTOMER_PHONE_NUMBER, phoneNumber === "" ? null : phoneNumber);
},
saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) { saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) {
//Reset dependent state when changing //Reset dependent state when changing
if (vehicleInfo.vin !== context.state.order.vehicle.vin) { if (vehicleInfo.vin !== context.state.order.vehicle.vin) {
@ -3132,6 +3111,7 @@ export const actions = {
context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_ESTIMATE_STATE); context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_ESTIMATE_STATE);
context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_SERVICEZIP_STATE); context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_SERVICEZIP_STATE);
context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_QUOTE_STATE); context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_QUOTE_STATE);
context.commit(storeMutations.RESET_EXTERNAL_PARAMETER_CUSTOMER_STATE);
context.commit(storeMutations.RESET_IS_EXTERNAL_PARAMETER); context.commit(storeMutations.RESET_IS_EXTERNAL_PARAMETER);
} }
}, },
@ -3704,6 +3684,9 @@ function createExternalParameterDefaultState() {
isInsurance: null, isInsurance: null,
servicePackage: null, servicePackage: null,
}, },
customer: {
phoneNumber: null,
},
}; };
// set to session storage // set to session storage
saveExternalParameterState(externalParameterDefaultState); saveExternalParameterState(externalParameterDefaultState);