From c9776cfa60abb02ef2914c66d5cd6ddb9cf02a76 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Fri, 26 May 2023 17:05:05 -0400 Subject: [PATCH] CSR-1419: fix issue so matching zips will still save and close --- .../mobile-location-modal-questions.vue | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 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 fa5c1eb62..78094e76b 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 @@ -202,6 +202,7 @@ export default { this.internalModel = deepClone(this.modelValue); }, onModalClosed() { + this.displayInvalidZipAlert = false; this.internalModel = deepClone(this.modelValue); this.resetValidation(); }, @@ -236,17 +237,6 @@ export default { }); }, async setMobileLocation() { - // START - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD - let tempTest = false; - let internalModelAddressQuestions = this.internalModel.addressQuestions; - let modelValueAddressQuestions = this.modelValue.addressQuestions; - if (tempTest) { - // THIS WILL NEVER BE TRUE - console.warn(internalModelAddressQuestions); - console.warn(modelValueAddressQuestions); - } - // END - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD - if ( this.internalModel.addressQuestions.zipCode !== this.modelValue.addressQuestions.zipCode @@ -272,22 +262,19 @@ export default { 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); - if (this.onZipUpdateCallback) { await this.onZipUpdateCallback(serviceZipCode); } + // Update the page level model + this.$emit("update:modelValue", this.internalModel); this.closeModal(); } } else { - // START - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD - if (tempTest) { - // THIS WILL NEVER BE TRUE - console.warn("the zips match and the exception was run"); - } - // END - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD + // Update the page level model + this.$emit("update:modelValue", this.internalModel); + + this.closeModal(); } }, },