Skip to content

Scheduling infrastructure for absolutely everyone.

Manage Link showing for organisers (#3037)

sean-brydonad4bcfafce7a
diff --git a/packages/emails/src/components/Info.tsx b/packages/emails/src/components/Info.tsx
index 07b4ae81b17..57a031b9454 100644
--- a/packages/emails/src/components/Info.tsx
+++ b/packages/emails/src/components/Info.tsx
@@ -7,7 +7,7 @@ export const Info = (props: {
withSpacer?: boolean;
lineThrough?: boolean;
}) => {
- if (!props.description) return null;
+ if (!props.description || props.description=="") return null;
return (
<>
{props.withSpacer && <Spacer />}
diff --git a/packages/emails/src/components/ManageLink.tsx b/packages/emails/src/components/ManageLink.tsx
index b5db552c651..02aad2c6ddf 100644
--- a/packages/emails/src/components/ManageLink.tsx
+++ b/packages/emails/src/components/ManageLink.tsx
@@ -4,27 +4,29 @@ import type { CalendarEvent, Person } from "@calcom/types/Calendar";
export function ManageLink(props: { calEvent: CalendarEvent; attendee: Person }) {
// Only the original attendee can make changes to the event
// Guests cannot
- if (props.attendee.email !== props.calEvent.attendees[0].email) return null;
const t = props.attendee.language.translate;
-
- return (
- <div
- style={{
- fontFamily: "Roboto, Helvetica, sans-serif",
- fontSize: "16px",
- fontWeight: 500,
- lineHeight: "0px",
- textAlign: "left",
- color: "#3e3e3e",
- }}>
- <p>
- <>{t("need_to_reschedule_or_cancel")}</>
- </p>
- <p style={{ fontWeight: 400, lineHeight: "24px" }}>
- <a href={getCancelLink(props.calEvent)} style={{ color: "#3e3e3e" }}>
- <>{t("manage_this_event")}</>
- </a>
- </p>
- </div>
- );
+ if(props.attendee.email === props.calEvent.attendees[0].email || props.calEvent.organizer.email === props.attendee.email ){
+ return (
+ <div
+ style={{
+ fontFamily: "Roboto, Helvetica, sans-serif",
+ fontSize: "16px", fontWeight: 500,
+ lineHeight: "0px",
+ textAlign: "left",
+ color: "#3e3e3e",
+ }}>
+ <p>
+ <>{t("need_to_reschedule_or_cancel")}</>
+ </p>
+ <p style={{ fontWeight: 400, lineHeight: "24px" }}>
+ <a href={getCancelLink(props.calEvent)} style={{ color: "#3e3e3e" }}>
+ <>{t("manage_this_event")}</>
+ </a>
+ </p>
+ </div>
+ );
+ }
+
+ // Dont have the rights to the manage link
+ return null
}