diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue
index 3f34efd4..4cb7668c 100644
--- a/src/layouts/order-confirmation/order-confirmation.vue
+++ b/src/layouts/order-confirmation/order-confirmation.vue
@@ -294,7 +294,7 @@ export default {
} else {
glassList = getGlassList(glassPieces);
workType = 'replacement';
- if (this.hasRecalibrationPart) {
+ if (this.hasRecalibrationPart && containsRecalParts(this.submittedOrder.lineItems)) {
if (glassList === 'windshield') {
workType = 'replacement and recalibration';
}
diff --git a/src/layouts/schedule-page/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue
index 5dc908be..576d1a80 100644
--- a/src/layouts/schedule-page/service-location/service-location.vue
+++ b/src/layouts/schedule-page/service-location/service-location.vue
@@ -9,7 +9,7 @@
{{ scheduleRecalText }}
+ class="recal-text mb-4">{{ scheduleRecalText }}
{{ appointmentQuestionText }}
@@ -133,6 +133,7 @@ import {
getMobileZipCodeData
} from '@/helpers/service-location-helper';
import { toTitleCase } from '@/helpers/text-helper.js';
+import { containsRecalParts } from '@/helpers/recal-helper';
// Import Component
import alert from '@/ux-components/alert/alert.vue';
@@ -144,6 +145,7 @@ import serviceZipQuestion from '@/layouts/schedule-page/service-location/service
import widgetFields from '@/constants/cms-widget-fields';
import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
import { getPricedMobileFeePart } from '@/helpers/service-location-helper';
+import { processIfStatements } from '@/helpers/cms-content-helper';
const RECAL_MODAL_REF_NAME = 'RecalModal';
@@ -241,6 +243,9 @@ export default {
return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
},
+ isRecalibrationOnOrder() {
+ return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
+ },
isServiceableInshop() {
if (this.isRecalibrationServiceableInshop !== null) {
return (this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop);
@@ -284,9 +289,11 @@ export default {
},
scheduleRecalText() {
if (this.requiresInshopRecalibration) {
- return this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2);
+ const bodyText2 = this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2);
+ return this.processIfStatements(bodyText2, 'custom', this.getCustomValueFromString);
}
- return this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
+ const bodyText = this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
+ return this.processIfStatements(bodyText, 'custom', this.getCustomValueFromString);
}
},
watch: {
@@ -343,6 +350,7 @@ export default {
}
},
methods: {
+ processIfStatements,
async initializeComponent(initialData) {
this.initializingData = true;
await this.setData(initialData);
@@ -405,6 +413,14 @@ export default {
getSelectedProvider() {
return useMainStore().order.serviceLocation.provider;
},
+ getCustomValueFromString(str) {
+ switch (str) {
+ case 'isRecalibrationOnOrder':
+ return this.isRecalibrationOnOrder;
+ default:
+ return null;
+ }
+ },
async handleInShopZipUpdated(newZip) {
this.zipCode = newZip;
const zipCodeData = await getZipCodeData(this.zipCode);