Merge pull request #1197 from Safelite/feature/kroell/INSR-9266

INSR-9266: fix recal copy showing for orders that do not have recal
This commit is contained in:
katiekroell 2026-04-22 16:17:54 -04:00 committed by GitHub
commit 03d18ba6a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 4 deletions

View file

@ -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';
}

View file

@ -9,7 +9,7 @@
<div class="appointment-type-question-text d-flex">
<span
v-if="recalibrationRequired"
class="recal-text">{{ scheduleRecalText }}</span>
class="recal-text mb-4">{{ scheduleRecalText }}</span>
<span
v-if="!requiresInshopRecalibration">{{ appointmentQuestionText }}</span>
</div>
@ -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);