🚀 Auto-deploy: BrainWind atualizado em 27/07/2026 23:46:33

This commit is contained in:
2026-07-27 23:46:33 +00:00
parent c2b741bcdf
commit c7d3f267ba
2 changed files with 74 additions and 1 deletions
+34 -1
View File
@@ -64,11 +64,18 @@ export function appendKgf(val: string | number): string {
export interface GenericPDFSection {
title: string;
type: 'table' | 'text' | 'grid';
type: 'table' | 'text' | 'grid' | 'math-card';
content?: string;
tableHeaders?: string[];
tableRows?: (string | number)[][];
gridItems?: { label: string; value: string | number }[];
mathSteps?: {
title: string;
formula: string;
calculation: string;
result: string;
note?: string;
}[];
}
export interface GenericPDFProps {
@@ -240,6 +247,32 @@ const GenericReportDocument = ({ moduleName, sections, wind, sceneImage }: Gener
<Text style={styles.text}>{appendKgf(sec.content)}</Text>
)}
{sec.type === 'math-card' && sec.mathSteps && (
<View style={styles.mathCard}>
{sec.mathSteps.map((step, sIdx) => (
<View key={sIdx} style={{ marginBottom: sIdx < sec.mathSteps!.length - 1 ? 8 : 2 }}>
<Text style={{ fontSize: 9.5, fontWeight: 'bold', color: '#4c1d95', marginBottom: 2 }}>
{step.title}
</Text>
<Text style={{ fontSize: 8.5, fontFamily: 'Roboto', color: '#1e293b', marginBottom: 1 }}>
Fórmula NBR 6123: {step.formula}
</Text>
<Text style={{ fontSize: 8.5, color: '#334155', marginBottom: 1 }}>
Cálculo: {step.calculation}
</Text>
<Text style={{ fontSize: 9, fontWeight: 'bold', color: '#047857', marginBottom: step.note ? 2 : 0 }}>
Resultado: {appendKgf(step.result)}
</Text>
{step.note && (
<Text style={{ fontSize: 7.5, color: '#64748b', fontStyle: 'italic' }}>
Nota: {step.note}
</Text>
)}
</View>
))}
</View>
)}
{sec.type === 'grid' && sec.gridItems && (
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
{sec.gridItems.map((item, i) => (