import { ColumnDef } from "@tanstack/react-table"; import { SquarePen, Trash2, TriangleAlert } from "lucide-react"; import { Checkbox } from "@/components/ui/checkbox"; import { Link } from '@/i18n/routing'; export type DataProps = { id: string | number; phone: string; seller: string; date: string; email: string; store: string; quantity: number; action: React.ReactNode; }; export const columns: ColumnDef[] = [ { id: "select", header: ({ table }) => ( table.toggleAllPageRowsSelected(!!value)} aria-label="Select all" className="bg-default-100" /> ), cell: ({ row }) => (
row.toggleSelected(!!value)} aria-label="Select row" className="bg-default-100" />
), enableSorting: false, enableHiding: false, }, { accessorKey: "seller", header: "Billing Name", cell: ({ row }) => { return (
{row.getValue("seller")}
); }, }, { accessorKey: "phone", header: "Phone", cell: ({ row }) => {row.getValue("phone")}, }, { accessorKey: "email", header: "Email", cell: ({ row }) => {row.getValue("email")}, }, { accessorKey: "date", header: "Create Date", cell: ({ row }) => { return {row.getValue("date")}; }, }, { accessorKey: "quantity", header: "Products", cell: ({ row }) => { return {row.getValue("quantity")}; }, }, { accessorKey: "store", header: "Store", cell: ({ row }) => { return {row.getValue("store")}; }, }, { id: "actions", accessorKey: "action", header: "Actions", enableHiding: false, cell: ({ row }) => { return (
); }, }, ];