import type { DoctorListData } from "@/features/doctor/lib/data"; import formatPhone from "@/shared/lib/formatPhone"; import { Button } from "@/shared/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "@/shared/ui/dropdown-menu"; import type { ColumnDef } from "@tanstack/react-table"; import { Edit, EllipsisVertical, Eye } from "lucide-react"; import type { NavigateFunction } from "react-router-dom"; interface Props { router: NavigateFunction; onDeleteClick: (district: DoctorListData) => void; } export const columns = ({ router }: Props): ColumnDef[] => [ { accessorKey: "id", header: () =>
, cell: ({ row }) => { return
{row.index + 1}
; }, }, { accessorKey: "name", header: () =>
Ismi
, cell: ({ row }) => { return (
{row.original.first_name} {row.original.last_name}
); }, }, { accessorKey: "districtName", header: () =>
Ish joyi
, cell: ({ row }) => { return (
{row.original.work_place}
); }, }, { accessorKey: "phone", header: () =>
Telefon raqami
, cell: ({ row }) => { return (
{formatPhone(row.original.phone_number)}
); }, }, { id: "actions", header: () =>
Amallar
, cell: ({ row }) => { const obj = row.original; return ( {/* */} ); }, }, ];