update constant name.

This commit is contained in:
Bill Richardson 2023-10-12 12:06:33 -04:00
parent 327b826bdf
commit e4a48944d7
8 changed files with 17 additions and 17 deletions

View file

@ -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';

View file

@ -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;

View file

@ -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);

View file

@ -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;
}
}
}

View file

@ -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.

View file

@ -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();
}
}

View file

@ -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) => {

View file

@ -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