diff --git a/src/app/dashboard/reservations/page.tsx b/src/app/dashboard/reservations/page.tsx index 6d67570..e64f989 100644 --- a/src/app/dashboard/reservations/page.tsx +++ b/src/app/dashboard/reservations/page.tsx @@ -8,11 +8,12 @@ import { TableRow, } from "@/components/ui/table" import { Button } from "@/components/ui/button" -import { Plus, Calendar as CalendarIcon } from "lucide-react" +import { Plus, Calendar as CalendarIcon, Clock, MapPin, User, Package } from "lucide-react" import Link from "next/link" import { format } from "date-fns" import { tr } from "date-fns/locale" import { Badge } from "@/components/ui/badge" +import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card" export default async function ReservationsPage() { const supabase = await createClient() @@ -41,24 +42,25 @@ export default async function ReservationsPage() { } return ( -
-
+
+

Rezervasyonlar

-
- - - -
-
+ {/* Desktop View */} +
@@ -95,7 +97,9 @@ export default async function ReservationsPage() { {getStatusBadge(res.status || 'pending')} - + + + )) @@ -103,6 +107,52 @@ export default async function ReservationsPage() {
+ + {/* Mobile View */} +
+ {reservations?.length === 0 ? ( +
+ Henüz rezervasyon yok. +
+ ) : ( + reservations?.map((res) => ( + + + + {format(new Date(res.start_time), 'd MMMM yyyy', { locale: tr })} + + {getStatusBadge(res.status || 'pending')} + + +
+ + {format(new Date(res.start_time), 'HH:mm')} - {format(new Date(res.end_time), 'HH:mm')} +
+
+ + {res.halls?.name} +
+
+ + {res.customers?.full_name} +
+ {res.packages?.name && ( +
+ + {res.packages.name} + {res.packages.price && (₺{res.packages.price})} +
+ )} +
+ + + + + +
+ )) + )} +
) }