revert: booking rejection reason from booking success page (#16584)

This commit is contained in:
Anik Dhabal Babu
2024-09-11 03:51:36 +05:30
committed by GitHub
parent c168df4df0
commit 7269b3ea60
4 changed files with 48 additions and 122 deletions
@@ -63,7 +63,6 @@ import {
} from "@calcom/ui";
import PageWrapper from "@calcom/web/components/PageWrapper";
import CancelBooking from "@calcom/web/components/booking/CancelBooking";
import RejectBooking from "@calcom/web/components/booking/RejectBooking";
import EventReservationSchema from "@calcom/web/components/schemas/EventReservationSchema";
import { timeZone } from "@calcom/web/lib/clock";
@@ -79,7 +78,6 @@ const querySchema = z.object({
email: z.string().optional(),
eventTypeSlug: z.string().optional(),
cancel: stringToBoolean,
reject: stringToBoolean,
allRemainingBookings: stringToBoolean,
changes: stringToBoolean,
reschedule: stringToBoolean,
@@ -116,7 +114,6 @@ export default function Success(props: PageProps) {
allRemainingBookings,
isSuccessBookingPage,
cancel: isCancellationMode,
reject: isRejectionMode,
formerTime,
email,
seatReferenceUid,
@@ -214,16 +211,6 @@ export default function Success(props: PageProps) {
router.replace(`${pathname}?${_searchParams.toString()}`);
}
function setIsRejectionMode() {
const _searchParams = new URLSearchParams(searchParams ?? undefined);
if (_searchParams.get("reject")) {
_searchParams.delete("reject");
}
router.replace(`${pathname}?${_searchParams.toString()}`);
}
let evtName = eventType.eventName;
if (eventType.isDynamic && bookingInfo.responses?.title) {
evtName = bookingInfo.responses.title as string;
@@ -693,7 +680,6 @@ export default function Success(props: PageProps) {
{!requiresLoginToUpdate &&
(!needsConfirmation || !userIsOwner) &&
isReschedulable &&
!isRejectionMode &&
(!isCancellationMode ? (
<>
<hr className="border-subtle mb-8" />
@@ -753,19 +739,6 @@ export default function Success(props: PageProps) {
/>
</>
))}
{!isCancelled && isRejectionMode && (
<>
<hr className="border-subtle" />
<RejectBooking
booking={{
id: bookingInfo.id,
uid: bookingInfo?.uid,
recurringEventId: bookingInfo.recurringEventId,
}}
setIsRejectionMode={setIsRejectionMode}
/>
</>
)}
{userIsOwner &&
!needsConfirmation &&
!isCancellationMode &&