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 coverageStatuses from '@/constants/coverage-statuses';
|
||||||
import coverageType from '@/constants/coverage-type';
|
import coverageType from '@/constants/coverage-type';
|
||||||
import oemEndorsementModal from '@/layouts/coverage-statement/oem-endorsement-modal/oem-endorsement-modal.vue';
|
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 RECAL_MODAL_REF_NAME = 'RecalModal';
|
||||||
const CANCEL_CLAIM_REF_NAME = 'CancelClaimModal';
|
const CANCEL_CLAIM_REF_NAME = 'CancelClaimModal';
|
||||||
|
|
@ -308,13 +308,7 @@ export default {
|
||||||
return this.mainStore.isUnverified;
|
return this.mainStore.isUnverified;
|
||||||
},
|
},
|
||||||
isADAS() {
|
isADAS() {
|
||||||
const { glassParts } = useMainStore().order.lineItems;
|
return isRecalOrder(this.mainStore.order.lineItems);
|
||||||
const orderContainsRecalPart = containsRecalParts(glassParts);
|
|
||||||
return (
|
|
||||||
glassParts !== null
|
|
||||||
&& !!glassParts.find((part) => part.requiresRecalibration)
|
|
||||||
&& orderContainsRecalPart
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
totalServicePrice() {
|
totalServicePrice() {
|
||||||
return getPriceOfLineItems(this.baseServiceLineItems);
|
return getPriceOfLineItems(this.baseServiceLineItems);
|
||||||
|
|
|
||||||
|
|
@ -133,7 +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 { isRecalOrder } from '@/helpers/recal-helper';
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import alert from '@/ux-components/alert/alert.vue';
|
import alert from '@/ux-components/alert/alert.vue';
|
||||||
|
|
@ -244,7 +244,7 @@ export default {
|
||||||
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
||||||
},
|
},
|
||||||
isRecalibrationOnOrder() {
|
isRecalibrationOnOrder() {
|
||||||
return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
|
return isRecalOrder(this.mainStore.order.lineItems);
|
||||||
},
|
},
|
||||||
isServiceableInshop() {
|
isServiceableInshop() {
|
||||||
if (this.isRecalibrationServiceableInshop !== null) {
|
if (this.isRecalibrationServiceableInshop !== null) {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import partTypeStrings from '@/constants/part-type-strings';
|
||||||
import { useMainStore } from '@/store';
|
import { useMainStore } from '@/store';
|
||||||
import { getPriceOfLineItem } from '@/helpers/price-calculator';
|
import { getPriceOfLineItem } from '@/helpers/price-calculator';
|
||||||
import { shallowRef } from 'vue';
|
import { shallowRef } from 'vue';
|
||||||
import { containsRecalParts } from '@/helpers/recal-helper';
|
import { isRecalOrder } from '@/helpers/recal-helper';
|
||||||
|
|
||||||
const glassLocations = damageLocationsSelected;
|
const glassLocations = damageLocationsSelected;
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
return modifiedAnswers;
|
return modifiedAnswers;
|
||||||
},
|
},
|
||||||
isRecalibrationOnOrder() {
|
isRecalibrationOnOrder() {
|
||||||
return this.mainStore.hasRecalibrationPart && containsRecalParts(this.mainStore.order.lineItems);
|
return isRecalOrder(this.mainStore.order.lineItems);
|
||||||
},
|
},
|
||||||
frontWipersApplicableForTierTwo() {
|
frontWipersApplicableForTierTwo() {
|
||||||
const frontWipersAreAvailable = this.lineItemsContainsPartType(partTypeStrings.FRONT_WIPER);
|
const frontWipersAreAvailable = this.lineItemsContainsPartType(partTypeStrings.FRONT_WIPER);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue