update logic for recal copy
This commit is contained in:
parent
f9d0f29a1c
commit
e60d329a89
2 changed files with 17 additions and 4 deletions
|
|
@ -294,7 +294,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
glassList = getGlassList(glassPieces);
|
glassList = getGlassList(glassPieces);
|
||||||
workType = 'replacement';
|
workType = 'replacement';
|
||||||
if (this.hasRecalibrationPart) {
|
if (this.hasRecalibrationPart && containsRecalParts(this.submittedOrder.lineItems)) {
|
||||||
if (glassList === 'windshield') {
|
if (glassList === 'windshield') {
|
||||||
workType = 'replacement and recalibration';
|
workType = 'replacement and recalibration';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="appointment-type-question-text d-flex">
|
<div class="appointment-type-question-text d-flex">
|
||||||
<span
|
<span
|
||||||
v-if="recalibrationRequired"
|
v-if="recalibrationRequired"
|
||||||
class="recal-text">{{ scheduleRecalText }}</span>
|
class="recal-text mb-4">{{ scheduleRecalText }}</span>
|
||||||
<span
|
<span
|
||||||
v-if="!requiresInshopRecalibration">{{ appointmentQuestionText }}</span>
|
v-if="!requiresInshopRecalibration">{{ appointmentQuestionText }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -133,6 +133,7 @@ import {
|
||||||
getMobileZipCodeData
|
getMobileZipCodeData
|
||||||
} from '@/helpers/service-location-helper';
|
} from '@/helpers/service-location-helper';
|
||||||
import { toTitleCase } from '@/helpers/text-helper.js';
|
import { toTitleCase } from '@/helpers/text-helper.js';
|
||||||
|
import { containsRecalParts } from '@/helpers/recal-helper';
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import alert from '@/ux-components/alert/alert.vue';
|
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 widgetFields from '@/constants/cms-widget-fields';
|
||||||
import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
||||||
import { getPricedMobileFeePart } from '@/helpers/service-location-helper';
|
import { getPricedMobileFeePart } from '@/helpers/service-location-helper';
|
||||||
|
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||||
|
|
||||||
const RECAL_MODAL_REF_NAME = 'RecalModal';
|
const RECAL_MODAL_REF_NAME = 'RecalModal';
|
||||||
|
|
||||||
|
|
@ -241,6 +243,9 @@ export default {
|
||||||
return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
||||||
},
|
},
|
||||||
|
isRecalibrationOnOrder() {
|
||||||
|
return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
|
||||||
|
},
|
||||||
isServiceableInshop() {
|
isServiceableInshop() {
|
||||||
if (this.isRecalibrationServiceableInshop !== null) {
|
if (this.isRecalibrationServiceableInshop !== null) {
|
||||||
return (this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop);
|
return (this.isGlassServiceableInshop && this.isRecalibrationServiceableInshop);
|
||||||
|
|
@ -284,9 +289,11 @@ export default {
|
||||||
},
|
},
|
||||||
scheduleRecalText() {
|
scheduleRecalText() {
|
||||||
if (this.requiresInshopRecalibration) {
|
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: {
|
watch: {
|
||||||
|
|
@ -343,6 +350,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
processIfStatements,
|
||||||
async initializeComponent(initialData) {
|
async initializeComponent(initialData) {
|
||||||
this.initializingData = true;
|
this.initializingData = true;
|
||||||
await this.setData(initialData);
|
await this.setData(initialData);
|
||||||
|
|
@ -405,6 +413,11 @@ export default {
|
||||||
getSelectedProvider() {
|
getSelectedProvider() {
|
||||||
return useMainStore().order.serviceLocation.provider;
|
return useMainStore().order.serviceLocation.provider;
|
||||||
},
|
},
|
||||||
|
getCustomValueFromString(str) {
|
||||||
|
if (str === 'isRecalibrationOnOrder') {
|
||||||
|
return this.isRecalibrationOnOrder;
|
||||||
|
}
|
||||||
|
},
|
||||||
async handleInShopZipUpdated(newZip) {
|
async handleInShopZipUpdated(newZip) {
|
||||||
this.zipCode = newZip;
|
this.zipCode = newZip;
|
||||||
const zipCodeData = await getZipCodeData(this.zipCode);
|
const zipCodeData = await getZipCodeData(this.zipCode);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue