From 367a3d7d2f66a61d23f06422ca39b9e591536d9e Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 15 Sep 2023 16:47:57 -0400 Subject: [PATCH] updates to get mobile modal working --- src/digital-components/modal/modal.vue | 4 +++- .../mobile-location-modal-questions.vue | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 4787a6c0..bd7d5796 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -64,7 +64,7 @@ export default { }, isButtonDisabled: Boolean }, - emits: ['footer-button-event'], + emits: ['footer-button-event', 'isModalOpened'], setup(props) { const modalId = props.modalId ? props.modalId : `modal-${crypto.randomUUID()}`; @@ -108,10 +108,12 @@ export default { openModal() { const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId)); modal?.show(); + this.$emit('isModalOpened', true); }, closeModal() { const modal = Modal.getInstance(document.getElementById(this.modalId)); modal?.hide(); + this.$emit('isModalOpened', false); } } }; 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 ddd6998b..1c87c331 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 @@ -83,7 +83,8 @@ import vehicleProtectedQuestion from '@/layouts/service-location/mobile-location // Helpers import { getPricedMobileFeePart, - getServiceabilityDetails + getServiceabilityDetails, + getZipCodeData } from '@/helpers/service-location-helper'; import { deepClone } from '@/helpers/object-helper.js'; @@ -254,7 +255,7 @@ export default { !== this.modelValue.addressQuestions.zipCode ) { // Validate the Zip Code - const zipCodeData = await this.getZipCodeData(this.internalModel.addressQuestions.zipCode); + const zipCodeData = await getZipCodeData(this.internalModel.addressQuestions.zipCode); if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true;