From b5b74a674d302311944b1ce3f071c021ef6ee5ae Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Fri, 5 Dec 2025 13:44:55 -0300 Subject: [PATCH] Fix emprestimos table column widths consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use colgroup with fixed pixel widths instead of percentages - Add tableLayout: fixed with minWidth for stable layout - Add truncate to cells to prevent content overflow - Show placeholder in Actions column for non-active items - Column widths now stay consistent across all filter states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../emprestimos/emprestimos-page-client.tsx | 51 ++++++++++++------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/src/app/emprestimos/emprestimos-page-client.tsx b/src/app/emprestimos/emprestimos-page-client.tsx index b401088..c02084c 100644 --- a/src/app/emprestimos/emprestimos-page-client.tsx +++ b/src/app/emprestimos/emprestimos-page-client.tsx @@ -509,18 +509,29 @@ export function EmprestimosPageClient() { {/* Table Section */}
- +
+ + + + + + + + + + + - Ref - Cliente - Responsável - Equipamentos - Empréstimo - Prevista - Status - Valor - Ações + Ref + Cliente + Responsável + Equipamentos + Empréstimo + Prevista + Status + Valor + Ações @@ -561,10 +572,10 @@ export function EmprestimosPageClient() { className="cursor-pointer transition-colors hover:bg-cyan-50/30" onClick={() => openDetailsDialog(emp)} > - #{emp.reference} - {emp.clienteNome} - {emp.responsavelNome} - + #{emp.reference} + {emp.clienteNome} + {emp.responsavelNome} + {emp.quantidade} item(s):{" "} {emp.equipamentos @@ -574,20 +585,20 @@ export function EmprestimosPageClient() { {emp.equipamentos.length > 2 && "..."} - + {format(new Date(emp.dataEmprestimo), "dd/MM/yyyy", { locale: ptBR })} - + {format(new Date(emp.dataFimPrevisto), "dd/MM/yyyy", { locale: ptBR })} - {getStatusText(emp.status, emp.dataFimPrevisto)} - + {getStatusText(emp.status, emp.dataFimPrevisto)} + {emp.valor ? `R$ ${emp.valor.toLocaleString("pt-BR", { minimumFractionDigits: 2 })}` : "—"} - {emp.status === "ATIVO" && ( + {emp.status === "ATIVO" ? ( + ) : ( + — )}