feat: booker atom custom location (#14635)

* frontend: handle booking locationUrl

* backend: pass booking locationUrl to handleNewBooking

* examples app: display booking location if provided

* fix: v2 not starting: contains -> includes

* backend: pass booking locationUrl to handleNewBooking

* swagger docs update

* examples app: dont display where of booking if does not start with http

---------

Co-authored-by: Keith Williams <[email protected]>
Co-authored-by: Morgan <[email protected]>
This commit is contained in:
authored and GitHub committed 2024-04-18 08:26:36 +00:00
1 parent 0aa1628925
commit be128181e2
9 files changed
+53 -14

No files matched your search

@@ -87,10 +87,10 @@ export default function Bookings(props: { calUsername: string; calEmail: string
<div>
<div>
<h4>
{booking.user.name}{" "}
{booking.user?.name}{" "}
<span className="rounded-md bg-blue-800 px-2 text-sm text-white">Host</span>
</h4>
<p>{booking.user.email}</p>
<p>{booking.user?.email}</p>
</div>
</div>
<div>
@@ -101,6 +101,16 @@ export default function Bookings(props: { calUsername: string; calEmail: string
</div>
</div>
</div>
{!!booking.location && booking.location.startsWith("http") && (
<div className="flex gap-[70px]">
<div>
<h4>Where</h4>
</div>
<div>
<p>{booking.location}</p>
</div>
</div>
)}
{booking.responses.notes && (
<div className="flex gap-[70px]">
<div className="w-[40px]">
@@ -133,7 +143,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
className="underline"
onClick={() => {
cancelBooking({
id: parseInt(booking.id),
id: booking.id,
uid: booking.uid,
cancellationReason: "User request",
allRemainingBookings: true,
@@ -26,7 +26,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string
{!isLoadingEvents && !eventTypeSlug && Boolean(eventTypes?.length) && !rescheduleUid && (
<div className="flex flex-col gap-4">
{eventTypes?.map((event: { id: number; slug: string; title: string }) => {
{eventTypes?.map((event: { id: number; slug: string; title: string; length: number }) => {
const formatEventSlug = event.slug
.split("-")
.map((item) => `${item[0].toLocaleUpperCase()}${item.slice(1)}`)