updates to get mobile modal working
This commit is contained in:
parent
eeed38d588
commit
367a3d7d2f
2 changed files with 6 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ export default {
|
||||||
},
|
},
|
||||||
isButtonDisabled: Boolean
|
isButtonDisabled: Boolean
|
||||||
},
|
},
|
||||||
emits: ['footer-button-event'],
|
emits: ['footer-button-event', 'isModalOpened'],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const modalId = props.modalId ? props.modalId : `modal-${crypto.randomUUID()}`;
|
const modalId = props.modalId ? props.modalId : `modal-${crypto.randomUUID()}`;
|
||||||
|
|
||||||
|
|
@ -108,10 +108,12 @@ export default {
|
||||||
openModal() {
|
openModal() {
|
||||||
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
||||||
modal?.show();
|
modal?.show();
|
||||||
|
this.$emit('isModalOpened', true);
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
const modal = Modal.getInstance(document.getElementById(this.modalId));
|
const modal = Modal.getInstance(document.getElementById(this.modalId));
|
||||||
modal?.hide();
|
modal?.hide();
|
||||||
|
this.$emit('isModalOpened', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,8 @@ import vehicleProtectedQuestion from '@/layouts/service-location/mobile-location
|
||||||
// Helpers
|
// Helpers
|
||||||
import {
|
import {
|
||||||
getPricedMobileFeePart,
|
getPricedMobileFeePart,
|
||||||
getServiceabilityDetails
|
getServiceabilityDetails,
|
||||||
|
getZipCodeData
|
||||||
} from '@/helpers/service-location-helper';
|
} from '@/helpers/service-location-helper';
|
||||||
import { deepClone } from '@/helpers/object-helper.js';
|
import { deepClone } from '@/helpers/object-helper.js';
|
||||||
|
|
||||||
|
|
@ -254,7 +255,7 @@ export default {
|
||||||
!== this.modelValue.addressQuestions.zipCode
|
!== this.modelValue.addressQuestions.zipCode
|
||||||
) {
|
) {
|
||||||
// Validate the Zip Code
|
// Validate the Zip Code
|
||||||
const zipCodeData = await this.getZipCodeData(this.internalModel.addressQuestions.zipCode);
|
const zipCodeData = await getZipCodeData(this.internalModel.addressQuestions.zipCode);
|
||||||
|
|
||||||
if (!zipCodeData.isValid) {
|
if (!zipCodeData.isValid) {
|
||||||
this.displayInvalidZipAlert = true;
|
this.displayInvalidZipAlert = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue