From 94dc2643f2deb18adf53206b546ac5caffad3bf3 Mon Sep 17 00:00:00 2001 From: alannnc Date: Thu, 23 Feb 2023 21:58:14 -0700 Subject: [PATCH] fix/payment-status-message-on-booking-cancelled (#7260) Co-authored-by: Alex van Andel --- apps/web/pages/booking/[uid].tsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/web/pages/booking/[uid].tsx b/apps/web/pages/booking/[uid].tsx index 798ac89bf9..781e3cebe4 100644 --- a/apps/web/pages/booking/[uid].tsx +++ b/apps/web/pages/booking/[uid].tsx @@ -442,17 +442,19 @@ export default function Success(props: SuccessProps) {

{getTitle()}

- {props.paymentStatus && ( -

- {!props.paymentStatus.success && - !props.paymentStatus.refunded && - t("booking_with_payment_cancelled")} - {props.paymentStatus.success && - !props.paymentStatus.refunded && - t("booking_with_payment_cancelled_already_paid")} - {props.paymentStatus.refunded && t("booking_with_payment_cancelled_refunded")} -

- )} + {props.paymentStatus && + (bookingInfo.status === BookingStatus.CANCELLED || + bookingInfo.status === BookingStatus.REJECTED) && ( +

+ {!props.paymentStatus.success && + !props.paymentStatus.refunded && + t("booking_with_payment_cancelled")} + {props.paymentStatus.success && + !props.paymentStatus.refunded && + t("booking_with_payment_cancelled_already_paid")} + {props.paymentStatus.refunded && t("booking_with_payment_cancelled_refunded")} +

+ )}
{(isCancelled || reschedule) && cancellationReason && (