Fixed Buchungssystem
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Calendar } from "lucide-react";
|
||||
import { getServerSession } from "../../api/auth/[...nextauth]/auth";
|
||||
import { Badge } from "@repo/shared-components";
|
||||
import { JSX } from "react";
|
||||
import { getPublicUser, prisma } from "@repo/db";
|
||||
import { formatTimeRange } from "../../../helper/timerange";
|
||||
@@ -9,9 +8,9 @@ export const Bookings: () => Promise<JSX.Element> = async () => {
|
||||
const session = await getServerSession();
|
||||
const futureBookings = await prisma.booking.findMany({
|
||||
where: {
|
||||
userId: session?.user.id,
|
||||
startTime: {
|
||||
gte: new Date(),
|
||||
lte: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
|
||||
@@ -19,10 +19,10 @@ export default async function Home({
|
||||
<RecentFlights />
|
||||
</div>
|
||||
<div className="card bg-base-200 col-span-6 mb-4 shadow-xl xl:col-span-3">
|
||||
<Badges />
|
||||
<Bookings />
|
||||
</div>
|
||||
<div className="card bg-base-200 col-span-6 mb-4 shadow-xl xl:col-span-3">
|
||||
<Bookings />
|
||||
<Badges />
|
||||
</div>
|
||||
</div>
|
||||
<Events />
|
||||
|
||||
Reference in New Issue
Block a user