diff --git a/src/app/(dashboard)/agents/columns.tsx b/src/app/(dashboard)/agents/columns.tsx index 35456d8..0ce1803 100644 --- a/src/app/(dashboard)/agents/columns.tsx +++ b/src/app/(dashboard)/agents/columns.tsx @@ -4,7 +4,7 @@ import { Column } from "@/components/ui/DataTable"; import { Agent } from "@/lib/actions/agentsCore"; import { Badge } from "@/components/ui/Badge"; import { resolveAgentLabel, type ManagedUser } from "@/lib/admin-api"; -import { Loader2, Trash2, CheckCircle2, XCircle, ChevronRight, UserCog, Eye, MapPin, Network } from "lucide-react"; +import { Loader2, Trash2, CheckCircle2, XCircle, ChevronRight, UserCog, Eye, MapPin, Network, Edit2 } from "lucide-react"; interface GetColumnsProps { role: string | null; @@ -18,6 +18,7 @@ interface GetColumnsProps { handleViewAs: (uuid: string, label: string) => void; openDelete: (agent: Agent) => void; handleEditLocation?: (agentUuid: string, agentLabel: string) => void; + handleEditLabel?: (agentUuid: string, currentLabel: string) => void; handleEditSubnet?: (agentUuid: string, agentLabel: string) => void; /** Set of agent UUIDs that already have a location saved */ locationUuids?: Set; @@ -35,6 +36,7 @@ export function getAgentColumns({ handleViewAs, openDelete, handleEditLocation, + handleEditLabel, handleEditSubnet, locationUuids = new Set(), }: GetColumnsProps): Column[] { @@ -128,6 +130,15 @@ export function getAgentColumns({ {(role === 'SUPER_ADMIN' || role === 'TENANT_ADMIN') && ( <> + {handleEditLabel && ( + + )}