diff --git a/src/constants/schedule-constants.js b/src/constants/schedule-constants.js index 35232c04..af0c6206 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_INSURANCE: 'Mobile-Insurance', + MOBILE_NOT_ITAC: 'Mobile-Not-ITAC', 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 379462ca..76db7eff 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -130,7 +130,8 @@ const getAvailableDates = async ( apiEndDate = apiEndDateLimit; } - if (appointmentType === AppointmentTypeStrings.MOBILE) { + if (appointmentType === AppointmentTypeStrings.MOBILE + || appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) { storeActionConfig = { storeAction: GET_MOBILE_TIME_SLOTS, payload: { @@ -311,7 +312,8 @@ export default { const serviceLocationPreReqs = serviceLocation.zipCode && serviceLocation.zipCodeCtu && serviceLocation.appointmentType - && (serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE + && ((serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE + || serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) || serviceLocation.provider.providerNumber); const paymentInfo = useMainStore().payment.isInsurance !== null; const supportingItems = useMainStore().lineItems.supportingItems !== null; @@ -319,6 +321,7 @@ export default { useMainStore().order.damage.isRepair || (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0); + return serviceLocationPreReqs && paymentInfo && supportingItems && damageInfo; }, setData(initialShopTimeSlotsResponse) { 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 c8eb4d56..dc7dadb2 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.isITAC; - const shouldShowMobileInsurance = this.isServiceableMobile && !this.isITAC; + const shouldShowMobileNotITAC = this.isServiceableMobile && !this.isITAC; 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_INSURANCE && shouldShowMobileInsurance) + || (answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC && shouldShowMobileNotITAC) || (answer.Name === AppointmentTypeStrings.DROP_OFF && shouldShowDropoff) )) : []; @@ -86,12 +86,12 @@ export default { if ( newValue.length === 1 && newValue.findIndex((answer) => (answer.Name === AppointmentTypeStrings.MOBILE - || answer.Name === AppointmentTypeStrings.MOBILE_INSURANCE)) !== -1 + || answer.Name === AppointmentTypeStrings.MOBILE_NOT_ITAC)) !== -1 ) { if (this.isITAC) { this.selectedValues = AppointmentTypeStrings.MOBILE; } else { - this.selectedValues = AppointmentTypeStrings.MOBILE_INSURANCE; + this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC; } } }, @@ -103,7 +103,7 @@ export default { if (this.isITAC) { this.selectedValues = AppointmentTypeStrings.MOBILE; } else { - this.selectedValues = AppointmentTypeStrings.MOBILE_INSURANCE; + this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC; } } } diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index d0b8af66..62484df8 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_INSURANCE)) { + || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC)) { this.selectedAppointmentType = null; } this.selectedProvider = null; @@ -293,7 +293,7 @@ export default { }, isMobileLocationDisplayed() { return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE - || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_INSURANCE; + || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC; }, 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 220f4ad4..59ded30c 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_INSURANCE) { + if (newValue !== AppointmentTypeStrings.MOBILE && newValue !== AppointmentTypeStrings.MOBILE_NOT_ITAC) { this.getNextShopsFromList(); } } diff --git a/src/store/index.js b/src/store/index.js index f498548b..6c40ab5b 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_INSURANCE, + || state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC, isDropOffAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF, isClaimRegistrationRequired: (state) => state.issConfig.isClaimRegistrationRequired, eventBusItem: (state) => (eventCategory, eventSubCategory) => { @@ -641,7 +641,7 @@ export const useMainStore = defineStore({ startDate, endDate, applicationName: applicationConfig.APPLICATION_NAME, - parentAccountNumber: this.payment.parentAccountNumber, + parentAccountNumber: this.issConfig.parentAccountNumber, // this.payment.parentAccountNumber, carId: vehicle.carId, lineItems, glassPieces, @@ -703,7 +703,7 @@ export const useMainStore = defineStore({ endDate, shopAppointmentType, applicationName: applicationConfig.APPLICATION_NAME, - parentAccountNumber: 167132, // this.payment.parentAccountNumber, + parentAccountNumber: this.issConfig.parentAccountNumber, // this.payment.parentAccountNumber, carId: vehicle.carId, lineItems, glassPieces, diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 7c4fc37c..9e30df93 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -1033,7 +1033,7 @@ describe('Store', () => { // Act store.updateServiceLocation({ - appointmentType: AppointmentTypeStrings.MOBILE_INSURANCE + appointmentType: AppointmentTypeStrings.MOBILE_NOT_ITAC }); // Assert