diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index c972d8118..16e0803e6 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -124,10 +124,6 @@ const endpoints = { url: "/order/api/v1/order/load-session", method: "POST", }, - SaveQuote: { - url: "/order/api/v1/order/initiate-saved-progress-email", - method: "POST", - }, GetSignature: { url: "/order/api/v1/order/sign", method: "POST", diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 45a18bace..41e5896bd 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -37,7 +37,6 @@ const storeActions = { GET_MOBILE_PREMIUM_FEE: "getMobilePremiumFee", SAVE_SESSION: "saveSession", LOAD_SESSION: "loadSession", - SAVE_QUOTE: "saveQuote", UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE: "updateStoreWithSaveSessionResponse", VALIDATE_ZIP: "validateZip", PRICE_ORDER_ITEMS_AND_SAVE_SERVER_DATA: "priceOrderItemsAndSaveServerData", diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index e412678ff..37ebee18e 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -25,17 +25,17 @@ + @@ -53,7 +53,6 @@ export default { props: { headerText: String, footerButtonText: String, - suppressPageScroll: Boolean, onModalOpenedCallback: { type: Function, }, @@ -108,10 +107,8 @@ export default { onModalClosed() { this.resetButtonStyle(); this.onModalClosedCallback?.(); - if (this.suppressPageScroll) document.querySelector("body").classList.remove("prevent-modal-scroll"); }, openModal() { - if (this.suppressPageScroll) document.querySelector("body").classList.add("prevent-modal-scroll"); const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId)); modal.show(); this.$emit("isModalOpened", true); @@ -234,29 +231,6 @@ export default { } } } -.save-progress-modal-question { - p.modal-body { - padding: 0; - } - .modal-body { - display: flex; - flex-direction: column; - .textbox-question { - padding: .25rem 0; - label { - text-align: left; - font-weight: 600; - } - } - } - .modal-disclaimer { - font-size: .75rem; - order: 2; - } - .modal-footer { - padding: 1.5rem 0; - } -} body { .modal-backdrop { height: 100%; diff --git a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue index 2c4d71803..982738394 100644 --- a/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue +++ b/src/fmg-components/layouts/questions-page-layout/questions-page-layout.vue @@ -25,7 +25,7 @@
-
+
- - diff --git a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.spec.js b/src/fmg-components/save-progress-modal-question/save-progress-modal-question.spec.js deleted file mode 100644 index 15fb1481d..000000000 --- a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.spec.js +++ /dev/null @@ -1,51 +0,0 @@ -import { mount, shallowMount } from "@vue/test-utils"; -import saveProgressModalQuestion from "./save-progress-modal-question"; -import { getMountOptions } from "@/helpers/unit-test-helper.js"; - -jest.mock("@/digital-components/modal/modal", () => ({ - methods: { - openModal: jest.fn(), - resetButtonStyle: jest.fn(), - }, -})); - -describe("save-progress-modal-question ", () => { - describe("when openModal is run ", () => { - test("the modal should open ", () => { - // Arrange - const { wrapper } = setupMocks({ - props: { - modelValue: "", - modalWidgetName: "testModal", - }, - }); - - // Act - wrapper.vm.openModal(); - - // Assert - expect(wrapper.vm.modal).not.toBeNull(); - }); - }); -}); - -function setupMocks({ options, props }) { - const mountOptions = getMountOptions({ - ...options, - }); - - const mockBaseMixin = { - methods: { - getCmsContent: jest.fn(), - dispatchStoreAction: jest.fn(), - }, - }; - - if (props) mountOptions.propsData = props; - - mountOptions.global.mixins = [mockBaseMixin]; - - const wrapper = mount(saveProgressModalQuestion, mountOptions); - - return { wrapper }; -} diff --git a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue b/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue deleted file mode 100644 index 4ff6304f5..000000000 --- a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - - - diff --git a/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.spec.js b/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.spec.js deleted file mode 100644 index 7cc3d100c..000000000 --- a/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -import { shallowMount } from "@vue/test-utils"; -import saveProgressQuestion from "./save-progress-question"; - -describe("save-progress-question.vue", () => { - it("Should get the modelValue", async () => { - // Arrange - const text = "test"; - const wrapper = shallowMount(saveProgressQuestion, { - props: { - modelValue: text, - }, - attachTo: document.body, - }); - - // Act - const modelValueText = wrapper.vm.value; - wrapper.vm.value = "test also"; - - // Assert - expect(modelValueText).toEqual("test"); - }); - - it("Should emit to set value", async () => { - // Arrange - const text = "test"; - const wrapper = shallowMount(saveProgressQuestion, { - props: { - modelValue: text, - }, - attachTo: document.body, - }); - - // Act - const modelValueText = wrapper.vm.value; - wrapper.vm.value = "test also"; - - // Assert - expect(wrapper.emitted("update:modelValue")).toEqual([["test also"]]); - }); -}); diff --git a/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.vue b/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.vue deleted file mode 100644 index 221aa3415..000000000 --- a/src/fmg-components/save-progress-modal-question/save-progress-question/save-progress-question.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js index e88a64c27..555c41325 100644 --- a/src/helpers/heritage-integration/order-helper.js +++ b/src/helpers/heritage-integration/order-helper.js @@ -98,23 +98,6 @@ export async function submitWorkOrder({ }); } -export async function saveQuote({ pageNameToLog }) { - // save session back to sv2 so the email gets saved just in case they refresh or step away and come back later - await saveSession({ - pageNameToLog: pageNameToLog, - shouldAwaitSaveSessionQueue: true, - submitAfterSave: false, - createUnscheduledStatusWorkOrderForPIA: false, - }); - - return await baseMixin.methods.dispatchStoreActionWithLogging( - storeActions.SAVE_QUOTE, - {}, - pageNameToLog, - false - ); -} - // PRIVATE FUNCTIONS // /* diff --git a/src/helpers/logger.js b/src/helpers/logger.js index 53c2cb808..8af062c3b 100644 --- a/src/helpers/logger.js +++ b/src/helpers/logger.js @@ -32,7 +32,12 @@ export class Logger { } formatLogEntry(message, details) { - return `Application: ${applicationConfig.APPLICATION_NAME}\n${message}\n${ + const refSeqNumber = store.getters.order.referralSequenceNumber ?? ""; + const year = store.getters.vehicle.year ?? ""; + const make = store.getters.vehicle.make ?? ""; + const model = store.getters.vehicle.model ?? ""; + const vehicle = `${year} ${make} ${model}`; + return `${new Date()} ReferralSequenceNumber: ${refSeqNumber}\nVehicle: ${vehicle}\nApplication: ${applicationConfig.APPLICATION_NAME}\n${message}\n${ details ? JSON.stringify(details, undefined, 2) : "" }`; } diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue index d189f0f44..4d637c978 100644 --- a/src/layouts/capability-questions/capability-questions.vue +++ b/src/layouts/capability-questions/capability-questions.vue @@ -12,22 +12,13 @@ @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" :key="currentGlassIndex" - :index="currentGlassIndex"> - - - - - + :index="currentGlassIndex" /> diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index c314d7225..00df8c04b 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -12,22 +12,13 @@ @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" :key="currentGlassIndex" - :index="currentGlassIndex"> - - - - - + :index="currentGlassIndex" /> diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 199a39493..bc1ec308e 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -12,22 +12,13 @@ @forwardButtonAction="forwardButtonAction" @back-click="navigateBack" :key="currentGlassIndex" - :index="currentGlassIndex"> - - - - - + :index="currentGlassIndex" /> diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 0d25eed9b..778ce0ce8 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -121,9 +121,6 @@ store.getters = { isInsurance: false, parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER, }, - customer: { - emailAddress: "test@test.com", - } }, }; @@ -139,9 +136,6 @@ afterEach(() => { insuranceCoverage: {}, isInsurance: false, }, - customer: { - emailAddress: "test@test.com", - } }; }); @@ -269,9 +263,6 @@ describe("quote.vue", () => { glassParts: ["item", "item2"], }, payment: {}, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { zipCode: "12345", zipCodeCtu: "value", @@ -318,9 +309,6 @@ describe("quote.vue", () => { glassParts: ["item", "item2"], }, payment: {}, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { zipCode: "12345", zipCodeCtu: "value", @@ -367,9 +355,6 @@ describe("quote.vue", () => { payment: { isInsurance: null, }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -411,9 +396,6 @@ describe("quote.vue", () => { payment: { isInsurance: null, }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -456,9 +438,6 @@ describe("quote.vue", () => { payment: { isInsurance: true, }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -501,9 +480,6 @@ describe("quote.vue", () => { payment: { isInsurance: false, }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -547,9 +523,6 @@ describe("quote.vue", () => { payment: { isInsurance: null, // Ensure that previous selection isn't overriding selection }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -595,9 +568,6 @@ describe("quote.vue", () => { payment: { isInsurance: null, // Ensure that previous selection isn't overriding selection }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: null, }, @@ -642,9 +612,6 @@ describe("quote.vue", () => { payment: { isInsurance: null, }, - customer: { - emailAddress: "test@test.com", - }, serviceLocation: { state: "AZ", }, @@ -750,9 +717,6 @@ describe("quote.vue", () => { isInsurance: true, inactivePromos: [], }, - customer: { - emailAddress: "test@test.com", - }, }, externalParameterState: { isExternalParameter: 1 }, externalParameterQuote: { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 7fcb506ce..6f3809304 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -77,11 +77,6 @@ @back-clicked="backButtonAction" @ForwardClicked="forwardButtonAction" /> - - { vm.setCmsContent(resultMap.cmsContent); - vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0; vm.addableVaps = addableVaps; vm.lineItems = lineItems; vm.availableLineItems = pricingResults; @@ -419,7 +409,6 @@ export default { servicePackage: null, holdParentAccountNumber: null, holdBillToAccountNumber: null, - isEmailInStoreOnPageLoad: null, }; }, computed: { @@ -466,9 +455,6 @@ export default { }, }, methods: { - async handleClick() { - await saveQuote({ pageNameToLog: "quote" }); - }, openModalAction(modalName) { this.$refs[modalName].openModal(); }, @@ -509,9 +495,6 @@ export default { backButtonAction() { vehicleQuestionsMixin.methods.navigateBack(this); }, - saveProgress() { - saveQuote({ pageNameToLog: "quote" }); - }, forwardButtonAction() { this.dispatchStoreAction( this.storeActions.SAVE_PAYMENT_TYPE, @@ -697,7 +680,6 @@ export default { afterpayModalBanner, promoModalQuestion, recalDisclaimer, - saveProgressModalQuestion, }, }; diff --git a/src/store/index.js b/src/store/index.js index 1ef9d7e59..4f9bf61e3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1931,49 +1931,6 @@ export const actions = { }, // Session API Actions - saveQuote(context, { pageNameToLog, payload }) { - const vehicle = context.getters.vehicle; - const damage = context.getters.damage; - const order = context.state.order; - const applicationUser = context.getters.applicationUser; - const lineItems = context.state.order.lineItems; - const excludeRecalInquote = context.getters.shouldHideRecalibration; - - return globalMethods.callHttpClient({ - method: endpoints.SaveQuote.method, - endpoint: endpoints.SaveQuote.url, - payload: { - referralCorrelationId: order.referralCorrelationId, - referralNumber: order.referralNumber?.toString(), - referralSequenceNumber: order.referralSequenceNumber, - emailAddress: order.customer.emailAddress, - lastPage: pageNameToLog, - isRepair: damage.isRepair, - firstName: order.customer.firstName, - lastName: order.customer.lastName, - savedSessionId: applicationUser.savedSessionId, - serviceState: order.serviceLocation.state, - serviceZipCode: order.serviceLocation.zipCode, - parentAccountNumber: order.payment.parentAccountNumber, - excludeRecalInquote: excludeRecalInquote, - year: vehicle.year, - make: vehicle.make, - model: vehicle.model, - isInsurance: order.payment.isInsurance ?? false, - isVerified: order.payment.insuranceCoverage.isVerified ?? false, - lineItems: { - glassParts: lineItems.glassParts, - supportingItems: lineItems.supportingItems, - vaps: lineItems.vaps, - serverData: lineItems.serverData, - promos: lineItems.promos, - }, - }, - logApiCall: true, - pageNameToLog: pageNameToLog, - }); - }, - saveSession(context, { pageNameToLog, payload }) { const vehicle = context.getters.vehicle; const damage = context.getters.damage; @@ -2051,7 +2008,8 @@ export const actions = { order.payment.insuranceCoverage.coverageStatus?.toString(), coverageVerificationType: order.payment.insuranceCoverage.coverageVerificationType, - coverageSubStatus: order.payment.insuranceCoverage.coverageSubStatus, + coverageSubStatus: + order.payment.insuranceCoverage.coverageSubStatus, }, isInsurance: order.payment.isInsurance, parentAccountNumber: order.payment.parentAccountNumber, diff --git a/src/styles/common-styles.scss b/src/styles/common-styles.scss index a378f881e..002debed8 100644 --- a/src/styles/common-styles.scss +++ b/src/styles/common-styles.scss @@ -77,7 +77,7 @@ body { } } } -.modal-open:not(.prevent-modal-scroll) { +.modal-open { .container-fluid { &.page-container-grouped-styles { overflow: hidden; diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index 848cf3866..9cc61e051 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -5,7 +5,7 @@ :class="[ isPrimary ? 'btn-primary' : 'btn-secondary', isFloat ? 'float-end' : '', - (isLoaderDisplayed && !suppressLoader) ? 'has-loader' : '', + isLoaderDisplayed ? 'has-loader' : '', ]" @click="clicked"> {{ this.buttonText }} @@ -47,7 +47,7 @@ export default { true ); if (!this.isDisabled) { - if (!this.suppressLoader) this.isLoaderDisplayed = true; + this.isLoaderDisplayed = true; this.$emit("click-event"); } },