Fixing rescheduled email date (#5035)
This commit is contained in:
parent
e6f912bf0c
commit
83442caf86
|
@ -37,7 +37,9 @@ export function WhenInfo(props: { calEvent: CalendarEvent; timeZone: string; t:
|
|||
<div>
|
||||
<Info
|
||||
label={`${t("when")} ${getRecurringWhen(props)}`}
|
||||
lineThrough={!!props.calEvent.cancellationReason}
|
||||
lineThrough={
|
||||
!!props.calEvent.cancellationReason && !props.calEvent.cancellationReason.includes("$RCH$")
|
||||
}
|
||||
description={
|
||||
<>
|
||||
{recurringEvent?.count ? `${t("starting")} ` : ""}
|
||||
|
|
|
@ -56,7 +56,13 @@ export const BaseScheduledEmail = (
|
|||
: props.callToAction || <ManageLink attendee={props.attendee} calEvent={props.calEvent} />
|
||||
}
|
||||
subtitle={props.subtitle || <>{t("emailed_you_and_any_other_attendees")}</>}>
|
||||
<Info label={t("cancellation_reason")} description={props.calEvent.cancellationReason} withSpacer />
|
||||
<Info
|
||||
label={t("cancellation_reason")}
|
||||
description={
|
||||
props.calEvent.cancellationReason && props.calEvent.cancellationReason.replace("$RCH$", "")
|
||||
} // Removing flag to distinguish reschedule from cancellation
|
||||
withSpacer
|
||||
/>
|
||||
<Info label={t("rejection_reason")} description={props.calEvent.rejectionReason} withSpacer />
|
||||
<Info label={t("what")} description={props.calEvent.type} withSpacer />
|
||||
<WhenInfo calEvent={props.calEvent} t={t} timeZone={timeZone} />
|
||||
|
|
|
@ -752,7 +752,7 @@ async function handler(req: NextApiRequest & { userId?: number }) {
|
|||
...evt,
|
||||
additionalInformation: metadata,
|
||||
additionalNotes, // Resets back to the additionalNote input and not the override value
|
||||
cancellationReason: reqBody.rescheduleReason,
|
||||
cancellationReason: "$RCH$" + reqBody.rescheduleReason, // Removable code prefix to differentiate cancellation from rescheduling for email
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user