code formatting (#675)

This commit is contained in:
Johan Gunawan 2024-05-02 13:05:10 -04:00 committed by GitHub
parent e0f1925e3b
commit 2e0d40618c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -194,9 +194,7 @@ export default {
}); });
}, },
appointmentTimeFormatted() { appointmentTimeFormatted() {
const formattedTime = this.formatAppointmentTime( const formattedTime = this.formatAppointmentTime(this.appointmentType);
this.appointmentType
);
return formattedTime; return formattedTime;
}, },
mobileWordingText() { mobileWordingText() {
@ -240,15 +238,11 @@ export default {
}`; }`;
}, },
providerAddress() { providerAddress() {
return toTitleCase( return toTitleCase(this.submittedOrder.serviceLocation.provider.address
this.submittedOrder.serviceLocation.provider.address .streetAddress);
.streetAddress
);
}, },
providerCity() { providerCity() {
return toTitleCase( return toTitleCase(this.submittedOrder.serviceLocation.provider.address.city);
this.submittedOrder.serviceLocation.provider.address.city
);
}, },
providerState() { providerState() {
return this.submittedOrder.serviceLocation.provider.address.state; return this.submittedOrder.serviceLocation.provider.address.state;
@ -302,22 +296,22 @@ export default {
}, },
mobileAppointment() { mobileAppointment() {
return ( return (
this.submittedOrder.serviceLocation.appointmentType === this.submittedOrder.serviceLocation.appointmentType
AppointmentTypeStrings.MOBILE || === AppointmentTypeStrings.MOBILE
this.submittedOrder.serviceLocation.appointmentType === || this.submittedOrder.serviceLocation.appointmentType
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP
); );
}, },
inShopAppointment() { inShopAppointment() {
return ( return (
this.submittedOrder.serviceLocation.appointmentType === this.submittedOrder.serviceLocation.appointmentType
AppointmentTypeStrings.IN_SHOP === AppointmentTypeStrings.IN_SHOP
); );
}, },
dropOffAppointment() { dropOffAppointment() {
return ( return (
this.submittedOrder.serviceLocation.appointmentType === this.submittedOrder.serviceLocation.appointmentType
AppointmentTypeStrings.DROP_OFF === AppointmentTypeStrings.DROP_OFF
); );
}, },
inShopAppointmentDuration() { inShopAppointmentDuration() {
@ -336,9 +330,7 @@ export default {
}, },
mounted() { mounted() {
if (this.carrierUrl) { if (this.carrierUrl) {
this.$refs.siteFooter.updateButtonText( this.$refs.siteFooter.updateButtonText(`Go back to ${this.carrierName}`);
`Go back to ${this.carrierName}`
);
} }
}, },
methods: { methods: {
@ -351,25 +343,25 @@ export default {
// Service Location // Service Location
const { serviceLocation } = useMainStore().order; const { serviceLocation } = useMainStore().order;
const mobileReqs = !!( const mobileReqs = !!(
serviceLocation.address && serviceLocation.address
serviceLocation.city && && serviceLocation.city
serviceLocation.state && && serviceLocation.state
serviceLocation.zipCode && serviceLocation.zipCode
); );
const providerLocation = serviceLocation.provider.address; const providerLocation = serviceLocation.provider.address;
const dropOffInShopReqs = !!( const dropOffInShopReqs = !!(
providerLocation.streetAddress && providerLocation.streetAddress
providerLocation.city && && providerLocation.city
providerLocation.state && && providerLocation.state
providerLocation.zipCode && providerLocation.zipCode
); );
const isMobile = const isMobile =
serviceLocation.appointmentType === serviceLocation.appointmentType
AppointmentTypeStrings.MOBILE || === AppointmentTypeStrings.MOBILE
serviceLocation.appointmentType === || serviceLocation.appointmentType
AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP;
const serviceLocationReqs = const serviceLocationReqs =
(isMobile && mobileReqs) || (!isMobile && dropOffInShopReqs); (isMobile && mobileReqs) || (!isMobile && dropOffInShopReqs);
@ -381,20 +373,20 @@ export default {
// Schedule // Schedule
const { schedule } = useMainStore().order; const { schedule } = useMainStore().order;
const scheduleReqs = !!( const scheduleReqs = !!(
schedule.date && schedule.date
schedule.startTime && && schedule.startTime
schedule.endTime && && schedule.endTime
schedule.jobMaxMinutes && && schedule.jobMaxMinutes
schedule.jobMinMinutes && schedule.jobMinMinutes
); );
// Contact Info // Contact Info
const { contactInfo } = useMainStore().order; const { contactInfo } = useMainStore().order;
const contactInfoReqs = !!( const contactInfoReqs = !!(
contactInfo.firstName && contactInfo.firstName
contactInfo.lastName && && contactInfo.lastName
contactInfo.servicePhone && && contactInfo.servicePhone
contactInfo.emailAddress && contactInfo.emailAddress
); );
// Payment // Payment
@ -402,11 +394,11 @@ export default {
useMainStore().order.payment.isPayInAdvance === false; useMainStore().order.payment.isPayInAdvance === false;
return ( return (
serviceLocationReqs && serviceLocationReqs
isInsuranceSet && && isInsuranceSet
scheduleReqs && && scheduleReqs
contactInfoReqs && && contactInfoReqs
paymentMethodReqs && paymentMethodReqs
); );
}, },
forwardButtonAction() { forwardButtonAction() {
@ -417,15 +409,11 @@ export default {
case AppointmentTypeStrings.MOBILE: case AppointmentTypeStrings.MOBILE:
case AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP: case AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP:
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
return `Between ${get12HourTimeMobileFormat( return `Between ${get12HourTimeMobileFormat(this.appointmentStartTime)} - ${get12HourTimeMobileFormat(this.appointmentEndTime)}`;
this.appointmentStartTime
)} - ${get12HourTimeMobileFormat(this.appointmentEndTime)}`;
case AppointmentTypeStrings.DROP_OFF: case AppointmentTypeStrings.DROP_OFF:
return 'Drop off before 9:30 AM'; return 'Drop off before 9:30 AM';
case AppointmentTypeStrings.IN_SHOP: case AppointmentTypeStrings.IN_SHOP:
return `at ${get12HourTimeFormat( return `at ${get12HourTimeFormat(this.appointmentStartTime)}`;
this.appointmentStartTime
)}`;
default: default:
return null; return null;
} }