From 2550485c496874f4eddda26c0befa0ff46334a2d Mon Sep 17 00:00:00 2001 From: Siddharth Movaliya Date: Thu, 19 Oct 2023 14:36:48 +0530 Subject: [PATCH] feat: Shows link location and respective icon in /bookings (#11866) Co-authored-by: Peer Richelsen Co-authored-by: Peer Richelsen --- .../components/booking/BookingListItem.tsx | 25 +++++++++++++++++++ apps/web/public/static/locales/en/common.json | 2 ++ 2 files changed, 27 insertions(+) diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index e3f4fa7b22..3be8b6f900 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -88,6 +88,10 @@ function BookingListItem(booking: BookingItemProps) { const isRecurring = booking.recurringEventId !== null; const isTabRecurring = booking.listingStatus === "recurring"; const isTabUnconfirmed = booking.listingStatus === "unconfirmed"; + const eventLocationType = getEventLocationType(booking.location); + const meetingLink = booking.references[0]?.meetingUrl + ? booking.references[0]?.meetingUrl + : booking.location; const paymentAppData = getPaymentAppData(booking.eventType); @@ -353,6 +357,27 @@ function BookingListItem(booking: BookingItemProps) { attendees={booking.attendees} /> + {!isPending && (eventLocationType || booking.location?.startsWith("https://")) && ( + +
+ {eventLocationType ? ( + <> + {`${eventLocationType.label} + {t("join_event_location", { eventLocationType: eventLocationType.label })} + + ) : ( + t("join_meeting") + )} +
+ + )} + {isPending && ( {t("unconfirmed")} diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 8d938333f3..1255c17acd 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -2095,5 +2095,7 @@ "overlay_my_calendar":"Overlay my calendar", "overlay_my_calendar_toc":"By connecting to your calendar, you accept our privacy policy and terms of use. You may revoke access at any time.", "view_overlay_calendar_events":"View your calendar events to prevent clashed booking.", + "join_event_location": "Join {{eventLocationType}}", + "join_meeting": "Join Meeting", "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" }