diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index c9592c315..41e5896bd 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -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 }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 02b05bd28..740c5a47e 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -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", diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 4226b014c..1dd52d7ed 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -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() { diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 911522668..656aeaa38 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -10,7 +10,7 @@ :ref="modalName" :headerText="modalHeaderText" :onModalClosedCallback="onModalClosed" - :onModalOpenedCallback="focusOnPromoInput" + :onModalOpenedCallback="openModal" :footerButtonText="modalFooterText" @footer-button-event="addPromoCode"> { 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()); diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 467177139..55d8a0499 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -19,7 +19,8 @@ ref="customerQuestions" v-model="customerQuestions" :validationRules="EmailValidationRules" - :isEmailOptional="IsEmailOptional" /> + :isEmailOptional="IsEmailOptional" + :isAddressFieldFocused="IsAddressFieldFocused" />
- +
+ :isNoComp="isNoComp" + :isExpandedOnLoad="false" />
diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 7103091e6..2fbe5ca6d 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -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" />
@@ -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`); + } } }); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 357db44dd..533081210 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -428,7 +428,6 @@ export default { ); }, shouldHideRecalibration() { - if (this.isInsuranceSelected) return false; return ( experimentMixin.methods .getSettingValue(experimentSettings.RECAL_PRICE_REMOVE) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 89e095279..84087cb6e 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -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, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 9a6e649ec..0496df54c 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -96,7 +96,8 @@ validationRules="mobile-location-required" ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" - modalWidgetName="MobileLocationModalWidget" /> + modalWidgetName="MobileLocationModalWidget" + @mobileLocationSelected="forwardButtonAction" /> { 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 diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 313e7e37f..69e2feb66 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -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", });