import { KeenIcon } from '@/components'; import { Button } from '@/components/ui/button'; import { ColumnDef } from '@tanstack/react-table'; import { ArrowUpDown } from 'lucide-react'; import moment from 'moment'; export type Group = { no: number; created_at: Date; name: string; status: string; description: string; }; export const getColumns = (handleUpdate: (data: any) => void): ColumnDef[] => [ { accessorKey: 'no', header: ({ column }) => { return ( ); } }, { accessorKey: 'created_at', header: ({ column }) => { return ( ); }, cell: ({ row }) => moment(row.original.created_at).format('YYYY-MM-DD HH:mm:ss') }, { accessorKey: 'name', header: ({ column }) => { return ( ); } }, { accessorKey: 'status', header: 'Status', cell: ({ row }) => { const isActive = row.original.status === 'Y'; return ( {isActive ? 'Active' : 'inactive'} ); } }, { accessorKey: 'description', header: ({ column }) => { return ( ); } }, { id: 'actions', header: 'Actions', cell: ({ row }) => { const dataMembers = row.original; return ( ); } } ];