From dfc6373bb4494b99c4a071c4ea217611caa93cef Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Tue, 21 Jun 2022 14:44:10 +0530 Subject: [PATCH] Fix undefined in Calendar and also add manage event again (#3122) --- packages/lib/CalEventParser.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/lib/CalEventParser.ts b/packages/lib/CalEventParser.ts index bee5faa5c7..7cafeb3b67 100644 --- a/packages/lib/CalEventParser.ts +++ b/packages/lib/CalEventParser.ts @@ -116,7 +116,7 @@ export const getCancelLink = (calEvent: CalendarEvent): string => { return WEBAPP_URL + "/cancel/" + getUid(calEvent); }; -export const getRichDescription = (calEvent: CalendarEvent, attendee?: Person) => { +export const getRichDescription = (calEvent: CalendarEvent /*, attendee?: Person*/) => { return ` ${getCancellationReason(calEvent)} ${getWhat(calEvent)} @@ -128,16 +128,17 @@ ${getDescription(calEvent)} ${getAdditionalNotes(calEvent)} ${getCustomInputs(calEvent)} ${ - // Only the original attendee can make changes to the event + // TODO: Only the original attendee can make changes to the event // Guests cannot - attendee && attendee.email === calEvent.attendees[0].email ? getManageLink(calEvent) : "" + getManageLink(calEvent) } ${ - calEvent.paymentInfo && - ` + calEvent.paymentInfo + ? ` ${calEvent.organizer.language.translate("pay_now")}: ${calEvent.paymentInfo.link} ` + : "" } `.trim(); };