From 51ce3e61c7d58293958d6882c3e655d788f6dadd Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Fri, 5 Dec 2025 13:40:18 -0300 Subject: [PATCH] Fix emprestimos page accents and table layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix Portuguese accents in UI text (devolucao -> devolução, emprestimo -> empréstimo, etc.) - Restructure table to always show header with fixed column widths - Move empty state inside TableBody with colSpan to maintain layout consistency - Column widths now stay consistent regardless of filter selection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../emprestimos/emprestimos-page-client.tsx | 102 +++++++++--------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/src/app/emprestimos/emprestimos-page-client.tsx b/src/app/emprestimos/emprestimos-page-client.tsx index 8b63966..b401088 100644 --- a/src/app/emprestimos/emprestimos-page-client.tsx +++ b/src/app/emprestimos/emprestimos-page-client.tsx @@ -358,14 +358,14 @@ export function EmprestimosPageClient() { observacoes: observacoes || undefined, }), { - loading: "Registrando devolucao...", + loading: "Registrando devolução...", success: (result) => { if (result.multaCalculada) { - return `Emprestimo devolvido com multa de R$ ${result.multaCalculada.toFixed(2)}.` + return `Empréstimo devolvido com multa de R$ ${result.multaCalculada.toFixed(2)}.` } - return "Emprestimo devolvido com sucesso." + return "Empréstimo devolvido com sucesso." }, - error: "Falha ao registrar devolucao.", + error: "Falha ao registrar devolução.", } ) }, [selectedEmprestimoId, convexUserId, formObservacoes, devolverEmprestimo]) @@ -508,51 +508,54 @@ export function EmprestimosPageClient() { {/* Table Section */}
- {emprestimos && filteredEmprestimos.length === 0 ? ( - - - - - - Nenhum emprestimo encontrado - - Ajuste os filtros ou crie um novo emprestimo para comecar. - - - - ) : ( -
- - - - Ref - Cliente - Responsavel - Equipamentos - Emprestimo - Prevista - Status - Valor - Acoes +
+
+ + + Ref + Cliente + Responsável + Equipamentos + Empréstimo + Prevista + Status + Valor + Ações + + + + {!emprestimos ? ( + // Skeleton rows durante o loading + Array.from({ length: 5 }).map((_, idx) => ( + + + + + + + + + + + + )) + ) : filteredEmprestimos.length === 0 ? ( + + + + + + + + Nenhum empréstimo encontrado + + Ajuste os filtros ou crie um novo empréstimo para começar. + + + + - - - {!emprestimos ? ( - // Skeleton rows durante o loading - Array.from({ length: 5 }).map((_, idx) => ( - - - - - - - - - - - - )) - ) : filteredEmprestimos.map((emp) => ( + ) : filteredEmprestimos.map((emp) => (
- )}
{/* Create Dialog */} @@ -829,7 +831,7 @@ export function EmprestimosPageClient() {