54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
|
|
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";
|
||
|
|
|
||
|
|
const columns: ColumnDef<any>[] = [
|
||
|
|
{
|
||
|
|
accessorKey: "no",
|
||
|
|
header: "No",
|
||
|
|
cell: ({ row }) => <span>{row.getValue("no")}</span>,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
accessorKey: "mediaOnline",
|
||
|
|
header: "Media Online",
|
||
|
|
cell: ({ row }) => <span>{row.getValue("categoryName")}</span>,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
accessorKey: "link",
|
||
|
|
header: "Link Berita",
|
||
|
|
cell: ({ row }) => <span>{row.getValue("categoryName")}</span>,
|
||
|
|
},
|
||
|
|
];
|
||
|
|
|
||
|
|
export default columns;
|