clean up logic
This commit is contained in:
parent
3e91e0e7dc
commit
b94c22b8b6
3 changed files with 6 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue