Merge branch 'develop' into CSR-2427-add-appt-details
This commit is contained in:
commit
96aca0094e
19 changed files with 85 additions and 21 deletions
|
|
@ -102,6 +102,8 @@ const storeActions = {
|
|||
RESET_SUBMITTED_ORDER: "resetSubmittedOrder",
|
||||
RESET_EXTERNAL_PARAMETER_STATE: "resetExternalParameterState",
|
||||
UPDATE_EXTERNAL_PARAMETER_MMS: "updateExternalParameterMMS",
|
||||
|
||||
SAVE_LOGGING_OPTION: "saveLoggingOption",
|
||||
};
|
||||
|
||||
export { storeActions };
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ const storeMutations = {
|
|||
UPDATE_STATE_WITH_ORDER_INFORMATION: "updateStateWithOrderInformation",
|
||||
UPDATE_SAVE_SESSION_PROMISE: "updateSaveSessionPromise",
|
||||
UPDATE_LAST_PAGE_VISITED: "updateLastPageVisited",
|
||||
UPDATE_LOGGING_OPTION: "updateLoggingOption",
|
||||
|
||||
// EXPERIMENT MUTATIONS
|
||||
UPDATE_EXPERIMENTS: "updateExperiments",
|
||||
|
|
|
|||
|
|
@ -124,6 +124,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isAddressFieldFocused: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -225,7 +229,9 @@ export default {
|
|||
).then(() => {
|
||||
// When loaded, trigger the setup
|
||||
this.initializeAutocomplete();
|
||||
this.addressField1.focus();
|
||||
if (this.isAddressFieldFocused) {
|
||||
this.addressField1.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
initializeAutocomplete() {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
:ref="modalName"
|
||||
:headerText="modalHeaderText"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
:onModalOpenedCallback="focusOnPromoInput"
|
||||
:onModalOpenedCallback="openModal"
|
||||
:footerButtonText="modalFooterText"
|
||||
@footer-button-event="addPromoCode">
|
||||
<promoQuestion
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export function updateOrCreateFunnelCookie() {
|
|||
|
||||
// Set up cookie with all the props.
|
||||
setFunnelCookieProperties({
|
||||
LastTouched: new Date().toUTCString(),
|
||||
LastTouched: new Date().toJSON(),
|
||||
SavedSessionTimeoutDate: store.getters.applicationUser.savedSessionTimeout,
|
||||
DidHeritageFunnelUpdateLast: false,
|
||||
ShouldResetState: false,
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ Function to calculate the date for the saved session timeout.
|
|||
export function getDateForSavedSessionTimeout() {
|
||||
const currentDate = new Date(new Date().toUTCString());
|
||||
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS);
|
||||
return currentDate.toUTCString();
|
||||
return currentDate.toJSON();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ describe("getDateForSavedSessionTimeout", () => {
|
|||
currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS);
|
||||
|
||||
// Act
|
||||
const result = getDateForSavedSessionTimeout();
|
||||
const result = new Date(getDateForSavedSessionTimeout()).toUTCString();
|
||||
|
||||
// Assert
|
||||
expect(result).toEqual(currentDate.toUTCString());
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
ref="customerQuestions"
|
||||
v-model="customerQuestions"
|
||||
:validationRules="EmailValidationRules"
|
||||
:isEmailOptional="IsEmailOptional" />
|
||||
:isEmailOptional="IsEmailOptional"
|
||||
:isAddressFieldFocused="IsAddressFieldFocused" />
|
||||
<alert
|
||||
ref="alertVinNotFound"
|
||||
v-if="displayVinNotFoundAlert"
|
||||
|
|
@ -443,6 +444,9 @@ export default {
|
|||
.replaceAll("{custom:vinYmmFound}", vinYmmFound)
|
||||
.replaceAll("{custom:vinYmmExpected}", vinYmmExpected);
|
||||
},
|
||||
IsAddressFieldFocused() {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
customerQuestions: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
<template>
|
||||
<div class="customer-questions">
|
||||
<addressQuestions ref="addressQuestions" v-model="customerModel.addressQuestions" />
|
||||
<addressQuestions
|
||||
ref="addressQuestions"
|
||||
v-model="customerModel.addressQuestions"
|
||||
:isAddressFieldFocused="isAddressFieldFocused" />
|
||||
<div class="row mb-4">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
|
|
@ -87,6 +90,11 @@ export default {
|
|||
},
|
||||
validationRules: String,
|
||||
isEmailOptional: Boolean,
|
||||
isAddressFieldFocused: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
customerModel: {
|
||||
|
|
|
|||
|
|
@ -231,6 +231,11 @@ export default {
|
|||
|
||||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
if (!resultMap.registrationZipValidationResponse.isValid) {
|
||||
this.displayInvalidZipAlert = true;
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
|
||||
// Lookup vin
|
||||
const vinLookup = await this.lookupVin(
|
||||
this.licensePlate,
|
||||
|
|
@ -251,7 +256,6 @@ export default {
|
|||
this.displayInvalidZipAlert = true;
|
||||
return this.$refs.navbar.removeLoader();
|
||||
}
|
||||
this.displayInvalidZipAlert = false;
|
||||
|
||||
// Check if the CarId has changed.
|
||||
this.isCarIdDifferent =
|
||||
|
|
@ -346,6 +350,7 @@ export default {
|
|||
this.displayNonServiceableZipAlert = false;
|
||||
this.displayMatchedDifferentVehicleAlert = false;
|
||||
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
|
||||
this.displayInvalidZipAlert = false;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
:insuranceCompanyName="insuranceCompanyName"
|
||||
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||
:shouldHideRecalibration="shouldHideRecalibration"
|
||||
:isExpandedOnLoad="false"
|
||||
:isItac="isItac"
|
||||
:isNoComp="isNoComp" />
|
||||
:isNoComp="isNoComp"
|
||||
:isExpandedOnLoad="false" />
|
||||
|
||||
<hr />
|
||||
|
||||
|
|
|
|||
|
|
@ -55,11 +55,12 @@
|
|||
v-model="lineItems"
|
||||
servicePackageOptionsCmsName="ServicePackageTitle"
|
||||
recyclingModalCmsWidgetName="RecycleModal"
|
||||
:isInsurance="isInsurance"
|
||||
:insuranceDeductible="currentDeductible"
|
||||
:insuranceCompanyName="insuranceCompanyName"
|
||||
:showInsuranceCoverageAs="showInsuranceCoverageAs"
|
||||
:isItac="isItac"
|
||||
:isNocomp="isNocomp"
|
||||
:isNoComp="isNoComp"
|
||||
:isExpandedOnLoad="true" />
|
||||
|
||||
<hr class="mb-5" />
|
||||
|
|
@ -603,7 +604,10 @@ export default {
|
|||
|
||||
cartItems.forEach((item) => {
|
||||
if (item.name !== null && item.category != "promos") {
|
||||
lineItems.push(`${item.name}|${(item.salesTax + item.subTotal).toFixed(2)}|1`);
|
||||
const total = (item.salesTax + item.subTotal).toFixed(2);
|
||||
if (total > 0) {
|
||||
lineItems.push(`${item.name}|${(item.salesTax + item.subTotal).toFixed(2)}|1`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -428,7 +428,6 @@ export default {
|
|||
);
|
||||
},
|
||||
shouldHideRecalibration() {
|
||||
if (this.isInsuranceSelected) return false;
|
||||
return (
|
||||
experimentMixin.methods
|
||||
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ export default {
|
|||
"updated-mobile-fee-part",
|
||||
"updated-contains-military-base",
|
||||
"updated-bill-to-account-number",
|
||||
"mobileLocationSelected",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -286,13 +287,15 @@ export default {
|
|||
// update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
|
||||
this.closeModal();
|
||||
//Page advance to Schedule page
|
||||
this.$emit("mobileLocationSelected");
|
||||
}
|
||||
} else {
|
||||
// Update the page level model
|
||||
this.$emit("update:modelValue", this.internalModel);
|
||||
|
||||
this.closeModal();
|
||||
//Page advance to Schedule page
|
||||
this.$emit("mobileLocationSelected");
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -305,6 +308,9 @@ export default {
|
|||
deep: true,
|
||||
},
|
||||
},
|
||||
unmounted() {
|
||||
if (this.isModalOpened) this.closeModal();
|
||||
},
|
||||
components: {
|
||||
textLink,
|
||||
modal,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@
|
|||
validationRules="mobile-location-required"
|
||||
ref="mobileLocationQuestions"
|
||||
linkWidgetName="MobileLocationLinkWidget"
|
||||
modalWidgetName="MobileLocationModalWidget" />
|
||||
modalWidgetName="MobileLocationModalWidget"
|
||||
@mobileLocationSelected="forwardButtonAction" />
|
||||
|
||||
<shopQuestion
|
||||
ref="shopQuestion"
|
||||
|
|
|
|||
|
|
@ -340,6 +340,7 @@ export default {
|
|||
//Insurance
|
||||
if (order.payment.isInsurance) {
|
||||
payload.isInsuranceVerified = order.payment.insuranceCoverage.isVerified ?? "";
|
||||
payload.insuranceCompanyName = order.policy.insuranceCompanyName ?? "";
|
||||
if (!order.payment.insuranceCoverage.isVerified) {
|
||||
payload.isInsuranceItac = "";
|
||||
payload.isInsuranceNoComp = "";
|
||||
|
|
@ -361,6 +362,7 @@ export default {
|
|||
payload.insuranceDeductible = "";
|
||||
payload.isInsuranceItac = "";
|
||||
payload.isInsuranceNoComp = "";
|
||||
payload.insuranceCompanyName = "";
|
||||
}
|
||||
|
||||
pushToDataLayerIfDefined(payload);
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ async function navigate(
|
|||
const promo = getQuerystringParameter(queryStrings.PROMO);
|
||||
const pageError = getQuerystringParameter(queryStrings.PAGE_ERROR);
|
||||
const logQs = getQuerystringParameter(queryStrings.LOG);
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, logQs, false);
|
||||
|
||||
log("------------- router index.js navigate start -----------------");
|
||||
log(" --scenario: ", scenario);
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ const getDefaultState = () => {
|
|||
experiments: [],
|
||||
triggeredSiteEntry: false,
|
||||
affiliateCookies: [],
|
||||
loggingOption: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
@ -414,6 +415,9 @@ export const mutations = {
|
|||
updateLastPageVisited(state, lastPageVisited) {
|
||||
state.applicationUser.lastPageVisited = lastPageVisited;
|
||||
},
|
||||
updateLoggingOption(state, loggingOption) {
|
||||
state.applicationUser.loggingOption = loggingOption;
|
||||
},
|
||||
// EVENT BUS MUTATIONS
|
||||
addEventToBus(state, event) {
|
||||
state.applicationUser.eventBus.push(event);
|
||||
|
|
@ -689,10 +693,6 @@ export const mutations = {
|
|||
!sessionInformation.order.payment.isInsurance &&
|
||||
!sessionInformation.order.serviceLocation.provider?.providerNumber
|
||||
) {
|
||||
console.log(
|
||||
"------------- updateStateWithOrderInformation reset isInsurance -----------------"
|
||||
);
|
||||
console.log(new Date() + " sessionInformation: " + JSON.stringify(sessionInformation));
|
||||
state.order.payment.isInsurance = null;
|
||||
} else {
|
||||
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
|
||||
|
|
@ -1033,6 +1033,7 @@ export const actions = {
|
|||
endpoint: endpoints.LookupVehicleByVin.url,
|
||||
payload: {
|
||||
vin: vin, // EX "1J4GW58S4XC541166"
|
||||
logEnabled: context.getters.applicationUser.loggingOption,
|
||||
},
|
||||
logApiCall: true,
|
||||
pageNameToLog: pageNameToLog,
|
||||
|
|
@ -2099,6 +2100,13 @@ export const actions = {
|
|||
) {
|
||||
const order = context.state.order;
|
||||
|
||||
var dtParts = referralDate.split("-");
|
||||
const year = dtParts[0];
|
||||
const month = dtParts[1];
|
||||
const day = dtParts[2].substring(0, 2);
|
||||
|
||||
const loadDate = `${year}-${month}-${day}`;
|
||||
|
||||
return globalMethods
|
||||
.callHttpClient({
|
||||
method: endpoints.LoadSession.method,
|
||||
|
|
@ -2106,7 +2114,7 @@ export const actions = {
|
|||
payload: {
|
||||
savedSessionId: savedSessionId?.toString(),
|
||||
referralNumber: referralNumber?.toString(),
|
||||
referralDate: referralDate?.toString(),
|
||||
referralDate: loadDate,
|
||||
parentAccountNumber: parentAccountNumber?.toString(),
|
||||
referralCorrelationId: referralCorrelationId,
|
||||
},
|
||||
|
|
@ -3018,6 +3026,15 @@ export const actions = {
|
|||
);
|
||||
},
|
||||
|
||||
saveLoggingOption(context, loggingOption) {
|
||||
var option = false;
|
||||
if (loggingOption != null) {
|
||||
option = loggingOption == "true" ? true : false;
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_LOGGING_OPTION, option);
|
||||
},
|
||||
|
||||
async getRecalPartsAndSaveToLineItems(context, { pageNameToLog }) {
|
||||
// identify each part that needs recal
|
||||
const glassParts = context.state.order?.lineItems?.glassParts
|
||||
|
|
|
|||
|
|
@ -404,6 +404,11 @@ describe("Actions", () => {
|
|||
it("lookupVehicleByVin action, should return car data", async () => {
|
||||
// Arrange
|
||||
const context = state;
|
||||
context.getters = {
|
||||
applicationUser: {
|
||||
loggingOption: false,
|
||||
},
|
||||
};
|
||||
|
||||
// Act
|
||||
globalMethods.callHttpClient.mockImplementation(() => {
|
||||
|
|
@ -779,6 +784,7 @@ describe("Actions", () => {
|
|||
const response = await actions.loadSession(context, {
|
||||
payload: {
|
||||
savedSessionId: "",
|
||||
referralDate: "2024-12-11T00:29:41.967",
|
||||
},
|
||||
pageNameToLog: "test",
|
||||
});
|
||||
|
|
@ -808,6 +814,7 @@ describe("Actions", () => {
|
|||
const response = await actions.loadSession(context, {
|
||||
payload: {
|
||||
savedSessionId: "",
|
||||
referralDate: "2024-12-11T00:29:41.967",
|
||||
},
|
||||
pageNameToLog: "test",
|
||||
});
|
||||
|
|
@ -836,6 +843,7 @@ describe("Actions", () => {
|
|||
const response = await actions.loadSession(context, {
|
||||
payload: {
|
||||
savedSessionId: "",
|
||||
referralDate: "2024-12-11T00:29:41.967",
|
||||
},
|
||||
pageNameToLog: "test",
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue