update constant name.
This commit is contained in:
parent
327b826bdf
commit
e4a48944d7
8 changed files with 17 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
const AppointmentTypeStrings = {
|
const AppointmentTypeStrings = {
|
||||||
IN_SHOP: 'Inshop',
|
IN_SHOP: 'Inshop',
|
||||||
MOBILE: 'Mobile',
|
MOBILE: 'Mobile',
|
||||||
MOBILE_NOT_ITAC: 'Mobile-Not-ITAC',
|
MOBILE_NOT_ITAC_AND_NOT_NOCOMP: 'Mobile-Not-ITAC-And-Not-NoComp',
|
||||||
DROP_OFF: 'Dropoff'
|
DROP_OFF: 'Dropoff'
|
||||||
};
|
};
|
||||||
const PREMIUM_FEE_PART_TYPE = 'EARLY BIRD';
|
const PREMIUM_FEE_PART_TYPE = 'EARLY BIRD';
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ const getAvailableDates = async (
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appointmentType === AppointmentTypeStrings.MOBILE
|
if (appointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) {
|
|| appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
|
||||||
storeActionConfig = {
|
storeActionConfig = {
|
||||||
storeAction: GET_MOBILE_TIME_SLOTS,
|
storeAction: GET_MOBILE_TIME_SLOTS,
|
||||||
payload: {
|
payload: {
|
||||||
|
|
@ -326,7 +326,7 @@ export default {
|
||||||
&& serviceLocation.zipCodeCtu
|
&& serviceLocation.zipCodeCtu
|
||||||
&& serviceLocation.appointmentType
|
&& serviceLocation.appointmentType
|
||||||
&& ((serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
&& ((serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC)
|
|| serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)
|
||||||
|| serviceLocation.provider.providerNumber);
|
|| serviceLocation.provider.providerNumber);
|
||||||
const paymentInfo = useMainStore().payment.isInsurance !== null;
|
const paymentInfo = useMainStore().payment.isInsurance !== null;
|
||||||
const supportingItems = useMainStore().lineItems.supportingItems !== null;
|
const supportingItems = useMainStore().lineItems.supportingItems !== null;
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.appointmentType === AppointmentTypeStrings.MOBILE
|
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)
|
appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes(PREMIUM_TIME_SLOT_ID_FLAG)
|
||||||
? this.mobilePremiumCmsWidgetName
|
? this.mobilePremiumCmsWidgetName
|
||||||
: this.mobileCmsWidgetName;
|
: this.mobileCmsWidgetName;
|
||||||
|
|
@ -275,7 +275,7 @@ export default {
|
||||||
},
|
},
|
||||||
durationTextBlockCopy() {
|
durationTextBlockCopy() {
|
||||||
if (this.appointmentType === AppointmentTypeStrings.MOBILE
|
if (this.appointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC) {
|
|| this.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) {
|
||||||
return null;
|
return null;
|
||||||
} if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) {
|
} if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) {
|
||||||
return this.inshopDurationText;
|
return this.inshopDurationText;
|
||||||
|
|
@ -321,7 +321,7 @@ export default {
|
||||||
if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
|
if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
|
||||||
return this.getAvailableTimeSlotsForDropOff(this.timeSlotsForSelectedDate.timeSlots);
|
return this.getAvailableTimeSlotsForDropOff(this.timeSlotsForSelectedDate.timeSlots);
|
||||||
} if (this.appointmentType === AppointmentTypeStrings.MOBILE
|
} 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.getAvailableTimeSlotsForMobile(this.timeSlotsForSelectedDate.timeSlots);
|
||||||
}
|
}
|
||||||
return this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots);
|
return this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots);
|
||||||
|
|
|
||||||
|
|
@ -52,14 +52,14 @@ export default {
|
||||||
},
|
},
|
||||||
answersToDisplay() {
|
answersToDisplay() {
|
||||||
const shouldShowMobile = this.isServiceableMobile && this.isItacOrNoComp;
|
const shouldShowMobile = this.isServiceableMobile && this.isItacOrNoComp;
|
||||||
const shouldShowMobileNotITAC = this.isServiceableMobile && !this.isItacOrNoComp;
|
const shouldShowMobileNotITACNotNoComp = this.isServiceableMobile && !this.isItacOrNoComp;
|
||||||
const shouldShowInshop = this.isServiceableInshop;
|
const shouldShowInshop = this.isServiceableInshop;
|
||||||
const shouldShowDropoff = this.isServiceableInshop && !useMainStore().damage.isRepair;
|
const shouldShowDropoff = this.isServiceableInshop && !useMainStore().damage.isRepair;
|
||||||
return this.answersFromCms
|
return this.answersFromCms
|
||||||
? this.answersFromCms.filter((answer) => (
|
? this.answersFromCms.filter((answer) => (
|
||||||
(answer.Name === AppointmentTypeStrings.IN_SHOP && shouldShowInshop)
|
(answer.Name === AppointmentTypeStrings.IN_SHOP && shouldShowInshop)
|
||||||
|| (answer.Name === AppointmentTypeStrings.MOBILE && shouldShowMobile)
|
|| (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)
|
|| (answer.Name === AppointmentTypeStrings.DROP_OFF && shouldShowDropoff)
|
||||||
))
|
))
|
||||||
: [];
|
: [];
|
||||||
|
|
@ -89,12 +89,12 @@ export default {
|
||||||
if (
|
if (
|
||||||
newValue.length === 1
|
newValue.length === 1
|
||||||
&& newValue.findIndex((answer) => (answer.Name === AppointmentTypeStrings.MOBILE
|
&& 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) {
|
if (this.isITAC) {
|
||||||
this.selectedValues = AppointmentTypeStrings.MOBILE;
|
this.selectedValues = AppointmentTypeStrings.MOBILE;
|
||||||
} else {
|
} 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) {
|
if (this.isITAC) {
|
||||||
this.selectedValues = AppointmentTypeStrings.MOBILE;
|
this.selectedValues = AppointmentTypeStrings.MOBILE;
|
||||||
} else {
|
} else {
|
||||||
this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC;
|
this.selectedValues = AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ export default {
|
||||||
|
|
||||||
if (newValue.zipCode !== this.zipCode) {
|
if (newValue.zipCode !== this.zipCode) {
|
||||||
if (!(this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
if (!(this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC)) {
|
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)) {
|
||||||
this.selectedAppointmentType = null;
|
this.selectedAppointmentType = null;
|
||||||
}
|
}
|
||||||
this.selectedProvider = null;
|
this.selectedProvider = null;
|
||||||
|
|
@ -293,7 +293,7 @@ export default {
|
||||||
},
|
},
|
||||||
isMobileLocationDisplayed() {
|
isMobileLocationDisplayed() {
|
||||||
return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
return this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
|
||||||
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC;
|
|| this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
|
||||||
},
|
},
|
||||||
requiresInshopRecalibration() {
|
requiresInshopRecalibration() {
|
||||||
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
|
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ export default {
|
||||||
|
|
||||||
await nextTick();
|
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();
|
this.getNextShopsFromList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ export const useMainStore = defineStore({
|
||||||
policy: (state) => state.order.policy,
|
policy: (state) => state.order.policy,
|
||||||
hasAnyNonWindshieldGlassParts: (state) => !state.order.policy.isDamageGlassOnly,
|
hasAnyNonWindshieldGlassParts: (state) => !state.order.policy.isDamageGlassOnly,
|
||||||
isMobileAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|
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,
|
isDropOffAppointment: (state) => state.order.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF,
|
||||||
isClaimRegistrationRequired: (state) => state.issConfig.isClaimRegistrationRequired,
|
isClaimRegistrationRequired: (state) => state.issConfig.isClaimRegistrationRequired,
|
||||||
eventBusItem: (state) => (eventCategory, eventSubCategory) => {
|
eventBusItem: (state) => (eventCategory, eventSubCategory) => {
|
||||||
|
|
|
||||||
|
|
@ -1028,12 +1028,12 @@ describe('Store', () => {
|
||||||
expect(store.isMobileAppointment).toBe(true);
|
expect(store.isMobileAppointment).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should return true for mobile-insurance appointments', () => {
|
it('Should return true for mobile-NotITAC-and-NotNoComp appointments', () => {
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
store.updateServiceLocation({
|
store.updateServiceLocation({
|
||||||
appointmentType: AppointmentTypeStrings.MOBILE_NOT_ITAC
|
appointmentType: AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
|
||||||
});
|
});
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue