|
| 1 | +import { Document, Page, Text, View } from "@react-pdf/renderer"; |
| 2 | + |
| 3 | +import { styles } from "./pdfStyles"; |
| 4 | +import { CategorySection } from "./sections/CategorySection"; |
| 5 | +import { PayGapTable } from "./sections/PayGapTable"; |
| 6 | +import { QuartileSection } from "./sections/QuartileSection"; |
| 7 | +import { VariablePaySection } from "./sections/VariablePaySection"; |
| 8 | +import { WorkforceSection } from "./sections/WorkforceSection"; |
| 9 | +import type { DeclarationPdfData } from "./types"; |
| 10 | + |
| 11 | +type Props = { |
| 12 | + data: DeclarationPdfData; |
| 13 | +}; |
| 14 | + |
| 15 | +export function DeclarationPdfDocument({ data }: Props) { |
| 16 | + return ( |
| 17 | + <Document> |
| 18 | + <Page size="A4" style={styles.page}> |
| 19 | + <View style={styles.header}> |
| 20 | + <Text style={styles.title}> |
| 21 | + Déclaration des indicateurs de rémunération {data.year} |
| 22 | + </Text> |
| 23 | + <Text style={styles.subtitle}> |
| 24 | + Au titre des données {data.year - 1} |
| 25 | + </Text> |
| 26 | + <Text style={styles.companyInfo}> |
| 27 | + {data.companyName} — SIREN {data.siren} |
| 28 | + </Text> |
| 29 | + </View> |
| 30 | + |
| 31 | + <WorkforceSection data={data} /> |
| 32 | + <PayGapTable rows={data.step2Rows} title="Écart de rémunération" /> |
| 33 | + <VariablePaySection data={data} /> |
| 34 | + <QuartileSection data={data} /> |
| 35 | + <CategorySection data={data} /> |
| 36 | + |
| 37 | + <Text style={styles.footer}>Document généré le {data.generatedAt}</Text> |
| 38 | + </Page> |
| 39 | + </Document> |
| 40 | + ); |
| 41 | +} |
0 commit comments