diff --git a/pages/bookings/index.tsx b/pages/bookings/index.tsx index ca5b2e950c..d9dcdade03 100644 --- a/pages/bookings/index.tsx +++ b/pages/bookings/index.tsx @@ -8,7 +8,7 @@ import { Fragment } from "react"; import { Menu, Transition } from "@headlessui/react"; import { DotsHorizontalIcon } from "@heroicons/react/solid"; import classNames from "@lib/classNames"; -import { ClockIcon, XIcon } from "@heroicons/react/outline"; +import { ClockIcon, XIcon, CheckIcon, BanIcon } from "@heroicons/react/outline"; import Loader from "@components/Loader"; import { Button } from "@components/ui/Button"; import { getSession } from "@lib/auth"; @@ -89,33 +89,103 @@ export default function Bookings({ bookings }) { {!booking.confirmed && !booking.rejected && ( <> - - +
+ + +
+ + {({ open }) => ( + <> +
+ + Open options + +
+ + +
+ + {({ active }) => ( + confirmBookingHandler(booking, true)} + className={classNames( + active + ? "bg-neutral-100 text-neutral-900" + : "text-neutral-700", + "group flex items-center px-4 py-2 text-sm font-medium" + )}> + + )} + + + {({ active }) => ( + confirmBookingHandler(booking, false)} + className={classNames( + active + ? "bg-neutral-100 text-neutral-900" + : "text-neutral-700", + "group flex items-center px-4 py-2 text-sm w-full font-medium" + )}> + + )} + +
+
+
+ + )} +
)} {booking.confirmed && !booking.rejected && ( -
- - + <> +
+ + +
{({ open }) => ( <> @@ -183,7 +253,7 @@ export default function Bookings({ bookings }) { )} -
+ )} {!booking.confirmed && booking.rejected && (
Rejected