import { Link } from "react-router-dom"; import { ArrowRight, ExternalLink } from "lucide-react"; import { Badge, Button, Group, Stack, Text } from "@mantine/core"; import { SchedulingStatusBadge } from "@/components/trainScheduling/ScheduleStatusBadge"; import type { BookingListRow } from "@/types/booking"; import { DataTable, type ColumnDef } from "@edr/ui-common"; export function OperationsScheduledBookings({ bookings, isLoading, }: { bookings: BookingListRow[]; isLoading?: boolean; }) { const columns: ColumnDef[] = [ { id: "reference", header: "Booking", cell: ({ row }) => ( {row.original.reference} {row.original.isGovernment ? ( Government ) : null} {row.original.customerLabel} ), }, { id: "route", header: "Route", cell: ({ row }) => ( {row.original.originLabel} {row.original.destinationLabel} ), }, { id: "scheduled", header: "Scheduled", cell: ({ row }) => ( {String(row.original.scheduledDate).slice(0, 16)} ), }, { id: "status", header: "Scheduling", cell: ({ row }) => row.original.schedulingStatus ? ( ) : ( ), }, { id: "actions", header: "", cell: ({ row }) => ( {row.original.trainScheduleId ? ( ) : null} ), }, ]; return ( ); }