Improve meeting url information in booking detail view (#2943)
* change meeting url text for booking detail view * improve for wen conferencing details for different booking status Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/2951/head^2
parent
9d1e6f23db
commit
7b0d5811d6
|
@ -25,6 +25,7 @@ import { TextArea } from "@calcom/ui/form/fields";
|
||||||
|
|
||||||
import { HttpError } from "@lib/core/http/error";
|
import { HttpError } from "@lib/core/http/error";
|
||||||
import useMeQuery from "@lib/hooks/useMeQuery";
|
import useMeQuery from "@lib/hooks/useMeQuery";
|
||||||
|
import { linkValueToString } from "@lib/linkValueToString";
|
||||||
import { LocationType } from "@lib/location";
|
import { LocationType } from "@lib/location";
|
||||||
import { parseRecurringDates } from "@lib/parseDate";
|
import { parseRecurringDates } from "@lib/parseDate";
|
||||||
import { inferQueryInput, inferQueryOutput, trpc } from "@lib/trpc";
|
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 = () => {
|
const onClick = () => {
|
||||||
router.push({
|
router.push({
|
||||||
pathname: "/success",
|
pathname: "/success",
|
||||||
|
@ -209,11 +222,7 @@ function BookingListItem(booking: BookingItemProps) {
|
||||||
user: user?.username || "",
|
user: user?.username || "",
|
||||||
name: booking.attendees[0] ? booking.attendees[0].name : undefined,
|
name: booking.attendees[0] ? booking.attendees[0].name : undefined,
|
||||||
email: booking.attendees[0] ? booking.attendees[0].email : undefined,
|
email: booking.attendees[0] ? booking.attendees[0].email : undefined,
|
||||||
location: booking.location
|
location: location,
|
||||||
? booking.location.includes("integration")
|
|
||||||
? (t("web_conferencing_details_to_follow") as string)
|
|
||||||
: booking.location
|
|
||||||
: "",
|
|
||||||
eventName: booking.eventType.eventName || "",
|
eventName: booking.eventType.eventName || "",
|
||||||
bookingId: booking.id,
|
bookingId: booking.id,
|
||||||
recur: booking.recurringEventId,
|
recur: booking.recurringEventId,
|
||||||
|
|
|
@ -882,5 +882,6 @@
|
||||||
"this_input_will_shown_booking_this_event": "This input will be shown when booking this event",
|
"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",
|
"meeting_url_in_conformation_email": "Meeting url is in the confirmation email",
|
||||||
"url_start_with_https": "URL needs to start with http:// or https://",
|
"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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue