logic/prereq updates

This commit is contained in:
Katie Kroell 2024-03-05 14:22:12 -05:00
parent 8033d4c830
commit 018e27679a
2 changed files with 11 additions and 7 deletions

View file

@ -180,7 +180,8 @@ export default {
},
appointmentWordingText() {
switch (this.appointmentType) {
case AppointmentTypeStrings.MOBILE || AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
case AppointmentTypeStrings.MOBILE:
case AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
return this.mobileWordingText?.replaceAll(
'{custom:address}',
this.serviceLocationFullAddress
@ -201,7 +202,8 @@ export default {
},
appointmentWordingText2() {
switch (this.appointmentType) {
case AppointmentTypeStrings.MOBILE || AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
case AppointmentTypeStrings.MOBILE:
case AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
return this.mobileWordingText2;
case AppointmentTypeStrings.DROP_OFF:
return this.dropOffAndInShopWordingText2;
@ -215,13 +217,13 @@ export default {
}
},
mobileAppointment() {
return useMainStore().getters.isMobileAppointment;
return this.mainStore.isMobileAppointment;
},
inShopAppointment() {
return useMainStore().getters.isInShopAppointment;
return this.mainStore.isInShopAppointment;
},
dropOffAppointment() {
return useMainStore().getters.isDropOffAppointment;
return this.mainStore.isDropOffAppointment;
},
inShopAppointmentDuration() {
const inshopDurationTime = getDisplayTextForDurationLength(
@ -242,7 +244,8 @@ export default {
},
formatAppointmentTime(appointmentType) {
switch (appointmentType) {
case AppointmentTypeStrings.MOBILE || AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
case AppointmentTypeStrings.MOBILE:
case AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
// eslint-disable-next-line max-len
return `Between ${get12HourTimeMobileFormat(this.appointmentStartTime)} - ${get12HourTimeMobileFormat(this.appointmentEndTime)}`;
case AppointmentTypeStrings.DROP_OFF:

View file

@ -178,7 +178,8 @@ export default {
&& providerLocation.zipCode
);
const isMobile = serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE;
const isMobile = serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE
|| serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
const serviceLocationReqs =
(isMobile && mobileReqs) || (!isMobile && dropOffInshopReqs);