From ce6916658abbf861d0fd6b7b9df1c5804f2cf888 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Mon, 18 Sep 2023 16:20:45 -0400 Subject: [PATCH] First pass at desktop max width and breakpoints per page. Rename funnel-footer to nav-bar. --- .../questions-page-layout.vue | 8 +- .../nav-bar.spec.js} | 12 +- .../funnel-footer.vue => nav-bar/nav-bar.vue} | 10 +- .../address-lookup/address-lookup.spec.js | 4 +- src/layouts/address-lookup/address-lookup.vue | 22 +- .../address-vehicles/address-vehicles.spec.js | 14 +- .../address-vehicles/address-vehicles.vue | 14 +- .../customer-details/customer-details.vue | 113 +-- src/layouts/estimate/estimate.spec.js | 4 +- src/layouts/estimate/estimate.vue | 128 +-- .../license-plate-lookup.spec.js | 10 +- .../license-plate-lookup.vue | 24 +- src/layouts/payment-method/payment-method.vue | 6 +- src/layouts/quote/quote.vue | 235 +++--- src/layouts/review/review.vue | 173 ++-- src/layouts/schedule/schedule.spec.js | 2 +- src/layouts/schedule/schedule.vue | 787 +++++++++--------- .../service-location/service-location.vue | 196 +++-- src/layouts/vehicle-damage/vehicle-damage.vue | 162 ++-- .../vehicle-parts/vehicle-parts.spec.js | 2 +- src/layouts/vehicle-parts/vehicle-parts.vue | 10 +- src/layouts/vehicle/vehicle.vue | 135 ++- src/layouts/vin-lookup/vin-lookup.spec.js | 8 +- src/layouts/vin-lookup/vin-lookup.vue | 20 +- src/mixins/base-mixin.js | 4 +- src/styles/common-styles.scss | 12 +- src/styles/ux-variables.scss | 9 - 27 files changed, 1100 insertions(+), 1024 deletions(-) rename src/fmg-components/{funnel-footer/funnel-footer.spec.js => nav-bar/nav-bar.spec.js} (84%) rename src/fmg-components/{funnel-footer/funnel-footer.vue => nav-bar/nav-bar.vue} (94%) 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 f6bb2a656..801987e31 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 @@ -23,8 +23,8 @@ :answerKey="questionsDatum.answerKey" :validationRules="validationRules" /> - { +describe("nav-bar.vue", () => { test("Should emit ForwardClicked on button click", async () => { // Act - const wrapper = mount(funnelFooter, { + const wrapper = mount(navbar, { mixins: [mockMixin], }); wrapper.vm.buttonClick(); @@ -14,7 +14,7 @@ describe("funnel-footer.vue", () => { test("Should emit BackClicked on link click", async () => { // Act - const wrapper = mount(funnelFooter, { + const wrapper = mount(navbar, { mixins: [mockMixin], }); wrapper.vm.linkClick(); @@ -24,7 +24,7 @@ describe("funnel-footer.vue", () => { test("Should change button text when update button text is called", async () => { // Act - const wrapper = mount(funnelFooter, { + const wrapper = mount(navbar, { mixins: [mockMixin], }); wrapper.vm.updateButtonText("newText"); @@ -35,7 +35,7 @@ describe("funnel-footer.vue", () => { test("should run removeLoader fn on buttonMain and return false for onkeydown fn", async () => { // Arrange - const wrapper = mount(funnelFooter, { + const wrapper = mount(navbar, { mixins: [mockMixin], }); diff --git a/src/fmg-components/funnel-footer/funnel-footer.vue b/src/fmg-components/nav-bar/nav-bar.vue similarity index 94% rename from src/fmg-components/funnel-footer/funnel-footer.vue rename to src/fmg-components/nav-bar/nav-bar.vue index 448f15319..bb0cbc399 100644 --- a/src/fmg-components/funnel-footer/funnel-footer.vue +++ b/src/fmg-components/nav-bar/nav-bar.vue @@ -1,6 +1,6 @@ + const payment = this.$store.getters.payment; + if (payment.isInsurance) { + navigateToHeritageFunnel({ + shouldSaveSession: true, + loadingModal: this.$refs.loadingModal, + }); + } else { + this.$router.navigateWithSaving( + this.navigationScenarios.CLICKED_FORWARD_WITH_CASH, + this.$route + ); + } + }, + }, + components: { + funnelHeader, + navbar, + vehicleBanner, + funnelSubHeader, + Form, + textBlock, + cashOrInsuranceQuestion, + servicePackageQuestion, + contentGroupModal, + loadingModal, + }, + }; + + diff --git a/src/layouts/review/review.vue b/src/layouts/review/review.vue index 2fb033ea3..592654db1 100644 --- a/src/layouts/review/review.vue +++ b/src/layouts/review/review.vue @@ -1,105 +1,116 @@ diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e49cd295c..b5ceb81dd 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -1,87 +1,109 @@ @@ -95,7 +117,7 @@ import appointmentTypeQuestion from "@/layouts/service-location/appointment-type import shopQuestion from "@/layouts/service-location/shop-question/shop-question"; import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; -import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; +import navbar from "@/fmg-components/nav-bar/nav-bar"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; import { Form } from "vee-validate"; @@ -240,7 +262,7 @@ export default { set: function (newValue) { this.streetAddress = newValue.addressQuestions.streetAddress; this.apartmentNumberOrBusinessName = - newValue.addressQuestions.apartmentNumberOrBusinessName; + newValue.addressQuestions.apartmentNumberOrBusinessName; this.city = newValue.addressQuestions.city; this.state = newValue.addressQuestions.state; this.zipCode = newValue.addressQuestions.zipCode; @@ -369,10 +391,10 @@ export default { setServiceabilityDetails(serviceabilityDetails) { this.isGlassServiceableInshop = serviceabilityDetails.isGlassServiceableInshop; this.isRecalibrationServiceableInshop = - serviceabilityDetails.isRecalibrationServiceableInshop; + serviceabilityDetails.isRecalibrationServiceableInshop; this.isGlassServiceableMobile = serviceabilityDetails.isGlassServiceableMobile; this.isRecalibrationServiceableMobile = - serviceabilityDetails.isRecalibrationServiceableMobile; + serviceabilityDetails.isRecalibrationServiceableMobile; }, backButtonAction() { this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); @@ -456,7 +478,7 @@ export default { appointmentTypeQuestion, mobileLocationModalQuestions, funnelHeader, - funnelFooter, + navbar, funnelSubHeader, Form, loadingModal, diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index c03fabda1..e27d398a4 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -1,65 +1,81 @@