update routes
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
|
||||
import { type ColumnDef } from '@tanstack/react-table'
|
||||
|
||||
import { EllipsisVerticalIcon } from 'lucide-react'
|
||||
|
||||
import { Button } from '@repo/ui/components/ui/button'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger
|
||||
} from '@repo/ui/components/ui/dropdown-menu'
|
||||
import { Abbr } from '@repo/ui/components/abbr'
|
||||
import { Avatar, AvatarFallback } from '@repo/ui/components/ui/avatar'
|
||||
import { initials } from '@repo/ui/lib/utils'
|
||||
@@ -13,6 +21,8 @@ import {
|
||||
} from '@repo/ui/components/data-table'
|
||||
import type { Org } from '@repo/ui/routes/orgs/data'
|
||||
|
||||
import { CopyToClipboardItem } from '../_app.users._index/columns'
|
||||
|
||||
export type { Org }
|
||||
|
||||
export const columns: ColumnDef<Org>[] = [
|
||||
@@ -53,5 +63,31 @@ export const columns: ColumnDef<Org>[] = [
|
||||
accessorKey: 'createDate',
|
||||
header: 'Cadastrado em',
|
||||
cell: DataTableColumnDatetime
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
cell: ActionMenu
|
||||
}
|
||||
]
|
||||
|
||||
function ActionMenu({ row }: { row: any }) {
|
||||
return (
|
||||
<div className="flex justify-end items-center">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="data-[state=open]:bg-muted text-muted-foreground cursor-pointer"
|
||||
size="icon-sm"
|
||||
>
|
||||
<EllipsisVerticalIcon />
|
||||
<span className="sr-only">Abrir menu</span>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" className="w-36 *:cursor-pointer">
|
||||
<CopyToClipboardItem text={row.id} />
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user