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 2a9ebaa00..d119cf7e8 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 @@ -54,7 +54,7 @@ export default { emits: ["update:modelValue"], // The component emits an event data() { return { - mobileLocationQuestionsInput: { + mobileLocationQuestionsInput: { addressQuestions: { streetAddress: "", apartmentNumberOrBusinessName: "", @@ -64,9 +64,9 @@ export default { }, isVehicleProtected: null, isZipServiceableMobile: null, - isZipServiceableInShop: null - } - } + isZipServiceableInShop: null, + }, + }; }, setup() { const modalForm = useForm(); @@ -136,15 +136,7 @@ export default { }, addressModel: { get: function () { - return this.mobileLocationQuestionsModel.addressQuestions; - }, - }, - _isVehicleProtected: { - get: function () { - return this.modelValue.isVehicleProtected; - }, - set: function (newValue) { - this.$emit("update:modelValue.isVehicleProtected", newValue); + return this.mobileLocationQuestionsInput.addressQuestions; }, }, }, @@ -167,10 +159,9 @@ export default { this.addressModel.zipCode = ""; // Is Vehicle Protected - this.mobileLocationQuestionsModel.isVehicleProtected = null; + this.mobileLocationQuestionsInput.isVehicleProtected = null; }, async setMobileLocation() { - this.mobileLocationQuestionsModel = { addressQuestions: { streetAddress: this.addressModel.streetAddress, @@ -179,11 +170,10 @@ export default { state: this.addressModel.state, zipCode: this.addressModel.zipCode, }, - isVehicleProtected: this.mobileLocationQuestionsModel.isVehicleProtected, - isZipServiceableMobile: this.mobileLocationQuestionsModel.isZipServiceableMobile, - isZipServiceableInShop: this.mobileLocationQuestionsModel.isZipServiceableInShop, - - } + isVehicleProtected: this.mobileLocationQuestionsInput.isVehicleProtected, + isZipServiceableMobile: this.mobileLocationQuestionsInput.isZipServiceableMobile, + isZipServiceableInShop: this.mobileLocationQuestionsInput.isZipServiceableInShop, + }; this.closeModal(); }, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index a1023f9e9..8ac0cfc34 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -97,7 +97,10 @@ export default { state: this.state, zipCode: this.zipCode, }, - }; + isVehicleProtected: this.isVehicleProtected, + isZipServiceableMobile: this.isZipServiceableMobile, + isZipServiceableInShop: this.isZipServiceableInShop, + } }, set: function (newValue) { this.streetAddress = newValue.streetAddress; @@ -105,6 +108,9 @@ export default { this.city = newValue.city; this.state = newValue.state; this.zipCode = newValue.zipCode; + this.isVehicleProtected = newValue.isVehicleProtected; + this.isZipServiceableMobile = newValue.isZipServiceableMobile; + this.isZipServiceableInShop = newValue.isZipServiceableInShop; }, }, }, @@ -112,9 +118,6 @@ export default { arePagePrerequisitesValid() { return true; }, - resetMobileLocationTest() { - this.serviceZipQuestion.serviceZipCode = "43054"; - }, backButtonAction() {}, forwardButtonAction() {}, },