fix: wrong reschedule link for an org member for a booking on event outside the org (#15260)

* fix: wrong reschedule link

* test

* fix

* test

* test

* refactor: get org id of booking

* fix: redirect URL to handle movedToProfile username based on domain context

* Revert not needed changes

* Revert unnecessary changes now

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Hariom <hariombalhara@gmail.com>
This commit is contained in:
Kartik Saini
2024-09-11 04:47:52 +00:00
committed by GitHub
co-authored by Udit Takkar Hariom
parent d1a0fc6604
commit 61f436be2a
@@ -15,7 +15,6 @@ import ViewRecordingsDialog from "@calcom/features/ee/video/ViewRecordingsDialog
import classNames from "@calcom/lib/classNames";
import { formatTime } from "@calcom/lib/date-fns";
import getPaymentAppData from "@calcom/lib/getPaymentAppData";
import { useBookerUrl } from "@calcom/lib/hooks/useBookerUrl";
import { useCopy } from "@calcom/lib/hooks/useCopy";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useGetTheme } from "@calcom/lib/hooks/useTheme";
@@ -70,7 +69,6 @@ type BookingItemProps = BookingItem & {
};
function BookingListItem(booking: BookingItemProps) {
const bookerUrl = useBookerUrl();
const { userId, userTimeZone, userTimeFormat, userEmail } = booking.loggedInUser;
const {
@@ -183,7 +181,7 @@ function BookingListItem(booking: BookingItemProps) {
id: "reschedule",
icon: "clock" as const,
label: t("reschedule_booking"),
href: `${bookerUrl}/reschedule/${booking.uid}${
href: `/reschedule/${booking.uid}${
booking.seatsReferences.length ? `?seatReferenceUid=${getSeatReferenceUid()}` : ""
}`,
},