diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index 194d39ceee..4268fe908e 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -25,6 +25,7 @@ import { TextArea } from "@calcom/ui/form/fields"; import { HttpError } from "@lib/core/http/error"; import useMeQuery from "@lib/hooks/useMeQuery"; +import { linkValueToString } from "@lib/linkValueToString"; import { LocationType } from "@lib/location"; import { parseRecurringDates } from "@lib/parseDate"; import { inferQueryInput, inferQueryOutput, trpc } from "@lib/trpc"; @@ -199,6 +200,18 @@ function BookingListItem(booking: BookingItemProps) { ); } + let location = booking.location || ""; + + if (location.includes("integration")) { + if (booking.status === BookingStatus.CANCELLED || booking.status === BookingStatus.REJECTED) { + location = t("web_conference"); + } else if (booking.confirmed) { + location = linkValueToString(booking.location, t); + } else { + location = t("web_conferencing_details_to_follow"); + } + } + const onClick = () => { router.push({ pathname: "/success", @@ -209,11 +222,7 @@ function BookingListItem(booking: BookingItemProps) { user: user?.username || "", name: booking.attendees[0] ? booking.attendees[0].name : undefined, email: booking.attendees[0] ? booking.attendees[0].email : undefined, - location: booking.location - ? booking.location.includes("integration") - ? (t("web_conferencing_details_to_follow") as string) - : booking.location - : "", + location: location, eventName: booking.eventType.eventName || "", bookingId: booking.id, recur: booking.recurringEventId, diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index aa84e2ddf9..bbbbe6cd30 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -882,5 +882,6 @@ "this_input_will_shown_booking_this_event": "This input will be shown when booking this event", "meeting_url_in_conformation_email": "Meeting url is in the confirmation email", "url_start_with_https": "URL needs to start with http:// or https://", - "number_provided": "Phone number will be provided" + "number_provided": "Phone number will be provided", + "web_conference": "Web conference" }