refactor(FE): Remove header cell bottom and right borders in PDF export

This commit is contained in:
rstubryan
2026-01-19 14:27:27 +07:00
parent 366864582f
commit 200290a0b3
@@ -246,7 +246,7 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2 }]}>
<Text>HPP Telur (RP/KG)</Text>
</View>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2 }]}>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2, borderRightWidth: 0 }]}>
<Text>Nominal Sisa</Text>
</View>
</View>
@@ -301,7 +301,7 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<Text>{formatCurrency(group.egg_hpp_rp_per_kg)}</Text>
</View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<View style={[pdfStyles.tableCellRight, { flex: 1.2, borderRightWidth: 0 }]}>
<Text>{formatCurrency(group.egg_value_rp)}</Text>
</View>
</View>
@@ -347,7 +347,7 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1 }]}>
<Text>HPP Telur (RP/KG)</Text>
</View>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2 }]}>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2, borderRightWidth: 0 }]}>
<Text>Nominal Sisa</Text>
</View>
</View>
@@ -405,7 +405,7 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
<Text>{formatCurrency(item.egg_hpp_rp_per_kg)}</Text>
</View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<View style={[pdfStyles.tableCellRight, { flex: 1.2, borderRightWidth: 0 }]}>
<Text>{formatCurrency(item.egg_value_rp)}</Text>
</View>
</View>
@@ -417,7 +417,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeader,
{ flex: 0.5, backgroundColor: '#F5F5F5' },
{ flex: 0.5, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>TOTAL</Text>
@@ -425,7 +425,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeader,
{ flex: 1.5, backgroundColor: '#F5F5F5' },
{ flex: 1.5, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>ALL</Text>
@@ -433,7 +433,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeader,
{ flex: 1, backgroundColor: '#F5F5F5' },
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>-</Text>
@@ -441,7 +441,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1, backgroundColor: '#F5F5F5' },
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -451,7 +451,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 0.8, backgroundColor: '#F5F5F5' },
{ flex: 0.8, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -463,7 +463,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 0.8, backgroundColor: '#F5F5F5' },
{ flex: 0.8, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -473,7 +473,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeader,
{ flex: 1.2, backgroundColor: '#F5F5F5' },
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -484,14 +484,17 @@ const createPDFDocument = (
s.alias || s.name
)
)
.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i)
.filter(
(v: string, i: number, a: string[]) =>
a.indexOf(v) === i
)
.join(' | ') || '-'}
</Text>
</View>
<View
style={[
pdfStyles.tableCellHeader,
{ flex: 1, backgroundColor: '#F5F5F5' },
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -502,14 +505,17 @@ const createPDFDocument = (
s.alias || s.name
)
)
.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i)
.filter(
(v: string, i: number, a: string[]) =>
a.indexOf(v) === i
)
.join(' | ') || '-'}
</Text>
</View>
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1.2, backgroundColor: '#F5F5F5' },
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -521,7 +527,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1, backgroundColor: '#F5F5F5' },
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 },
]}
>
<Text>
@@ -533,7 +539,7 @@ const createPDFDocument = (
<View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1.2, backgroundColor: '#F5F5F5' },
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0, borderRightWidth: 0 },
]}
>
<Text>