Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/emails/src/components/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const Info = (props: {
withSpacer?: boolean;
lineThrough?: boolean;
}) => {
if (!props.description) return null;
if (!props.description || props.description=="") return null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some cases like additionlNotes are set to "" and was causing a random header to appear in the email field

return (
<>
{props.withSpacer && <Spacer />}
Expand Down
46 changes: 24 additions & 22 deletions packages/emails/src/components/ManageLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ){
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I switch this if statement cause I couldn't for the life of me to get it to work and I'm not sure why :S

Copy link
Contributor

@zomars zomars Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's figure out why and take the learnings instead of just patching

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
}