[CAL-183] email and calendar still use old “cancel/reschedule” screens (#5149)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: MuriloAmarals <muralha2000@gmail.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rafael <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Grace Nshokano <grace.devolop@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Júlio Piubello da Silva Cabral <julio.piubello@gitstart.dev>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: C000Ldude <coolmagnas@gmail.com>
Co-authored-by: Klinger Matheus <50892465+KlingerMatheus@users.noreply.github.com>
Co-authored-by: Eman <emmanuelgatwech@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
GitStart 2022-10-27 16:13:52 +07:00 committed by GitHub
parent bf34296864
commit eae60043bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 7 deletions

View File

@ -14,8 +14,8 @@ import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calco
import { 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";

View File

@ -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>

View File

@ -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)}