diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 0034b5155..a18881796 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -78,8 +78,9 @@ export default { const validationResult = await this.form.validate(); if (validationResult.valid) { this.$emit("footer-button-event"); + } else { + this.resetButtonStyle(); } - this.resetButtonStyle(); }, resetButtonStyle() { this.$refs.buttonMain.resetButtonStyle(); 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 0aa64594d..8383ba18d 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 @@ -94,13 +94,13 @@ export default { }, mobileLocationLinkText() { if ( - this.addressModel.streetAddress !== null && + this.addressModel.streetAddress && this.addressModel.streetAddress !== "" && - this.addressModel.city !== null && + this.addressModel.city && this.addressModel.city !== "" && - this.addressModel.state !== null && + this.addressModel.state && this.addressModel.state !== "" && - this.addressModel.zipCode !== null && + this.addressModel.zipCode && this.addressModel.zipCode !== "" ) { return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`; diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 777cbde74..e321df8af 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -6,7 +6,6 @@ diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js index a98b4f89d..d8ccde1d9 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -12,6 +12,7 @@ jest.mock("@/digital-components/textbox-question/textbox-question", () => ({ jest.mock("@/digital-components/modal/modal", () => ({ methods: { closeModal: jest.fn(), + resetButtonStyle: jest.fn(), }, })); diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index f19456171..6f73c8006 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -116,6 +116,10 @@ export default { this.$refs[this.modalName].closeModal(); }, + resetModalButtonStyle() { + this.$refs[this.modalName].resetButtonStyle(); + }, + onInputIdAssigned(inputId) { this.serviceZipCodeTextInputId = inputId; }, @@ -134,6 +138,7 @@ export default { this.resetAlerts(); const zipCodeData = await this.getZipCodeData(this.internalModel.zipCode); + this.resetModalButtonStyle(); if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true;