From 766435ad3aa8670ff5e4aef27aeefa997ab0c794 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 28 Sep 2023 11:40:04 -0400 Subject: [PATCH 1/7] Changed v-show to v-if to ensure proper hiding of link, no idea why this was needed --- .../service-location/shop-question/shop-question.spec.js | 9 +++++++-- .../service-location/shop-question/shop-question.vue | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index c4efdea91..99329c3b9 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -311,8 +311,7 @@ describe("shop-question.vue", () => { const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" }); // Assert - expect(showMoreShopsLink.exists()).toBe(true); - expect(showMoreShopsLink.isVisible()).toBe(false); + expect(showMoreShopsLink.exists()).toBe(false); }); it("Should display the next three shops when the 'Show more location' link is clicked", async () => { @@ -375,6 +374,12 @@ describe("shop-question.vue", () => { await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick(); + await wrapper.setData({ + displaySeeMoreLocationsLink: true + }); + + await wrapper.vm.$nextTick(); + const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" }); await wrapper.vm.$nextTick(); diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 17153f9c9..7a32baf90 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -22,7 +22,7 @@ validationRules="option-required" :additionalButtonData="additionalButtonData" /> Date: Thu, 28 Sep 2023 11:41:13 -0400 Subject: [PATCH 2/7] Prettified --- .../service-location/shop-question/shop-question.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index 99329c3b9..2904af1a9 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -375,7 +375,7 @@ describe("shop-question.vue", () => { await wrapper.vm.$nextTick(); await wrapper.setData({ - displaySeeMoreLocationsLink: true + displaySeeMoreLocationsLink: true, }); await wrapper.vm.$nextTick(); From b662ee4a997e70f243691155eb55078a2540a338 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 28 Sep 2023 13:41:04 -0400 Subject: [PATCH 3/7] CSR-1413 add routing from review to payment-method. also move the submit work order from review to payment-method and await it. --- src/helpers/heritage-integration/order-helper.js | 7 +++++++ src/layouts/confirmation/confirmation.vue | 4 +++- src/layouts/customer-details/customer-details.vue | 2 -- src/layouts/payment-method/payment-method.vue | 11 ++++++++--- src/layouts/review/review.vue | 11 ++++++++++- src/mixins/base-mixin.js | 8 -------- src/router/index.js | 7 ------- src/router/router-constants/routing-table.js | 8 ++++++++ src/store/index.js | 1 + 9 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js index addca2d41..cb80cba86 100644 --- a/src/helpers/heritage-integration/order-helper.js +++ b/src/helpers/heritage-integration/order-helper.js @@ -72,6 +72,13 @@ export async function saveSession({ pageNameToLog, shouldAwaitSaveSessionQueue = } } +export async function submitWorkOrder({ pageNameToLog }) { + await saveSession({ + pageNameToLog: pageNameToLog, + shouldAwaitSaveSessionQueue: true, + }); +} + // PRIVATE FUNCTIONS // /* diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 6c4645901..6e913fdf5 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -77,7 +77,9 @@ export default { return serviceLocationReqs && scheduleReqs; }, - forwardButtonAction() {}, + forwardButtonAction() { + window.location.replace("https://safelite.com"); + }, }, components: { funnelHeader, diff --git a/src/layouts/customer-details/customer-details.vue b/src/layouts/customer-details/customer-details.vue index 03de9ff97..34a585c1e 100644 --- a/src/layouts/customer-details/customer-details.vue +++ b/src/layouts/customer-details/customer-details.vue @@ -82,7 +82,6 @@ import { routerParams } from "@/router/router-constants/router-params"; import { required, regex } from "@/helpers/validation-rules"; import { Form, defineRule } from "vee-validate"; import { useField, validate } from "vee-validate"; -import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import store from "@/store"; // DEFINE VALIDATION RULES @@ -178,7 +177,6 @@ export default { false ); - this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false); this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); }, }, diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index f261c9c1f..78dbc3718 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -22,6 +22,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import navbar from "@/fmg-components/nav-bar/nav-bar"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; +import { submitWorkOrder } from "@/helpers/heritage-integration/order-helper.js"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -58,9 +59,13 @@ export default { // TODO return true; }, - backButtonAction() {}, - forwardButtonAction() { - this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); + backButtonAction() { + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); + }, + async forwardButtonAction() { + this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false); + await submitWorkOrder({ pageNameToLog: "payment-method" }); + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); }, }, components: { diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index 639fd0fd5..f30f6f6ac 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -125,6 +125,9 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import store from "@/store"; +// Validation +import { Form } from "vee-validate"; + export default { name: "review", async beforeRouteEnter(to, from, next) { @@ -231,7 +234,12 @@ export default { backButtonAction() { this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); }, - forwardButtonAction() {}, + forwardButtonAction() { + this.$router.navigateWithoutSaving( + this.navigationScenarios.CLICKED_FORWARD, + this.$route + ); + }, editVehicle() { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_VEHICLE_EDIT, @@ -310,6 +318,7 @@ export default { serviceLocationReview, scheduleReview, customerReview, + Form, }, }; diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index b1678fa25..b984bc565 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -91,7 +91,6 @@ export default { lineItem.partType != partTypeStrings.RAIN_DEFENSE ); }); - console.log("step one", lineItemsToPrice); let totalPrice = this.getTotalPriceOfAllLineItemsAndChildParts(lineItemsToPrice); return totalPrice; }, @@ -113,14 +112,7 @@ export default { lineItem.childParts ); } - console.log( - "step two, lineItem name: ", - lineItem.partNumber, - " / totalPrice: ", - totalPrice - ); }); - console.log("step three", totalPrice); return totalPrice; }, getTotalLineItemPrice(lineItem) { diff --git a/src/router/index.js b/src/router/index.js index eadf3b9f6..04772febd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -29,14 +29,7 @@ import analyticsMixin from "@/mixins/analytics-mixin"; import { experimentTriggers } from "../constants/experiments"; import { applicationConfig } from "../constants/application-config"; -import review from "@/layouts/review/review"; -import paymentMethod from "@/layouts/payment-method/payment-method"; const routes = [ - { - path: "/payment-method", // This is a temporary route for testing. - name: "payment-method", - component: paymentMethod, - }, { path: "/", name: "root", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index a2796ed0e..141186d23 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -465,11 +465,19 @@ const routingTable = function (store) { scenario: navigationScenarios.CLICKED_CUSTOMER_EDIT, destinationFmgPageValue: fmgPageValues.CUSTOMER_DETAILS, }, + { + scenario: navigationScenarios.CLICKED_FORWARD, + destinationFmgPageValue: fmgPageValues.PAYMENT_METHOD, + }, ], }, { fmgPageValue: fmgPageValues.PAYMENT_METHOD, maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationFmgPageValue: fmgPageValues.REVIEW, + }, { scenario: navigationScenarios.CLICKED_FORWARD, destinationFmgPageValue: fmgPageValues.CONFIRMATION, diff --git a/src/store/index.js b/src/store/index.js index 0c9a55c41..23e8ca8e0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -504,6 +504,7 @@ export const mutations = { // Export Getters export const getters = { + submitAfterSave: (state) => state.submitAfterSave, vehicle: (state) => state.order.vehicle, eventBusItem: (state) => (eventCategory, eventSubCategory) => { const matchedEvent = state.applicationUser.eventBus.find( From f9f69f827dc9685b9b319d0ef92dac3882ed7954 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 28 Sep 2023 13:44:52 -0400 Subject: [PATCH 4/7] CSR-1413 prettier --- src/layouts/payment-method/payment-method.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 78dbc3718..90c3d0136 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -65,7 +65,10 @@ export default { async forwardButtonAction() { this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false); await submitWorkOrder({ pageNameToLog: "payment-method" }); - this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); + this.$router.navigateWithoutSaving( + this.navigationScenarios.CLICKED_FORWARD, + this.$route + ); }, }, components: { From 4af8f07a29393b05f93ddc6938bf33549dd59a84 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Thu, 28 Sep 2023 15:16:28 -0400 Subject: [PATCH 5/7] Set header to responsive 6-columns. Position alert relative on page. --- .../funnel-header/funnel-header.vue | 7 ++---- .../funnel-header/menu-modal/menu-modal.vue | 24 +++++++++---------- .../questions-page-layout.vue | 4 ++-- src/layouts/address-lookup/address-lookup.vue | 4 ++-- .../address-vehicles/address-vehicles.vue | 4 ++-- src/layouts/estimate/estimate.vue | 4 ++-- .../license-plate-lookup.vue | 4 ++-- src/layouts/quote/quote.vue | 4 ++-- src/layouts/schedule/schedule.vue | 4 ++-- .../service-location/service-location.vue | 4 ++-- src/layouts/vehicle-damage/vehicle-damage.vue | 4 ++-- src/layouts/vehicle-parts/vehicle-parts.vue | 4 ++-- src/layouts/vehicle/vehicle.vue | 5 ++-- src/layouts/vin-lookup/vin-lookup.vue | 4 ++-- src/styles/common-styles.scss | 1 + 15 files changed, 39 insertions(+), 42 deletions(-) diff --git a/src/fmg-components/funnel-header/funnel-header.vue b/src/fmg-components/funnel-header/funnel-header.vue index acfacd709..b5775e649 100644 --- a/src/fmg-components/funnel-header/funnel-header.vue +++ b/src/fmg-components/funnel-header/funnel-header.vue @@ -7,7 +7,7 @@ .funnel-header { + position: relative; padding: 0.97rem 0; } .logo-image { max-width: 78px; } -.alert { - left: 0; - top: 72px; -} diff --git a/src/fmg-components/funnel-header/menu-modal/menu-modal.vue b/src/fmg-components/funnel-header/menu-modal/menu-modal.vue index aac390739..f9660966f 100644 --- a/src/fmg-components/funnel-header/menu-modal/menu-modal.vue +++ b/src/fmg-components/funnel-header/menu-modal/menu-modal.vue @@ -1,4 +1,16 @@