fix: Disable cancel button for past bookings (#22667)

* fix: Remove cancel button for past bookings

* fix types and few improvements

* add proper tests for backend changes

* chore

* Update [bookingUid].tsx

* Update bookings-single-view.tsx

* remove comment

* Update tests

---------

Co-authored-by: Kartik Saini <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-09-03 12:59:07 +00:00
1 parent 216fb2141b
commit a6101b3da9
6 files changed
+135 -3

No files matched your search

@@ -839,13 +839,13 @@ export default function Success(props: PageProps) {
{t("reschedule")}
</Link>
</span>
{canCancelAndReschedule && (
{!isBookingInPast && canCancel && (
<span className="mx-2">{t("or_lowercase")}</span>
)}
</span>
)}
{canCancel && (
{!isBookingInPast && canCancel && (
<button
data-testid="cancel"
className={classNames(