Machines: show 'Usuários vinculados' in details; Cards show linked user chip; Users editor shows 'Máquinas vinculadas' via Convex listByTenant filter
This commit is contained in:
parent
af0658af26
commit
6653ef250e
1 changed files with 14 additions and 0 deletions
|
|
@ -1857,6 +1857,20 @@ export function MachineDetails({ machine }: MachineDetailsProps) {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section className="space-y-2">
|
||||||
|
<h4 className="text-sm font-semibold">Usuários vinculados</h4>
|
||||||
|
{collaborator?.email ? (
|
||||||
|
<div className="flex flex-wrap items-center gap-2 rounded-md border border-slate-200 bg-slate-50/80 px-3 py-2 text-sm">
|
||||||
|
<ShieldCheck className="size-4 text-slate-500" />
|
||||||
|
<span className="font-medium text-neutral-800">{collaborator.name || collaborator.email}</span>
|
||||||
|
<span className="text-neutral-500">{collaborator.name ? `· ${collaborator.email}` : ''}</span>
|
||||||
|
<Link href="/admin" className="ml-auto text-xs underline underline-offset-4">gerenciar usuários</Link>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<p className="text-xs text-neutral-500">Nenhum usuário vinculado. Use “Ajustar acesso” para associar um colaborador/gestor.</p>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
{/* Renomear máquina */}
|
{/* Renomear máquina */}
|
||||||
<Dialog open={renaming} onOpenChange={setRenaming}>
|
<Dialog open={renaming} onOpenChange={setRenaming}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue