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 { 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"; const columns: ColumnDef[] = [ { accessorKey: "no", header: "No", cell: ({ row }) => {row.getValue("no")}, }, // { // accessorKey: "title", // header: "Judul Perencanaan", // cell: ({ row }) => {row.getValue("title")}, // }, { accessorKey: "title", header: "Judul Perencanaan", cell: ({ row }) => {row.getValue("title")}, }, { accessorKey: "createdByName", header: "Nama Pembuat", cell: ({ row }) => {row.getValue("createdByName")}, }, { accessorKey: "createdAt", header: "Dibuat", cell: ({ row }) => {row.getValue("createdAt")}, }, { accessorKey: "status", header: "Dibuat", cell: ({ row }) => {row.getValue("status")}, }, { accessorKey: "platformTypeId", header: "Jenis Platform", cell: ({ row }) => {row.getValue("platformTypeId")}, }, { accessorKey: "status", header: "Status", cell: ({ row }) => {row.getValue("status")}, }, { accessorKey: "description", header: "Deskripsi", cell: ({ row }) => {htmlToString(row.getValue("status"))}, }, { id: "actions", accessorKey: "action", header: "Aksi", enableHiding: false, cell: ({ row }) => { return ( Detail ); }, }, ]; export default columns;