Scheduling infrastructure for absolutely everyone.
[CAL-183] email and calendar still use old “cancel/reschedule” screens (#5149)
GitStarteae60043bb32
diff --git a/apps/web/pages/cancel/[uid].tsx b/apps/web/pages/cancel/[uid].tsxindex cc949451961..df77655a0e2 100644--- a/apps/web/pages/cancel/[uid].tsx+++ b/apps/web/pages/cancel/[uid].tsx@@ -14,8 +14,8 @@ import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcoimport { detectBrowserTimeFormat } from "@calcom/lib/timeFormat";import { localStorage } from "@calcom/lib/webstorage";import prisma, { bookingMinimalSelect } from "@calcom/prisma";-import { Button } from "@calcom/ui/Button";import { Icon } from "@calcom/ui/Icon";+import { Button } from "@calcom/ui/v2/core/Button";import { getSession } from "@lib/auth";import { inferSSRProps } from "@lib/types/inferSSRProps";diff --git a/packages/emails/src/components/ManageLink.tsx b/packages/emails/src/components/ManageLink.tsxindex 2010ff5680f..419c61e7c52 100644--- a/packages/emails/src/components/ManageLink.tsx+++ b/packages/emails/src/components/ManageLink.tsx@@ -1,4 +1,4 @@-import { getCancelLink } from "@calcom/lib/CalEventParser";+import { getCancelLink, getRescheduleLink } from "@calcom/lib/CalEventParser";import type { CalendarEvent, Person } from "@calcom/types/Calendar";export function ManageLink(props: { calEvent: CalendarEvent; attendee: Person }) {@@ -19,12 +19,22 @@ export function ManageLink(props: { calEvent: CalendarEvent; attendee: Person })textAlign: "left",color: "#3e3e3e",}}>- <p>- <>{t("need_to_reschedule_or_cancel")}</>- </p>- <p style={{ fontWeight: 400, lineHeight: "24px" }}>+ <p+ style={{+ fontWeight: 400,+ lineHeight: "24px",+ display: "flex",+ justifyContent: "center",+ width: "100%",+ gap: "8px",+ }}>+ <>{t("need_to_make_a_change")}</>+ <a href={getRescheduleLink(props.calEvent)} style={{ color: "#3e3e3e" }}>+ <>{t("reschedule")}</>+ </a>+ <>{t("or_lowercase")}</><a href={getCancelLink(props.calEvent)} style={{ color: "#3e3e3e" }}>- <>{t("manage_this_event")}</>+ <>{t("cancel")}</></a></p></div>diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.tsindex 462397c2af3..ab41478be88 100644--- a/packages/lib/CalEventParser.ts+++ b/packages/lib/CalEventParser.ts@@ -135,6 +135,10 @@ export const getCancelLink = (calEvent: CalendarEvent): string => {return WEBAPP_URL + "/cancel/" + getUid(calEvent);};+export const getRescheduleLink = (calEvent: CalendarEvent): string => {+ return WEBAPP_URL + "/reschedule/" + getUid(calEvent);+};+export const getRichDescription = (calEvent: CalendarEvent /*, attendee?: Person*/) => {return `${getCancellationReason(calEvent)}