import * as React from "react"; import { ColumnDef } from "@tanstack/react-table"; import { Eye, MoreVertical, SquarePen, Trash2 } from "lucide-react"; import { cn } from "@/lib/utils"; import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, DropdownMenuItem, } from "@/components/ui/dropdown-menu"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { formatDateToIndonesian, getOnlyDate, htmlToString, } from "@/utils/globals"; import { Link, useRouter } from "@/i18n/routing"; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "@/components/ui/accordion"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Collapsible, CollapsibleContent } from "@/components/ui/collapsible"; import StatusToogle from "./status-toogle"; import StaticToogle from "./static-toogle"; const columns: ColumnDef[] = [ // { // accessorKey: "no", // header: "No", // cell: ({ row }) => {row.getValue("no")}, // }, { accessorKey: "title", header: "Judul", cell: ({ row }) => {row.getValue("title")}, }, { accessorKey: "categoryName", header: "Kategori", cell: ({ row }) => {row.getValue("categoryName")}, }, { accessorKey: "createdAt", header: "Tanggal Unggah", cell: ({ row }) => ( {formatDateToIndonesian(row.getValue("createdAt"))} ), }, { accessorKey: "isStaticBanner", header: "Static Banner", cell: ({ row }) => ( ), }, { accessorKey: "statusName", header: "Status Banner", cell: ({ row }) => ( ), }, { id: "actions", accessorKey: "action", header: "Actions", enableHiding: false, cell: ({ row }) => { return ( Detail ); }, }, ]; export default columns;