File tree Expand file tree Collapse file tree
apps/web/lib/reschedule/[uid] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,8 +117,7 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
117117 // A booking that has been rescheduled to a new booking will also have a status of CANCELLED
118118 const isDisabledRescheduling = booking . eventType ?. disableRescheduling ;
119119 // This comes from query param and thus is considered forced
120- const canRescheduleCancelledBooking =
121- isForcedRescheduleForCancelledBooking || booking . eventType ?. allowReschedulingCancelledBookings ;
120+ const canBookThroughCancelledBookingRescheduleLink = booking . eventType ?. allowReschedulingCancelledBookings ;
122121 const isNonRescheduleableBooking =
123122 booking . status === BookingStatus . CANCELLED || booking . status === BookingStatus . REJECTED ;
124123
@@ -131,8 +130,9 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
131130 } ;
132131 }
133132
134- if ( isNonRescheduleableBooking ) {
135- const canReschedule = booking . status === BookingStatus . CANCELLED && canRescheduleCancelledBooking ;
133+ if ( isNonRescheduleableBooking && ! isForcedRescheduleForCancelledBooking ) {
134+ const canReschedule =
135+ booking . status === BookingStatus . CANCELLED && canBookThroughCancelledBookingRescheduleLink ;
136136 return {
137137 redirect : {
138138 destination : canReschedule ? eventUrl : `/booking/${ uid } ` ,
You can’t perform that action at this time.
0 commit comments