diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index dac6a6d7a1..2023df30bf 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -112,7 +112,9 @@ function BookingListItem(booking: BookingItemProps) { label: isTabRecurring && isRecurring ? t("cancel_all_remaining") : t("cancel"), /* When cancelling we need to let the UI and the API know if the intention is to cancel all remaining bookings or just that booking instance. */ - href: `/cancel/${booking.uid}${isTabRecurring && isRecurring ? "?allRemainingBookings=true" : ""}`, + href: `/success?uid=${booking.uid}&cancel=true${ + isTabRecurring && isRecurring ? "&allRemainingBookings=true" : "" + }`, icon: Icon.FiX, }, { @@ -190,6 +192,7 @@ function BookingListItem(booking: BookingItemProps) { pathname: "/success", query: { uid: booking.uid, + allRemainingBookings: isTabRecurring, listingStatus: booking.listingStatus, email: booking.attendees[0] ? booking.attendees[0].email : undefined, }, diff --git a/apps/web/components/booking/CancelBooking.tsx b/apps/web/components/booking/CancelBooking.tsx index 0dbc58ae4e..e6da1c4e6a 100644 --- a/apps/web/components/booking/CancelBooking.tsx +++ b/apps/web/components/booking/CancelBooking.tsx @@ -5,8 +5,8 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import useTheme from "@calcom/lib/hooks/useTheme"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; import type { RecurringEvent } from "@calcom/types/Calendar"; -import { Button } from "@calcom/ui/Button"; import { Icon } from "@calcom/ui/Icon"; +import { Button, TextArea } from "@calcom/ui/components"; type Props = { booking: { @@ -22,13 +22,14 @@ type Props = { team?: string | null; setIsCancellationMode: (value: boolean) => void; theme: string | null; + allRemainingBookings: boolean; }; export default function CancelBooking(props: Props) { const [cancellationReason, setCancellationReason] = useState(""); const { t } = useLocale(); const router = useRouter(); - const { booking, profile, team } = props; + const { booking, profile, team, allRemainingBookings } = props; const [loading, setLoading] = useState(false); const telemetry = useTelemetry(); const [error, setError] = useState(booking ? null : t("booking_already_cancelled")); @@ -51,30 +52,23 @@ export default function CancelBooking(props: Props) { {!error && (
-