Deploy Inicial do SteelCheck com Docker Build Automatizado
This commit is contained in:
@@ -3,22 +3,22 @@ import type { ReportData } from '../types';
|
||||
import { ReportDisplay } from './ReportDisplay';
|
||||
|
||||
interface PrintableReportProps {
|
||||
report: ReportData;
|
||||
reports: ReportData[];
|
||||
}
|
||||
|
||||
export const PrintableReport: React.FC<PrintableReportProps> = ({ report }) => {
|
||||
// To ensure the generated PDF is strictly in light mode, we can wrap it in a container
|
||||
// that forces light theme classes, but since html2canvas evaluates computed styles,
|
||||
// it's best to ensure it renders offscreen without "dark" class in its hierarchy.
|
||||
// The 'light' class can help if tailwind 'dark' strategy is class-based.
|
||||
export const PrintableReport: React.FC<PrintableReportProps> = ({ reports }) => {
|
||||
return (
|
||||
<div
|
||||
id="printable-report-container"
|
||||
data-report={JSON.stringify(report)}
|
||||
className="light bg-white text-slate-900"
|
||||
style={{ width: '210mm', minHeight: '297mm', background: 'white' }}
|
||||
data-report={JSON.stringify(reports)}
|
||||
className="light bg-white text-slate-900 flex flex-col gap-[20mm]"
|
||||
style={{ width: '210mm', background: 'white' }}
|
||||
>
|
||||
<ReportDisplay report={report} />
|
||||
{reports.map((report, idx) => (
|
||||
<div key={idx} className="report-page" style={{ minHeight: '297mm' }}>
|
||||
<ReportDisplay report={report} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -141,9 +141,9 @@ export const ReportDisplay: React.FC<ReportDisplayProps> = ({ report }) => {
|
||||
return (
|
||||
<tr key={i}>
|
||||
<td className="py-2.5 px-2 truncate">
|
||||
<span className="font-semibold block text-slate-800 dark:text-slate-200" title={item.property}>{item.property}</span>
|
||||
<span className="font-medium text-[10px] block text-slate-800 dark:text-slate-200" title={item.property}>{item.property}</span>
|
||||
</td>
|
||||
<td className="py-2.5 px-1 font-mono font-bold text-slate-700 dark:text-slate-300 truncate" title={item.certificate}>{item.certificate}</td>
|
||||
<td className="py-2.5 px-1 font-mono font-bold text-[10px] text-slate-700 dark:text-slate-300 truncate" title={item.certificate}>{item.certificate}</td>
|
||||
<td className="py-2.5 px-1 text-center truncate">
|
||||
{item.differencePercentage ? (
|
||||
<span className={`text-[9px] font-bold ${diffColor}`}>{item.differencePercentage}</span>
|
||||
@@ -191,9 +191,9 @@ export const ReportDisplay: React.FC<ReportDisplayProps> = ({ report }) => {
|
||||
<tbody className="divide-y divide-slate-50 dark:divide-slate-800/50 font-mono">
|
||||
{compliance.chemical.map((item, i) => (
|
||||
<tr key={i}>
|
||||
<td className="py-2 px-2 font-sans font-semibold text-slate-800 dark:text-slate-200 truncate" title={item.element}>{item.element}</td>
|
||||
<td className="py-2 px-2 font-sans font-medium text-[10px] text-slate-800 dark:text-slate-200 truncate" title={item.element}>{item.element}</td>
|
||||
<td className="py-2 px-1 text-slate-400 dark:text-slate-500 text-[9px] leading-tight truncate" title={item.norm}>{item.norm}</td>
|
||||
<td className="py-2 px-1 font-bold text-slate-700 dark:text-slate-300 truncate" title={item.certificate}>{item.certificate}</td>
|
||||
<td className="py-2 px-1 font-bold text-[10px] text-slate-700 dark:text-slate-300 truncate" title={item.certificate}>{item.certificate}</td>
|
||||
<td className="py-2 px-1 text-right">
|
||||
<span className={`inline-flex items-center text-[9px] font-bold px-1.5 py-0.5 rounded ${statusClass(item.status)}`}>
|
||||
{item.status}
|
||||
|
||||
Reference in New Issue
Block a user