Merge pull request #442 from Safelite/feature/richardson/SSR-643

updates to get mobile modal working
This commit is contained in:
brich1212safe 2023-09-18 16:25:14 -04:00 committed by GitHub
commit 69c3706b6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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);
}
}
};

View file

@ -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;