import dayjs from "@calcom/dayjs"; import { APP_NAME } from "@calcom/lib/constants"; import { TimeFormat } from "@calcom/lib/timeFormat"; import { WorkflowActions } from "@calcom/prisma/enums"; const emailReminderTemplate = ( isEditingMode: boolean, action?: WorkflowActions, timeFormat?: TimeFormat, startTime?: string, endTime?: string, eventName?: string, timeZone?: string, otherPerson?: string, name?: string, isBrandingDisabled?: boolean ) => { const currentTimeFormat = timeFormat || TimeFormat.TWELVE_HOUR; const dateTimeFormat = `ddd, MMM D, YYYY ${currentTimeFormat}`; let eventDate = ""; if (isEditingMode) { endTime = "{EVENT_END_TIME}"; eventName = "{EVENT_NAME}"; timeZone = "{TIMEZONE}"; otherPerson = action === WorkflowActions.EMAIL_ATTENDEE ? "{ORGANIZER}" : "{ATTENDEE}"; name = action === WorkflowActions.EMAIL_ATTENDEE ? "{ATTENDEE}" : "{ORGANIZER}"; eventDate = `{EVENT_DATE_${dateTimeFormat}}`; } else { eventDate = dayjs(startTime).tz(timeZone).format(dateTimeFormat); endTime = dayjs(endTime).tz(timeZone).format(currentTimeFormat); } const emailSubject = `Reminder: ${eventName} - ${eventDate}`; const introHtml = `
Hi${ name ? ` ${name}` : "" },