From d7fa90ee5805ceee137c402b09e30106ca55e09a Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 14 Feb 2023 10:50:27 -0500 Subject: [PATCH] Model reset stuff --- .../address-questions/address-questions.vue | 1 + .../mobile-location-modal-questions.vue | 20 ++++++++++++------- .../service-location/service-location.vue | 17 ++++++++++++++++ .../service-zip-modal-question.vue | 5 +++++ 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue index aed1b5147..cff2a8543 100644 --- a/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue +++ b/src/layouts/address-lookup/customer-questions/address-questions/address-questions.vue @@ -207,6 +207,7 @@ export default { }, methods: { setupAddressLookup() { + this.showAddressFields = false; if ( this.addressModel.streetAddress && this.addressModel.city && 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 09d18ecba..60f698ef4 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 @@ -146,18 +146,24 @@ export default { onModalClosed() { this.mobileLocationQuestionsInput = this.mobileLocationQuestionsModel; }, - resetModel() { + resetComponent() { // Address - this.addressModel.streetAddress = ""; - this.addressModel.apartmentNumberOrBusinessName = ""; - this.addressModel.city = ""; - this.addressModel.state = ""; - this.addressModel.zipCode = ""; + this.addressModelInput.streetAddress = ""; + this.addressModelInput.apartmentNumberOrBusinessName = ""; + this.addressModelInput.city = ""; + this.addressModelInput.state = ""; + this.addressModelInput.zipCode = ""; // Is Vehicle Protected - this.mobileLocationQuestionsInput.isVehicleProtected = null; + this.mobileLocationQuestionsInput.isVehicleProtected = null; + + this.$refs[this.modalName].form.resetForm(); + + this.$refs.addressQuestions.setupAddressLookup(); }, async setMobileLocation() { + // TODO: Any lookups or actions to be taken before assigning the Mobile Location + this.mobileLocationQuestionsModel = { addressQuestions: { streetAddress: this.addressModelInput.streetAddress, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 209a2f0fd..d8295edd5 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -6,11 +6,13 @@