import type { ColumnDef } from "@tanstack/react-table"; import { Checkbox } from "~/components/ui/checkbox"; import { CellAction } from "./cell-action"; import { toLocaleDateTime } from "~/utils/format-to-locale-time"; import toRupiah from "~/utils/to-rupiah"; import type { PemilikPelaksanaResponse } from "~/types/api/pemilik-pelaksana"; export const columns: ColumnDef[] = [ { id: "select", header: ({ table }) => ( table.toggleAllPageRowsSelected(!!value)} /> ), cell: ({ row }) => ( row.toggleSelected(!!value)} /> ), enableSorting: false, enableHiding: false, }, { accessorKey: "created_at", header: "TANGGAL PERMINTAAN", cell: ({ row }) => { return {toLocaleDateTime(row.original.created_at)}; }, }, { accessorKey: "nama", header: "NAMA ANGGOTA", }, { accessorKey: "nominal", header: "NOMINAL", cell: ({ row }) => { return (
{toRupiah(row.original.nominal)} {/* {row.original.nama_bank} */}
); }, }, { accessorKey: "jenis", header: "JENIS TRANSAKSI", }, { accessorKey: "status", header: "STATUS", cell: ({ row }) => { return ( {row.original.status} ); }, }, { id: "actions", header: "AKSI", cell: ({ row }) => , }, ];