From 6bb83f4d656f5586437cb8fccb2decbf1f7c341f Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 16 May 2023 06:44:24 -0400 Subject: [PATCH 01/14] Wrapped saveMobileLocation (mobile-location-modal-questions) into a condition to ensure that the zip has actually changed. --- .../mobile-location-modal-questions.vue | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 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 b1b981429..48642101c 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 @@ -236,35 +236,40 @@ export default { }); }, async setMobileLocation() { - // Validate the Zip Code - const zipCodeData = await this.getZipCodeData( - this.internalModel.addressQuestions.zipCode - ); + if ( + this.internalModel.addressQuestions.zipCode !== + this.modelValue.addressQuestions.zipCode + ) { + // Validate the Zip Code + const zipCodeData = await this.getZipCodeData( + this.internalModel.addressQuestions.zipCode + ); - if (!zipCodeData.isValid) { - this.displayInvalidZipAlert = true; - this.resetModalButtonStyle(); - } else { - // retrieve mobile fee part - const serviceZipCode = this.internalModel.addressQuestions.zipCode; - const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); + if (!zipCodeData.isValid) { + this.displayInvalidZipAlert = true; + this.resetModalButtonStyle(); + } else { + // retrieve mobile fee part + const serviceZipCode = this.internalModel.addressQuestions.zipCode; + const mobileFeePart = await getPricedMobileFeePart(serviceZipCode); - // retrieve serviceability details - const serviceabilityDetails = await getServiceabilityDetails(serviceZipCode); + // retrieve serviceability details + const serviceabilityDetails = await getServiceabilityDetails(serviceZipCode); - // update content related to service zip code - this.$emit("updated-mobile-fee-part", mobileFeePart); - this.$emit("updated-serviceability", serviceabilityDetails.data); - this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); + // update content related to service zip code + this.$emit("updated-mobile-fee-part", mobileFeePart); + this.$emit("updated-serviceability", serviceabilityDetails.data); + this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); - // Update the page level model - this.$emit("update:modelValue", this.internalModel); + // Update the page level model + this.$emit("update:modelValue", this.internalModel); - if (this.onZipUpdateCallback) { - await this.onZipUpdateCallback(serviceZipCode); + if (this.onZipUpdateCallback) { + await this.onZipUpdateCallback(serviceZipCode); + } + + this.closeModal(); } - - this.closeModal(); } }, }, From c2b683114ffb860c1b5b1f1193f25df06db4745b Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 16 May 2023 09:26:03 -0400 Subject: [PATCH 02/14] WIP --- .../button-question/button-question.vue | 2 +- .../appointment-type-question.vue | 3 +- .../service-location/service-location.vue | 28 ++++++++--------- .../shop-question/shop-question.vue | 30 ++++++++++++------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/digital-components/button-question/button-question.vue b/src/digital-components/button-question/button-question.vue index 08ec4867d..245543937 100644 --- a/src/digital-components/button-question/button-question.vue +++ b/src/digital-components/button-question/button-question.vue @@ -121,7 +121,7 @@ export default { isOverflowScrollable: Boolean, isWide: Boolean, isCashOrInsurance: Boolean, - modelValue: [Array, Number, String, Object], + modelValue: [Array, Number, String], value: [Number, String], validationRules: String, suppressError: Boolean, diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue index d6711f363..82dd2980a 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue @@ -1,6 +1,6 @@