From 734f3d6643e548055359d4f93ec0f4873d7c30fa 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 | 28 +++- .../service-location/service-location.vue | 13 +- .../service-zip-modal-question.spec.js | 3 + .../service-zip-modal-question.vue | 157 ++++++++++++++++++ 4 files changed, 193 insertions(+), 8 deletions(-) create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js create mode 100644 src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 7de269644..f8c5e01e5 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -11,12 +11,13 @@ @@ -48,6 +49,9 @@ export default { name: "modal", props: { cmsWidgetName: String, + buttonClick: { + type: Function, + }, }, computed: { ModalHeadline() { @@ -68,11 +72,29 @@ export default { ModalCloseButtonText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, + showModalBody() { + return ( + this.ModalImage || + this.ModalHeadline || + this.ModalSubheadertext || + this.ModalBodyText + ); + }, }, methods: { resetButtonStyle() { this.$refs.buttonMain.resetButtonStyle(); }, + closeModal() { + this.$refs.modalXButton.click(); + }, + buttonMainClick() { + if (this.buttonClick) { + this.buttonClick(); + } else { + this.closeModal(); + } + }, }, components: { buttonMain, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e29ebdb5e..aa32c1921 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -4,6 +4,7 @@ fmg
+ // Components -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 { Form } from "vee-validate"; +import serviceZipModalQuestion from "@/layouts/service-location/service-zip-modal-question/service-zip-modal-question"; +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 +//Supporting Files +import { Form } from "vee-validate"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -57,6 +59,7 @@ export default { forwardButtonAction() {}, }, components: { + serviceZipModalQuestion, funnelHeader, funnelFooter, funnelSubHeader, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js new file mode 100644 index 000000000..a81727c73 --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.spec.js @@ -0,0 +1,3 @@ +describe("service-zip-modal-question.vue", () => { + test.todo("test this"); +}); 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 new file mode 100644 index 000000000..0397609aa --- /dev/null +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -0,0 +1,157 @@ + + + + +