INSR-9816: Update customer review component to be more reactive

This commit is contained in:
Alex Humphries 2026-05-29 14:56:54 -04:00
parent d7d58e71e5
commit 3188397a6b

View file

@ -7,6 +7,7 @@
<script>
import reviewBlock from '@/layouts/payment-method/review-dropdown/review-block/review-block.vue';
import { getStringWithCustomValues, processIfStatements } from '@/helpers/cms-content-helper';
export default {
name: 'customer-review',
@ -21,13 +22,26 @@ export default {
},
computed: {
displayContent() {
return [this.getCmsContent(this.cmsWidgetName, 'BodyText')];
const contentFromCms = this.getCmsContent(this.cmsWidgetName, 'BodyText');
const processedIfStatementsContent = processIfStatements(
contentFromCms,
'custom',
(str) => this.customValueMap[str]
);
return [getStringWithCustomValues(processedIfStatementsContent, this.customValueMap)];
},
header() {
return this.getCmsContent(this.cmsWidgetName, 'HeaderText');
},
editLinkText() {
return this.getCmsContent(this.cmsWidgetName, 'FooterText');
},
customValueMap() {
return {
homePhone: this.mainStore.contactInfo.homePhone,
extension: this.mainStore.contactInfo.extension ?? '',
emailAddress: this.mainStore.contactInfo.emailAddress
}
}
}
};