From e4c2d1bf51036dd4df062c5e4a9f7e8f22df7a79 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 8 Apr 2022 10:07:59 -0400 Subject: [PATCH] Adding props to pass alert data to child components and updating dropdown question to new format for retrieving CMS data --- .../dropdown-question/dropdown-question.vue | 16 +++++----------- src/layouts/address-lookup/address-lookup.vue | 10 +++++++++- .../address-questions/address-questions.vue | 15 ++++++++------- .../customer-questions/customer-questions.vue | 5 +++-- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/common-components/dropdown-question/dropdown-question.vue b/src/common-components/dropdown-question/dropdown-question.vue index bc03039ef..1f303a995 100644 --- a/src/common-components/dropdown-question/dropdown-question.vue +++ b/src/common-components/dropdown-question/dropdown-question.vue @@ -37,6 +37,7 @@ export default { isRequired: Boolean, disableAutoFill: Boolean, validationRules: String, + cmsWidgetName: String, }, setup(props) { const fieldOptions = { @@ -57,18 +58,11 @@ export default { handleChange, meta, }; - }, - data() { - return { - questionText: "", - } - }, - methods: { - initializeComponent(cmsContent) { - this.questionText = cmsContent; - } - }, + }, computed: { + questionText(){ + return this.getCmsContent(this.cmsWidgetName, 'QuestionText'); + }, selectedOption: { get: function() { return this.modelValue; diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 7fcd93bc8..f3a3e1ac8 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -9,7 +9,7 @@ - + { vm.setCmsContent(resultMap.cmsContent); + vm.alertVerificationWidget = { + headline: resultMap.cmsContent.AlertVerificationWarningWidget.HeadlineText, + copy: resultMap.cmsContent.AlertVerificationWarningWidget.BodyText, + }; + vm.alertNoMatchWarningWidget = { + headline: resultMap.cmsContent.AlertNoMatchWarningWidget.HeadlineText, + copy: resultMap.cmsContent.AlertNoMatchWarningWidget.BodyText, + } // vm.$refs.funnelHeader.initializeComponent( // resultMap.cmsContent.FunnelHeaderWidget // ); 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 881136613..a3ffa0974 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 @@ -21,16 +21,16 @@ - - @@ -68,7 +68,8 @@ export default ({ zip: "", }), }, - validationRules: String, + validationRules: String, + alertNotifications: {}, }, data() { return { diff --git a/src/layouts/address-lookup/customer-questions/customer-questions.vue b/src/layouts/address-lookup/customer-questions/customer-questions.vue index 008784f6d..cbbebe091 100644 --- a/src/layouts/address-lookup/customer-questions/customer-questions.vue +++ b/src/layouts/address-lookup/customer-questions/customer-questions.vue @@ -1,5 +1,5 @@