From 7d75a1d9c6cebf57dc4115809085d8da66aae793 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 12 Jan 2023 11:20:43 -0500 Subject: [PATCH] CSR-1012 | service zip modal question new component service-zip-modal-question added to the service-location page --- src/digital-components/modal/modal.vue | 25 +++--- .../service-location/service-location.vue | 13 +--- .../service-zip-modal-question.vue | 76 +++++-------------- 3 files changed, 32 insertions(+), 82 deletions(-) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 013a42168..ee6b03498 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -35,7 +35,7 @@ ref="buttonMain" suppressLoader :buttonText="ModalCloseButtonText" - @click-event="footerButtonClick" /> + @click-event="buttonMainClick" /> @@ -49,15 +49,9 @@ export default { name: "modal", props: { cmsWidgetName: String, - onShownCallback: { + buttonClick: { type: Function, }, - - footerButtonCallback: { - type: Function, - // return true to close modal - // if undefined, footer button closes modal - }, }, computed: { ModalHeadline() { @@ -79,7 +73,12 @@ export default { return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, showModalBody() { - return this.ModalBodyText; + return ( + this.ModalImage || + this.ModalHeadline || + this.ModalSubheadertext || + this.ModalBodyText + ); }, }, methods: { @@ -89,11 +88,9 @@ export default { closeModal() { this.$refs.modalXButton.click(); }, - async footerButtonClick() { - if (this.footerButtonCallback) { - if (await this.footerButtonCallback()) { - this.closeModal(); - } + buttonMainClick() { + if (this.buttonClick) { + this.buttonClick(); } else { this.closeModal(); } diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 418a1ec2e..aa32c1921 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -4,12 +4,7 @@ fmg
- + // Components import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; -import funnelHeader from "@/fmg-components/funnel-header/funnel-header"; -import funnelFooter from "@/fmg-components/funnel-footer/funnel-footer"; -import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; +import funnelHeader from "@/common-components/funnel-header/funnel-header"; +import funnelFooter from "@/common-components/funnel-footer/funnel-footer"; +import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; //Supporting Files import { Form } from "vee-validate"; diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 78068a835..0397609aa 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -12,19 +12,14 @@ :text="this.serviceZipDisplayText" href="#!" data-bs-toggle="modal" - :data-bs-target="getModalId" + data-bs-target="#ZipModal" aria-label="Modal window" />
- +
@@ -54,15 +49,16 @@