From b95c045aecc22ccb3ad5e1104adc12cb1c2ddf93 Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Tue, 23 Jun 2026 00:42:10 +0000 Subject: [PATCH] =?UTF-8?q?Compacta=C3=A7=C3=A3o=20final=20do=20relatorio?= =?UTF-8?q?=20para=20folha=20A4=20e=20Correcao=20do=20PDF=20(DarkMode=20te?= =?UTF-8?q?xt)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ReportDisplay.tsx | 130 +++++++++++++++++------------------ services/pdfService.ts | 1 + 2 files changed, 66 insertions(+), 65 deletions(-) diff --git a/components/ReportDisplay.tsx b/components/ReportDisplay.tsx index f97be7b..9ee7be7 100644 --- a/components/ReportDisplay.tsx +++ b/components/ReportDisplay.tsx @@ -33,36 +33,36 @@ export const ReportDisplay: React.FC = ({ report }) => { const confidence = report?.confidence || 0; return ( -
+
{/* Cabeçalho (Header) */} -
-
-
+
+
+
{/* Logo SteelCheck com visual geométrico */} -
- STEEL CHECK - IA Quality Report +
+ STEEL CHECK + IA Quality Report
-

Relatório Técnico de Qualidade

-

Análise de conformidade normativa assistida por inteligência artificial

+

Relatório Técnico de Qualidade

+

Análise de conformidade normativa assistida por inteligência artificial

-
+
{/* Status Global de Conformidade */}
- Status Geral -
- - {compliance.status} + Status Geral +
+ + {compliance.status}
{/* Score de Confiança da IA */}
- Confiança da Análise -
- {confidence}% IA-Score + Confiança +
+ {confidence}% IA-Score
@@ -70,52 +70,52 @@ export const ReportDisplay: React.FC = ({ report }) => {
{/* Conteúdo Principal */} -
+
{/* Seção 1: Dados de Identificação */} -
-

+
+

1. Identificação do Produto e Lote

-
+
- Produto - {identification.product || '-'} + Produto + {identification.product || '-'}
- Norma de Referência - {identification.standards || '-'} + Norma de Referência + {identification.standards || '-'}
- Fabricante - {identification.manufacturer || '-'} + Fabricante + {identification.manufacturer || '-'}
- Nº do Certificado - #{identification.certificateNumber || '-'} + Nº do Certificado + #{identification.certificateNumber || '-'}
-
- Data de Emissão - {identification.certificateDate || '-'} +
+ Data de Emissão + {identification.certificateDate || '-'}
-
- Lote analisado - {identification.batches || '-'} +
+ Lote analisado + {identification.batches || '-'}
-
- Corrida (Heat) - {identification.heats || '-'} +
+ Corrida (Heat) + {identification.heats || '-'}
-
- Massa Total - {identification.quantity || '-'} +
+ Massa Total + {identification.quantity || '-'}
- {/* Seção 2: Verificação de Conformidade */} -
+ {/* Seções 2 e 3: Propriedades (Lado a Lado no Desktop) */} +
{/* Propriedades Mecânicas (Esquerda) */}
@@ -123,15 +123,15 @@ export const ReportDisplay: React.FC = ({ report }) => { 2. Propriedades Mecânicas

-
+
- - - - + + + + @@ -140,17 +140,17 @@ export const ReportDisplay: React.FC = ({ report }) => { const diffColor = isPositive ? 'text-emerald-600 dark:text-emerald-400' : 'text-rose-600 dark:text-rose-400'; return ( - - - + - @@ -177,25 +177,25 @@ export const ReportDisplay: React.FC = ({ report }) => { 3. Composição Química (%) -
+
PropriedadeCertificado% Rel.StatusPropriedadeCertificado% Rel.Status
- {item.property} + + {item.property} {item.certificate} + {item.certificate} {item.differencePercentage ? ( - {item.differencePercentage} + {item.differencePercentage} ) : -} - + + {statusIcon(item.status)} {item.status}
- - - - + + + + {compliance.chemical.map((item, i) => ( - - - - + + + diff --git a/services/pdfService.ts b/services/pdfService.ts index 7925c42..db388e8 100644 --- a/services/pdfService.ts +++ b/services/pdfService.ts @@ -19,6 +19,7 @@ export const exportAsPdf = async (elementId: string, fileName: string, action: ' const isDark = document.documentElement.classList.contains('dark'); if (isDark) { document.documentElement.classList.remove('dark'); + await new Promise(resolve => setTimeout(resolve, 100)); // Allow CSS to recompute } const pdf = new jsPDF({
Elem.Norma de ReferênciaValor CertificadoStatusElem.Norma de ReferênciaValor CertificadoStatus
{item.element}{item.norm}{item.certificate} - + {item.element}{item.norm}{item.certificate} + {item.status}