-
Notifications
You must be signed in to change notification settings - Fork 12k
Manage Link showing for organisers #3037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 ){ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| } | ||
There was a problem hiding this comment.
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