CASH-1918: Spelling fix and make cursor happy

This commit is contained in:
Chris Redelinghuys 2026-01-06 10:09:26 -05:00
parent e3df448823
commit ed0ddf69bd

View file

@ -50,7 +50,7 @@ export default {
data() { data() {
return { return {
isModalOpen: false, isModalOpen: false,
selectedAppontment: { selectedAppointment: {
estimatedServiceMinutes: { estimatedServiceMinutes: {
minimum: null, minimum: null,
maximum: null, maximum: null,
@ -70,22 +70,23 @@ export default {
onModalClosed() { onModalClosed() {
this.pushEvent(); this.pushEvent();
this.$emit("close-mobile-first-modal"); this.$emit("close-mobile-first-modal");
this.confirmedAppointment = false;
}, },
closeModal() { closeModal() {
this.modal.closeModal(); this.modal.closeModal();
}, },
confirmAppointment() { confirmAppointment() {
let selectedTimeSlot = { let selectedTimeSlot = {
timeSlot: this.selectedAppontment.timeSlot, timeSlot: this.selectedAppointment.timeSlot,
routeCode: this.selectedAppontment.timeSlot.id, routeCode: this.selectedAppointment.timeSlot.id,
date: this.selectedAppontment.date, date: this.selectedAppointment.date,
}; };
this.confirmedAppointment = true; this.confirmedAppointment = true;
this.$emit("confirm-appointment", selectedTimeSlot); this.$emit("confirm-appointment", selectedTimeSlot);
this.modal.closeModal(); this.modal.closeModal();
}, },
setSelectedAppointment(appointment) { setSelectedAppointment(appointment) {
this.selectedAppontment = appointment; this.selectedAppointment = appointment;
}, },
getIsModalOpen() { getIsModalOpen() {
return this.isModalOpen; return this.isModalOpen;
@ -95,16 +96,18 @@ export default {
}, },
pushEvent() { pushEvent() {
let gaAction = this.confirmedAppointment ? this.GaActions.YES : this.GaActions.NO; let gaAction = this.confirmedAppointment ? this.GaActions.YES : this.GaActions.NO;
this.pushEventToGA( if (this.selectedAppointment && this.selectedAppointment.timeSlot) {
this.GaCategories.CONFIRMATION_CLICKED, this.pushEventToGA(
gaAction, this.GaCategories.CONFIRMATION_CLICKED,
this.selectedAppontment.timeSlot.startTime + gaAction,
"-" + this.selectedAppointment.timeSlot.startTime +
this.selectedAppontment.timeSlot.endTime + "-" +
" " + this.selectedAppointment.timeSlot.endTime +
this.selectedAppontment.date, " " +
true this.selectedAppointment.date,
); true
);
}
}, },
}, },
computed: { computed: {
@ -128,37 +131,37 @@ export default {
if (token.includes(INLINE_SERVICETYPE_TOKEN)) { if (token.includes(INLINE_SERVICETYPE_TOKEN)) {
const serviceType = "<strong>" + this.getServiceType + "</strong>"; const serviceType = "<strong>" + this.getServiceType + "</strong>";
tokens.splice(tokens.indexOf(token), 1, serviceType); tokens.splice(tokens.indexOf(token), 1, serviceType);
} else if (token.includes(INLINE_DAY_TOKEN) && this.selectedAppontment.date) { } else if (token.includes(INLINE_DAY_TOKEN) && this.selectedAppointment.date) {
const day = const day =
"<strong>" + "<strong>" +
new Date(this.selectedAppontment.date).toLocaleDateString("en-US", { new Date(this.selectedAppointment.date).toLocaleDateString("en-US", {
weekday: "long", weekday: "long",
timeZone: "UTC", timeZone: "UTC",
}) + }) +
"</strong>"; "</strong>";
tokens.splice(tokens.indexOf(token), 1, day); tokens.splice(tokens.indexOf(token), 1, day);
} else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppontment.date) { } else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppointment.date) {
const date = new Date(this.selectedAppontment.date).toLocaleDateString( const date = new Date(this.selectedAppointment.date).toLocaleDateString(
"en-US", "en-US",
{ timeZone: "UTC", weekday: "long", month: "long", day: "numeric" } { timeZone: "UTC", weekday: "long", month: "long", day: "numeric" }
); );
tokens.splice(tokens.indexOf(token), 1, date); tokens.splice(tokens.indexOf(token), 1, date);
} else if ( } else if (
token.includes(INLINE_TIMESLOT_TOKEN) && token.includes(INLINE_TIMESLOT_TOKEN) &&
this.selectedAppontment.timeSlot this.selectedAppointment.timeSlot
) { ) {
const timeslot = const timeslot =
this.get12HourTimeFormat(this.selectedAppontment.timeSlot.startTime) + this.get12HourTimeFormat(this.selectedAppointment.timeSlot.startTime) +
" - " + " - " +
this.get12HourTimeFormat(this.selectedAppontment.timeSlot.endTime); this.get12HourTimeFormat(this.selectedAppointment.timeSlot.endTime);
tokens.splice(tokens.indexOf(token), 1, timeslot); tokens.splice(tokens.indexOf(token), 1, timeslot);
} else if ( } else if (
token.includes(INLINE_SERVICE_LENGTH_TOKEN) && token.includes(INLINE_SERVICE_LENGTH_TOKEN) &&
this.selectedAppontment.estimatedServiceMinutes this.selectedAppointment.estimatedServiceMinutes
) { ) {
const inshopDurationTime = getDisplayTextForDurationLength( const inshopDurationTime = getDisplayTextForDurationLength(
this.selectedAppontment.estimatedServiceMinutes.minimum, this.selectedAppointment.estimatedServiceMinutes.minimum,
this.selectedAppontment.estimatedServiceMinutes.maximum this.selectedAppointment.estimatedServiceMinutes.maximum
); );
tokens.splice(tokens.indexOf(token), 1, inshopDurationTime); tokens.splice(tokens.indexOf(token), 1, inshopDurationTime);
} }