refactor(FE): Format style objects in HppPerkandangExport

This commit is contained in:
rstubryan
2026-01-19 14:36:21 +07:00
parent 200290a0b3
commit da040a4f7e
@@ -246,7 +246,12 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2 }]}> <View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2 }]}>
<Text>HPP Telur (RP/KG)</Text> <Text>HPP Telur (RP/KG)</Text>
</View> </View>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2, borderRightWidth: 0 }]}> <View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1.2, borderRightWidth: 0 },
]}
>
<Text>Nominal Sisa</Text> <Text>Nominal Sisa</Text>
</View> </View>
</View> </View>
@@ -301,7 +306,12 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<Text>{formatCurrency(group.egg_hpp_rp_per_kg)}</Text> <Text>{formatCurrency(group.egg_hpp_rp_per_kg)}</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2, borderRightWidth: 0 }]}> <View
style={[
pdfStyles.tableCellRight,
{ flex: 1.2, borderRightWidth: 0 },
]}
>
<Text>{formatCurrency(group.egg_value_rp)}</Text> <Text>{formatCurrency(group.egg_value_rp)}</Text>
</View> </View>
</View> </View>
@@ -347,7 +357,12 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1 }]}> <View style={[pdfStyles.tableCellHeaderRight, { flex: 1 }]}>
<Text>HPP Telur (RP/KG)</Text> <Text>HPP Telur (RP/KG)</Text>
</View> </View>
<View style={[pdfStyles.tableCellHeaderRight, { flex: 1.2, borderRightWidth: 0 }]}> <View
style={[
pdfStyles.tableCellHeaderRight,
{ flex: 1.2, borderRightWidth: 0 },
]}
>
<Text>Nominal Sisa</Text> <Text>Nominal Sisa</Text>
</View> </View>
</View> </View>
@@ -405,7 +420,12 @@ const createPDFDocument = (
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
<Text>{formatCurrency(item.egg_hpp_rp_per_kg)}</Text> <Text>{formatCurrency(item.egg_hpp_rp_per_kg)}</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2, borderRightWidth: 0 }]}> <View
style={[
pdfStyles.tableCellRight,
{ flex: 1.2, borderRightWidth: 0 },
]}
>
<Text>{formatCurrency(item.egg_value_rp)}</Text> <Text>{formatCurrency(item.egg_value_rp)}</Text>
</View> </View>
</View> </View>
@@ -417,7 +437,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeader, pdfStyles.tableCellHeader,
{ flex: 0.5, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 0.5,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text>TOTAL</Text> <Text>TOTAL</Text>
@@ -425,7 +449,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeader, pdfStyles.tableCellHeader,
{ flex: 1.5, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1.5,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text>ALL</Text> <Text>ALL</Text>
@@ -433,7 +461,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeader, pdfStyles.tableCellHeader,
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text>-</Text> <Text>-</Text>
@@ -441,7 +473,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -451,7 +487,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 0.8, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 0.8,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -463,7 +503,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 0.8, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 0.8,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -473,7 +517,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeader, pdfStyles.tableCellHeader,
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1.2,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -494,7 +542,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeader, pdfStyles.tableCellHeader,
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -515,7 +567,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1.2,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -527,7 +583,11 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 1, backgroundColor: '#F5F5F5', borderBottomWidth: 0 }, {
flex: 1,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
},
]} ]}
> >
<Text> <Text>
@@ -539,7 +599,12 @@ const createPDFDocument = (
<View <View
style={[ style={[
pdfStyles.tableCellHeaderRight, pdfStyles.tableCellHeaderRight,
{ flex: 1.2, backgroundColor: '#F5F5F5', borderBottomWidth: 0, borderRightWidth: 0 }, {
flex: 1.2,
backgroundColor: '#F5F5F5',
borderBottomWidth: 0,
borderRightWidth: 0,
},
]} ]}
> >
<Text> <Text>