feat: correcao de deteccao de monopeças no conversor e estilizacao de pecas simples na tabela

This commit is contained in:
2026-09-16 17:52:48 +00:00
parent 2b19a0d443
commit 5168ef3d61
6 changed files with 39 additions and 31 deletions
@@ -72,8 +72,8 @@ export function TableHeaderSortable({
<SortButton field="prioridade">Prioridade</SortButton>
</TableHead>
<TableHead className="w-16 px-2 text-center">
<SortButton field="tem_componentes">Tipo / {labels.componenteLabel}</SortButton>
<TableHead className="w-24 px-2 text-center">
<SortButton field="tem_componentes">Componentes</SortButton>
</TableHead>
<TableHead className="w-12 px-2 text-right">
+9 -5
View File
@@ -13,7 +13,8 @@ import {
ChevronDown,
Layers,
Loader2,
ExternalLink
ExternalLink,
Minus
} from 'lucide-react';
import { Peca } from '@/hooks/usePecas';
import { useComponentesPeca } from '@/hooks/useComponentesPeca';
@@ -110,11 +111,14 @@ export function TableRow({
<PriorityBadge prioridade={peca.prioridade as any} />
</TableCell>
<TableCell className="w-16 px-2 text-center">
<div className="flex justify-center">
<TableCell className="w-24 px-2 text-center">
<div className="flex justify-center items-center">
{!peca.tem_componentes ? (
<div className="flex items-center justify-center w-5 h-5 bg-green-500 rounded-full shadow-sm" title="Monopeça (sem componentes)">
<Check className="h-3 w-3 text-white font-bold" />
<div
className="flex items-center justify-center w-5 h-5 rounded-full bg-slate-800/90 border border-slate-700 text-slate-400 shadow-sm"
title="Peça única (sem componentes)"
>
<Minus className="h-3 w-3 text-slate-400 font-bold" />
</div>
) : (
<div