From e4a48944d7dc35539f1e51723d518608273b9d76 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 12 Oct 2023 12:06:33 -0400 Subject: [PATCH] update constant name. --- src/constants/schedule-constants.js | 2 +- src/layouts/schedule-page/schedule-page.vue | 4 ++-- .../time-slot-modal-question.vue | 6 +++--- .../appointment-type-question.vue | 10 +++++----- src/layouts/service-location/service-location.vue | 4 ++-- .../service-location/shop-question/shop-question.vue | 2 +- src/store/index.js | 2 +- src/store/store.spec.js | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/constants/schedule-constants.js b/src/constants/schedule-constants.js index af0c6206..7737bbb5 100644 --- a/src/constants/schedule-constants.js +++ b/src/constants/schedule-constants.js @@ -1,7 +1,7 @@ const AppointmentTypeStrings = { IN_SHOP: 'Inshop', MOBILE: 'Mobile', - MOBILE_NOT_ITAC: 'Mobile-Not-ITAC', + MOBILE_NOT_ITAC_AND_NOT_NOCOMP: 'Mobile-Not-ITAC-And-Not-NoComp', DROP_OFF: 'Dropoff' }; const PREMIUM_FEE_PART_TYPE = 'EARLY BIRD'; diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index 673f32a0..e2293039 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -131,7 +131,7 @@ const getAvailableDates = async ( } if (appointmentType === AppointmentTypeStrings.MOBILE - || appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) { + || appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { storeActionConfig = { storeAction: GET_MOBILE_TIME_SLOTS, payload: { @@ -326,7 +326,7 @@ export default { && serviceLocation.zipCodeCtu && serviceLocation.appointmentType && ((serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE - || serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) + || serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) || serviceLocation.provider.providerNumber); const paymentInfo = useMainStore().payment.isInsurance !== null; const supportingItems = useMainStore().lineItems.supportingItems !== null; diff --git a/src/layouts/schedule-page/time-slot-modal-question/time-slot-modal-question.vue b/src/layouts/schedule-page/time-slot-modal-question/time-slot-modal-question.vue index d671bb1b..d482f9f4 100644 --- a/src/layouts/schedule-page/time-slot-modal-question/time-slot-modal-question.vue +++ b/src/layouts/schedule-page/time-slot-modal-question/time-slot-modal-question.vue @@ -166,7 +166,7 @@ export default { } if (this.appointmentType === AppointmentTypeStrings.MOBILE - || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) { + || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes(PREMIUM_TIME_SLOT_ID_FLAG) ? this.mobilePremiumCmsWidgetName : this.mobileCmsWidgetName; @@ -275,7 +275,7 @@ export default { }, durationTextBlockCopy() { if (this.appointmentType === AppointmentTypeStrings.MOBILE - || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) { + || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { return null; } if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) { return this.inshopDurationText; @@ -321,7 +321,7 @@ export default { if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) { return this.getAvailableTimeSlotsForDropOff(this.timeSlotsForSelectedDate.timeSlots); } if (this.appointmentType === AppointmentTypeStrings.MOBILE - || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) { + || this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { return this.getAvailableTimeSlotsForMobile(this.timeSlotsForSelectedDate.timeSlots); } return this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots); diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue index 56f02e2a..cf1a9cfe 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue @@ -52,14 +52,14 @@ export default { }, answersToDisplay() { const shouldShowMobile = this.isServiceableMobile && this.isItacOrNoComp; - const shouldShowMobileNotITAC = this.isServiceableMobile && !this.isItacOrNoComp; + const shouldShowMobileNotITACNotNoComp = this.isServiceableMobile && !this.isItacOrNoComp; const shouldShowInshop = this.isServiceableInshop; const shouldShowDropoff = this.isServiceableInshop && !useMainStore().damage.isRepair; return this.answersFromCms ? this.answersFromCms.filter((answer) => ( (answer.Name === AppointmentTypeStrings.IN_SHOP && shouldShowInshop) || (answer.Name === AppointmentTypeStrings.MOBILE && shouldShowMobile) - || (answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC && shouldShowMobileNotITAC) + || (answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP && shouldShowMobileNotITACNotNoComp) || (answer.Name === AppointmentTypeStrings.DROP_OFF && shouldShowDropoff) )) : []; @@ -89,12 +89,12 @@ export default { if ( newValue.length === 1 && newValue.findIndex((answer) => (answer.Name === AppointmentTypeStrings.MOBILE - || answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC)) !== -1 + || answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)) !== -1 ) { if (this.isITAC) { this.selectedValues = AppointmentTypeStrings.MOBILE; } else { - this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC; + this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; } } }, @@ -106,7 +106,7 @@ export default { if (this.isITAC) { this.selectedValues = AppointmentTypeStrings.MOBILE; } else { - this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC; + this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; } } } diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 62484df8..df1d6b75 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -262,7 +262,7 @@ export default { if (newValue.zipCode !== this.zipCode) { if (!(this.selectedAppointmentType === AppointmentTypeStrings.MOBILE - || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC)) { + || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)) { this.selectedAppointmentType = null; } this.selectedProvider = null; @@ -293,7 +293,7 @@ export default { }, isMobileLocationDisplayed() { return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE - || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC; + || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; }, requiresInshopRecalibration() { // Specifically check for isRecalibrationServiceableMobile === false, not null or true. diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 59ded30c..77f6d6b0 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -142,7 +142,7 @@ export default { await nextTick(); - if (newValue !== AppointmentTypeStrings.MOBILE && newValue !== AppointmentTypeStrings.MOBILE_NOT_ITAC) { + if (newValue !== AppointmentTypeStrings.MOBILE && newValue !== AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { this.getNextShopsFromList(); } } diff --git a/src/store/index.js b/src/store/index.js index b9d40f81..88197e9e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -195,7 +195,7 @@ export const useMainStore = defineStore({ policy: (state) => state.order.policy, hasAnyNonWindshieldGlassParts: (state) => !state.order.policy.isDamageGlassOnly, isMobileAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE - || state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC, + || state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP, isDropOffAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF, isClaimRegistrationRequired: (state) => state.issConfig.isClaimRegistrationRequired, eventBusItem: (state) => (eventCategory, eventSubCategory) => { diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 9e30df93..fd728d27 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -1028,12 +1028,12 @@ describe('Store', () => { expect(store.isMobileAppointment).toBe(true); }); - it('Should return true for mobile-insurance appointments', () => { + it('Should return true for mobile-NotITAC-and-NotNoComp appointments', () => { // Arrange // Act store.updateServiceLocation({ - appointmentType: AppointmentTypeStrings.MOBILE_NOT_ITAC + appointmentType: AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP }); // Assert