updates/remove unneeded code

This commit is contained in:
Katie Kroell 2026-02-26 14:47:14 -05:00
parent 258b5ae20b
commit 2f8650174d
2 changed files with 7 additions and 16 deletions

View file

@ -26,7 +26,7 @@ export default {
},
computed: {
modalBodyText() {
return this.getCmsContent('RecalModal', 'BodyText');
return this.getCmsContent('RecalModal', 'BodyText').replaceAll('{custom:vehicleMake}', this.vehicleMake);
},
modalHeaderText() {
return this.getCmsContent('RecalModal', 'HeaderText');

View file

@ -58,11 +58,11 @@
// Import Supporting Files
import {
fetchCmsContentForPage,
processIfStatements,
setupModalLinks
} from '@/helpers/cms-content-helper';
import settleAllPromises from '@/helpers/layout-helper';
import errorMessages from '@/constants/error-messages';
import buttonQuestion from '@/digital-components/button-question/button-question.vue';
import showIssLoadingModal from '@/helpers/loading-modal-helper';
import bailoutMessage from '@/constants/bailoutMessage';
import baseFormMixin from '@/mixins/base-form-mixin';
@ -133,26 +133,14 @@ export default {
return this.getCmsContent('ScheduleWithSafeliteText', 'BodyText');
},
scheduleWithOtherText() {
return this.getCmsContent('ScheduleWithOtherText', 'BodyText');
const text = this.getCmsContent('ScheduleWithOtherText', 'BodyText');
return processIfStatements(text, 'custom', this.getStateSpecificText);
}
},
mounted() {
setupModalLinks(this);
},
methods: {
getHeaderTextFromCms(cmsWidgetName) {
const headerText = this.getCmsContent(cmsWidgetName, 'HeaderText');
return headerText?.replace(
'{custom:SafeliteLogo}',
"<span class='safeliteLogo'></span>"
);
},
getSubheaderTextFromCms(cmsWidgetName) {
return this.getCmsContent(cmsWidgetName, 'SubheaderText');
},
getBodyTextFromCms(cmsWidgetName) {
return this.getCmsContent(cmsWidgetName, 'BodyText');
},
arePagePrerequisiteValid() {
return true;
},
@ -191,6 +179,9 @@ export default {
},
openStateSteeringModal() {
this.$refs[STEERING_MODAL_REF_NAME].openModal();
},
getStateSpecificText(value) {
return this.mainStore.order.customer.address.state?.toLowerCase() === value?.toLowerCase();
}
}
};