diff --git a/src/components/pdf/SuitablePdf.tsx b/src/components/pdf/SuitablePdf.tsx index e27a31f..e82c1e9 100644 --- a/src/components/pdf/SuitablePdf.tsx +++ b/src/components/pdf/SuitablePdf.tsx @@ -10,45 +10,127 @@ Font.register({ const styles = StyleSheet.create({ page: { - padding: 30, - fontSize: 10, + maxWidth: 840, + minWidth: 840, + margin: '0 auto', + padding: 20, fontFamily: 'NotoSansJP', }, - text: { + introPage: { + height: 550, + padding: '60 20', + }, + introTitWrap: { + textAlign: 'center', + marginBottom: 70, + }, + introTit: { + fontSize: 18, + fontWeight: 500, + color: '#101010', fontFamily: 'NotoSansJP', + marginBottom: 20, + }, + introDate: { + fontSize: 16, + fontWeight: 400, + color: '#101010', + fontFamily: 'NotoSansJP', + }, + introContText: { + fontSize: 13, + fontWeight: 400, + color: '#101010', + fontFamily: 'NotoSansJP', + }, + tableGridWrap: { + display: 'flex', + flexWrap: 'wrap', + flexDirection: 'row', + gap: 20 + }, + tableCard:{ + width: '48.7%', + }, + tableTitWrap: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + marginBottom: 5, + }, + tableTit:{ + fontSize: 8, + fontWeight: 500, + fontFamily: 'NotoSansJP', + color: '#101010', + }, + tableTit01: { + paddingRight: 6, + borderRight: '1px solid #101010' + }, + tableTit02: { + padding: '0 6', + borderRight: '1px solid #101010' + }, + tableTit03: { + paddingLeft: 6, }, table: { display: 'flex', - width: 'auto', - borderStyle: 'solid', - borderWidth: 1, - borderColor: '#000', + width: '100%', }, tableRow: { flexDirection: 'row', }, - tableColHeader: { - width: '25%', - borderStyle: 'solid', - borderWidth: 1, - backgroundColor: '#f0f0f0', - padding: 2, + tableCol01: { + width: '18%', }, - tableCol: { - width: '25%', - borderStyle: 'solid', - borderWidth: 1, - padding: 2, + tableCol02: { + width: '23%', + }, + tableCol03: { + width: '18%', + }, + tableCol04: { + width: '41%', + }, + tableTh: { + fontSize: 5, + fontWeight: 500, + color: '#fff', + backgroundColor: '#18B490', + border: '1px solid #18B490', + textAlign: 'center' + }, + tableTd: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + fontSize: 5, + fontWeight: 300, + color: '#101010', + backgroundColor: '#fff', + border: '1px solid #CBCBCB', + padding: 3, + }, + marginL:{ + marginLeft: -1, + }, + marginT:{ + marginTop: -1, }, footer: { position: 'absolute', - bottom: 30, + bottom: 5, left: 30, right: 30, }, footerDate: { - fontSize: 10, + fontSize: 7, textAlign: 'right', + fontFamily: 'NotoSansJP', + fontWeight: 400, + color: '#101010', }, }) @@ -70,52 +152,52 @@ export default function SuitablePdf({ data, fileTitle, firstPage }: { data: Suit {/* Intro Section */} {firstPage && ( - - - ハンファジャパン株式会社 - {fileTitle} - {createTime} + + + ハンファジャパン株式会社 + {fileTitle} + {createTime} - 本適合表は参考資料としてご使用下さい。 - 屋根材製品の形状・仕様はメーカーより変更される場合が御座います。 - + 本適合表は参考資料としてご使用下さい。 + 屋根材製品の形状・仕様はメーカーより変更される場合が御座います。 + 又、現場環境(働き、勾配、瓦桟木条件等)により本適合表と異なる適合結果となる場合が御座います。予めご了承下さい。 - 屋根材以外の設置条件(垂木、野地板等の設置基準)も必ずご確認下さい。 + 屋根材以外の設置条件(垂木、野地板等の設置基準)も必ずご確認下さい。 )} - + {/* Cards Section */} {data?.map((item: Suitable) => ( - + {/* Table Title */} - - {item.productName} - {item.manuFtCd} - {item.roofMtCd} + + {item.productName} + {item.manuFtCd} + {item.roofMtCd} {/* Table */} {/* Table Header */} - 金具タイプ - 金具名 - 設置可否 - 備考 + 金具タイプ + 金具名 + 設置可否 + 備考 {/* Table Body */} {JSON.parse(item.detail)?.map((subItem: SuitableDetail) => ( - {item.roofShCd} - {subItem.trestleMfpcCd} - {subItem.trestleManufacturerProductName} - {subItem.memo} + {item.roofShCd} + {subItem.trestleMfpcCd} + {subItem.trestleManufacturerProductName} + {subItem.memo} ))} @@ -126,7 +208,7 @@ export default function SuitablePdf({ data, fileTitle, firstPage }: { data: Suit {/* Footer */} - {createTime} + {createTime} )