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