Merge pull request 'style: 지붕재 적합성 pdf pub 수정' (#64) from feature/suitable-pub into dev
Reviewed-on: #64
This commit is contained in:
commit
2aef601670
@ -10,45 +10,127 @@ Font.register({
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
page: {
|
page: {
|
||||||
padding: 30,
|
maxWidth: 840,
|
||||||
fontSize: 10,
|
minWidth: 840,
|
||||||
|
margin: '0 auto',
|
||||||
|
padding: 20,
|
||||||
fontFamily: 'NotoSansJP',
|
fontFamily: 'NotoSansJP',
|
||||||
},
|
},
|
||||||
text: {
|
introPage: {
|
||||||
|
height: 550,
|
||||||
|
padding: '60 20',
|
||||||
|
},
|
||||||
|
introTitWrap: {
|
||||||
|
textAlign: 'center',
|
||||||
|
marginBottom: 70,
|
||||||
|
},
|
||||||
|
introTit: {
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: 500,
|
||||||
|
color: '#101010',
|
||||||
fontFamily: 'NotoSansJP',
|
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: {
|
table: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
width: 'auto',
|
width: '100%',
|
||||||
borderStyle: 'solid',
|
|
||||||
borderWidth: 1,
|
|
||||||
borderColor: '#000',
|
|
||||||
},
|
},
|
||||||
tableRow: {
|
tableRow: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
},
|
},
|
||||||
tableColHeader: {
|
tableCol01: {
|
||||||
width: '25%',
|
width: '18%',
|
||||||
borderStyle: 'solid',
|
|
||||||
borderWidth: 1,
|
|
||||||
backgroundColor: '#f0f0f0',
|
|
||||||
padding: 2,
|
|
||||||
},
|
},
|
||||||
tableCol: {
|
tableCol02: {
|
||||||
width: '25%',
|
width: '23%',
|
||||||
borderStyle: 'solid',
|
},
|
||||||
borderWidth: 1,
|
tableCol03: {
|
||||||
padding: 2,
|
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: {
|
footer: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: 30,
|
bottom: 5,
|
||||||
left: 30,
|
left: 30,
|
||||||
right: 30,
|
right: 30,
|
||||||
},
|
},
|
||||||
footerDate: {
|
footerDate: {
|
||||||
fontSize: 10,
|
fontSize: 7,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
|
fontFamily: 'NotoSansJP',
|
||||||
|
fontWeight: 400,
|
||||||
|
color: '#101010',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -70,52 +152,52 @@ export default function SuitablePdf({ data, fileTitle, firstPage }: { data: Suit
|
|||||||
<Page size="A4" orientation="landscape" style={styles.page}>
|
<Page size="A4" orientation="landscape" style={styles.page}>
|
||||||
{/* Intro Section */}
|
{/* Intro Section */}
|
||||||
{firstPage && (
|
{firstPage && (
|
||||||
<View>
|
<View style={styles.introPage}>
|
||||||
<View>
|
<View style={styles.introTitWrap}>
|
||||||
<Text style={styles.text}>ハンファジャパン株式会社</Text>
|
<Text style={styles.introTit}>ハンファジャパン株式会社</Text>
|
||||||
<Text style={styles.text}>{fileTitle}</Text>
|
<Text style={styles.introTit}>{fileTitle}</Text>
|
||||||
<Text style={styles.text}>{createTime}</Text>
|
<Text style={styles.introDate}>{createTime}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
<Text style={styles.text}>本適合表は参考資料としてご使用下さい。</Text>
|
<Text style={styles.introContText}>本適合表は参考資料としてご使用下さい。</Text>
|
||||||
<Text style={styles.text}>屋根材製品の形状・仕様はメーカーより変更される場合が御座います。</Text>
|
<Text style={styles.introContText}>屋根材製品の形状・仕様はメーカーより変更される場合が御座います。</Text>
|
||||||
<Text style={styles.text}>
|
<Text style={styles.introContText}>
|
||||||
又、現場環境(働き、勾配、瓦桟木条件等)により本適合表と異なる適合結果となる場合が御座います。予めご了承下さい。
|
又、現場環境(働き、勾配、瓦桟木条件等)により本適合表と異なる適合結果となる場合が御座います。予めご了承下さい。
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.text}>屋根材以外の設置条件(垂木、野地板等の設置基準)も必ずご確認下さい。</Text>
|
<Text style={styles.introContText}>屋根材以外の設置条件(垂木、野地板等の設置基準)も必ずご確認下さい。</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<View>
|
<View style={styles.tableGridWrap}>
|
||||||
{/* Cards Section */}
|
{/* Cards Section */}
|
||||||
{data?.map((item: Suitable) => (
|
{data?.map((item: Suitable) => (
|
||||||
<View key={item.id}>
|
<View key={item.id} style={styles.tableCard}>
|
||||||
{/* Table Title */}
|
{/* Table Title */}
|
||||||
<View>
|
<View style={styles.tableTitWrap}>
|
||||||
<Text style={styles.text}>{item.productName}</Text>
|
<Text style={[styles.tableTit, styles.tableTit01]}>{item.productName}</Text>
|
||||||
<Text style={styles.text}>{item.manuFtCd}</Text>
|
<Text style={[styles.tableTit, styles.tableTit02]}>{item.manuFtCd}</Text>
|
||||||
<Text style={styles.text}>{item.roofMtCd}</Text>
|
<Text style={[styles.tableTit, styles.tableTit03]}>{item.roofMtCd}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Table */}
|
{/* Table */}
|
||||||
<View style={styles.table}>
|
<View style={styles.table}>
|
||||||
{/* Table Header */}
|
{/* Table Header */}
|
||||||
<View style={styles.tableRow}>
|
<View style={styles.tableRow}>
|
||||||
<Text style={[styles.tableColHeader, styles.text]}>金具タイプ</Text>
|
<Text style={[styles.tableCol01, styles.tableTh]}>金具タイプ</Text>
|
||||||
<Text style={[styles.tableColHeader, styles.text]}>金具名</Text>
|
<Text style={[styles.tableCol02, styles.tableTh , styles.marginL]}>金具名</Text>
|
||||||
<Text style={[styles.tableColHeader, styles.text]}>設置可否</Text>
|
<Text style={[styles.tableCol03, styles.tableTh, styles.marginL]}>設置可否</Text>
|
||||||
<Text style={[styles.tableColHeader, styles.text]}>備考</Text>
|
<Text style={[styles.tableCol04 , styles.tableTh, styles.marginL]}>備考</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Table Body */}
|
{/* Table Body */}
|
||||||
<View>
|
<View>
|
||||||
{JSON.parse(item.detail)?.map((subItem: SuitableDetail) => (
|
{JSON.parse(item.detail)?.map((subItem: SuitableDetail) => (
|
||||||
<View key={subItem.id} style={styles.tableRow}>
|
<View key={subItem.id} style={styles.tableRow}>
|
||||||
<Text style={[styles.tableCol, styles.text]}>{item.roofShCd}</Text>
|
<View style={[styles.tableCol01, styles.tableTd, styles.marginT]}><Text>{item.roofShCd}</Text></View>
|
||||||
<Text style={[styles.tableCol, styles.text]}>{subItem.trestleMfpcCd}</Text>
|
<View style={[styles.tableCol02, styles.tableTd, styles.marginL, styles.marginT]}><Text>{subItem.trestleMfpcCd}</Text></View>
|
||||||
<Text style={[styles.tableCol, styles.text]}>{subItem.trestleManufacturerProductName}</Text>
|
<View style={[styles.tableCol03, styles.tableTd, styles.marginL, styles.marginT]}><Text>{subItem.trestleManufacturerProductName}</Text></View>
|
||||||
<Text style={[styles.tableCol, styles.text]}>{subItem.memo}</Text>
|
<View style={[styles.tableCol04, styles.tableTd, styles.marginL, styles.marginT]}><Text>{subItem.memo}</Text></View>
|
||||||
</View>
|
</View>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
@ -126,7 +208,7 @@ export default function SuitablePdf({ data, fileTitle, firstPage }: { data: Suit
|
|||||||
|
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
<View style={styles.footer} fixed>
|
<View style={styles.footer} fixed>
|
||||||
<Text style={[styles.footerDate, styles.text]}>{createTime}</Text>
|
<Text style={styles.footerDate}>{createTime}</Text>
|
||||||
</View>
|
</View>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user