clean up logic

This commit is contained in:
US\katie.kroell 2026-04-23 14:25:44 -04:00
parent 3e91e0e7dc
commit b94c22b8b6
3 changed files with 6 additions and 12 deletions

View file

@ -149,7 +149,7 @@ import { getAvailableLineItems } from '@/helpers/cart-helper';
import coverageStatuses from '@/constants/coverage-statuses';
import coverageType from '@/constants/coverage-type';
import oemEndorsementModal from '@/layouts/coverage-statement/oem-endorsement-modal/oem-endorsement-modal.vue';
import { containsRecalParts } from '@/helpers/recal-helper';
import { isRecalOrder } from '@/helpers/recal-helper';
const RECAL_MODAL_REF_NAME = 'RecalModal';
const CANCEL_CLAIM_REF_NAME = 'CancelClaimModal';
@ -308,13 +308,7 @@ export default {
return this.mainStore.isUnverified;
},
isADAS() {
const { glassParts } = useMainStore().order.lineItems;
const orderContainsRecalPart = containsRecalParts(glassParts);
return (
glassParts !== null
&& !!glassParts.find((part) => part.requiresRecalibration)
&& orderContainsRecalPart
);
return isRecalOrder(this.mainStore.order.lineItems);
},
totalServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems);

View file

@ -133,7 +133,7 @@ import {
getMobileZipCodeData
} from '@/helpers/service-location-helper';
import { toTitleCase } from '@/helpers/text-helper.js';
import { containsRecalParts } from '@/helpers/recal-helper';
import { isRecalOrder } from '@/helpers/recal-helper';
// Import Component
import alert from '@/ux-components/alert/alert.vue';
@ -244,7 +244,7 @@ export default {
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
},
isRecalibrationOnOrder() {
return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
return isRecalOrder(this.mainStore.order.lineItems);
},
isServiceableInshop() {
if (this.isRecalibrationServiceableInshop !== null) {

View file

@ -23,7 +23,7 @@ import partTypeStrings from '@/constants/part-type-strings';
import { useMainStore } from '@/store';
import { getPriceOfLineItem } from '@/helpers/price-calculator';
import { shallowRef } from 'vue';
import { containsRecalParts } from '@/helpers/recal-helper';
import { isRecalOrder } from '@/helpers/recal-helper';
const glassLocations = damageLocationsSelected;
@ -101,7 +101,7 @@ export default {
return modifiedAnswers;
},
isRecalibrationOnOrder() {
return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
return isRecalOrder(this.mainStore.order.lineItems);
},
frontWipersApplicableForTierTwo() {
const frontWipersAreAvailable = this.lineItemsContainsPartType(partTypeStrings.FRONT_WIPER);