fix: v2 rescheduled booking with confirmation (#19833)
* fix: old bookings controller * fix: new bookings controller * fix: BookerPlatformWrapper pass rescheduledBy to BookerComponent * rescheduleBy email * fix test * remove log * centralize getOAuthUserEmail, examples app rescheduledBy * revert * finalize * fix: old bookings rescheduling * unify email validation * update input description * chore: move booker platform wrapper types --------- Co-authored-by: Morgan Vernay <[email protected]>
This commit is contained in:
1 parent
ff5c6de5da
commit
76b9b9b0fe
16 files changed
+315
-220
No files matched your search
@@ -118,7 +118,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!!booking.bookingFieldsResponses?.notes && (
|
||||
{"bookingFieldsResponses" in booking && !!booking.bookingFieldsResponses?.notes && (
|
||||
<div className="flex gap-[70px]">
|
||||
<div className="w-[40px]">
|
||||
<h4>Additional notes</h4>
|
||||
@@ -140,7 +140,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
|
||||
className="underline"
|
||||
onClick={() => {
|
||||
router.push(
|
||||
`/booking?rescheduleUid=${booking?.uid}&eventTypeSlug=${booking?.eventType.slug}`
|
||||
`/booking?rescheduleUid=${booking?.uid}&eventTypeSlug=${booking?.eventType.slug}&rescheduledBy=${props.calEmail}`
|
||||
);
|
||||
}}>
|
||||
Reschedule
|
||||
|
||||
@@ -18,6 +18,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
|
||||
const { data: teams } = useTeams();
|
||||
const { isLoading: isLoadingTeamEvents, data: teamEventTypes } = useTeamEventTypes(teams?.[0]?.id || 0);
|
||||
const rescheduleUid = (router.query.rescheduleUid as string) ?? "";
|
||||
const rescheduledBy = (router.query.rescheduledBy as string) ?? "";
|
||||
const eventTypeSlugQueryParam = (router.query.eventTypeSlug as string) ?? "";
|
||||
|
||||
return (
|
||||
@@ -125,6 +126,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
|
||||
{!bookingTitle && rescheduleUid && eventTypeSlugQueryParam && (
|
||||
<Booker
|
||||
rescheduleUid={rescheduleUid}
|
||||
rescheduledBy={rescheduledBy}
|
||||
eventSlug={eventTypeSlugQueryParam}
|
||||
username={props.calUsername ?? ""}
|
||||
onCreateBookingSuccess={(data) => {
|
||||
|
||||
Reference in new issue
Block a user