UI: Remove No account yet badge from Agents table

This commit is contained in:
ypratama committed 2026-09-02 17:43:06 +07:00
1 parent 973ac7d264
commit 3c2dc831a1
1 file changed
-4
-4
View File
@@ -57,7 +57,6 @@ export function getAgentColumns({
accessor: (row) => { accessor: (row) => {
const uuid = row.uuid || row.serial; const uuid = row.uuid || row.serial;
const dynamicLabel = resolveAgentLabel(uuid, managedUsers); const dynamicLabel = resolveAgentLabel(uuid, managedUsers);
const hasAccount = managedUsers.some(u => u.agent_uuid === uuid && u.role === 'AGENT_VIEWER');
const displayLabel = dynamicLabel !== uuid ? dynamicLabel : (row.label || uuid); const displayLabel = dynamicLabel !== uuid ? dynamicLabel : (row.label || uuid);
return ( return (
<div className="flex items-center justify-center gap-2 mx-auto max-w-full"> <div className="flex items-center justify-center gap-2 mx-auto max-w-full">
@@ -68,9 +67,6 @@ export function getAgentColumns({
> >
{dynamicLabel !== uuid ? dynamicLabel : (row.label || <span className="text-muted-foreground italic font-mono text-xs">{uuid}</span>)} {dynamicLabel !== uuid ? dynamicLabel : (row.label || <span className="text-muted-foreground italic font-mono text-xs">{uuid}</span>)}
</button> </button>
{!hasAccount && (role === 'SUPER_ADMIN' || role === 'TENANT_ADMIN') && (
<Badge variant="orange" className="text-[10px] px-1.5 py-0.5 font-semibold shrink-0 whitespace-nowrap">No account yet</Badge>
)}
</div> </div>
); );
} }