From 27276fa94506094b0467169d2a03131fb7133a60 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 24 Apr 2025 13:06:02 -0400 Subject: [PATCH] CASH-376 open mobile address modal when mobile address is incomplete --- .../mobile-location-modal-questions.vue | 25 +++++++++++-------- .../service-location/service-location.vue | 6 ++++- 2 files changed, 19 insertions(+), 12 deletions(-) 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 0d7a82248..96977dd2b 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 @@ -169,17 +169,7 @@ export default { return this.getCmsContent(this.linkWidgetName, "HeaderText"); }, mobileLocationLinkText() { - if ( - this.addressModel.streetAddress && - this.addressModel.streetAddress !== "" && - this.addressModel.city && - this.addressModel.city !== "" && - this.addressModel.state && - this.addressModel.state !== "" && - this.addressModel.zipCode && - this.addressModel.zipCode !== "" && - this.internalModel.isVehicleProtected !== null - ) { + if (this.isMobileAddressComplete()) { return `${this.addressModel.streetAddress}\n${this.addressModel.city}, ${this.addressModel.state} ${this.addressModel.zipCode}`; } return this.getCmsContent(this.linkWidgetName, "BodyText"); @@ -218,6 +208,19 @@ export default { }, }, methods: { + isMobileAddressComplete() { + return ( + this.addressModel.streetAddress && + this.addressModel.streetAddress !== "" && + this.addressModel.city && + this.addressModel.city !== "" && + this.addressModel.state && + this.addressModel.state !== "" && + this.addressModel.zipCode && + this.addressModel.zipCode !== "" && + this.internalModel.isVehicleProtected !== null + ); + }, openModal() { this.modal.openModal(); }, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index a85a5bd17..02066d97e 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -88,7 +88,7 @@