From be31530bfa9990cae45781afa51714f775742936 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Mon, 20 Mar 2023 09:50:05 -0400 Subject: [PATCH] Revert "Revert "Clean up"" This reverts commit 1bc00e31e713cfef5f0e928c269713237aeacab1. --- .../mobile-location-modal-questions.vue | 40 ----------------- .../service-location/service-location.vue | 45 +++---------------- 2 files changed, 6 insertions(+), 79 deletions(-) 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 46cb51d13..586e1c6de 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 @@ -22,9 +22,6 @@ cmsWidgetName="MobileFeeDisclaimerWidget" typeStyle="caption" /> -
- {{ errorMessage }} -
+ modalWidgetName="MobileLocationModalWidget" /> @@ -43,7 +42,7 @@ import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; -import { Form, defineRule } from "vee-validate"; +import { Form } from "vee-validate"; // Supporting files import baseMixin from "@/mixins/base-mixin.js"; @@ -51,24 +50,8 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { getPricedMobileFeePart } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; -import { errorMessages } from "@/constants/error-messages"; import store from "@/store"; -defineRule("service-address-required", (value) => { - const isValid = - value.addressQuestions.streetAddress !== "" && - value.addressQuestions.city !== "" && - value.addressQuestions.state !== "" && - value.addressQuestions.zipCode !== "" && - value.isVehicleProtected !== null; - - if (!isValid) { - return errorMessages.SERVICE_ADDRESS_REQUIRED; - } - - return isValid; -}); - export default { name: "service-location", data() { @@ -156,12 +139,6 @@ export default { this.state = newValue.addressQuestions.state; this.zipCode = newValue.addressQuestions.zipCode; this.isVehicleProtected = newValue.isVehicleProtected; - - // setErrors({ - // mobileLocationQuestions: "" - // }); - - //this.$refs.theForm.setTouched({}); }, }, shouldDisableForwardAction() { @@ -170,7 +147,6 @@ export default { }, methods: { arePagePrerequisitesValid() { - return ( store.getters.lineItems.supportingItems !== null && store.getters.order.serviceLocation.zipCode !== null && @@ -212,9 +188,9 @@ export default { }, }, watch: { - zipCode(newValue, oldValue) { - if (newValue !== oldValue) { - baseMixin.methods.getZipCodeData(newValue).then((r) => { + zipCode(current, previous) { + if (current !== previous) { + baseMixin.methods.getZipCodeData(current).then((r) => { this.zipContainsMilitaryBase = r.containsMilitaryBase; }); } @@ -232,12 +208,3 @@ export default { }, }; - -