This commit is contained in:
Katie Kroell 2024-10-18 16:03:05 -04:00
parent 82249afcce
commit 1e426da316

View file

@ -24,6 +24,8 @@
<script>
import modal from '@/digital-components/modal/modal.vue';
import states from '@/constants/states';
import { useMainStore } from '@/store';
import { processIfStatements } from '@/helpers/cms-content-helper';
export default {
name: 'content-group-modal',
@ -46,7 +48,8 @@ export default {
return this.getCmsContent(this.cmsWidgetName, 'SubheaderText');
},
ModalBodyText() {
return this.getCmsContent(this.cmsWidgetName, 'BodyText');
const bodyText = this.getCmsContent(this.cmsWidgetName, 'BodyText');
return processIfStatements(bodyText, 'custom', this.getCustomValueFromString);
},
ModalSubBodyText() {
const header = this.getCmsContent(this.cmsWidgetName, 'BodyText2');
@ -57,6 +60,10 @@ export default {
},
ModalCloseButtonText() {
return this.getCmsContent(this.cmsWidgetName, 'FooterText');
},
safeco() {
return true;
// return useMainStore().issConfig.clientName === 'Safeco Insurance';
}
},
methods: {
@ -69,6 +76,14 @@ export default {
openSteeringModal() {
this.$refs[this.ModalName].closeModal();
this.$emit('openSteering');
},
getCustomValueFromString(str) {
switch (str) {
case 'safeco':
return this.safeco;
default:
return null;
}
}
}
};