Commit 57466b19 authored by William Goszal's avatar William Goszal 🚴

fix transaction history. kalau trans typenya tidak terdaftar, tampilkan blank…

fix transaction history. kalau trans typenya tidak terdaftar, tampilkan blank aja, jangan pakai yang type_renewal
parent 3f3dcce9
...@@ -220,21 +220,27 @@ class TransactionHistory extends React.Component { ...@@ -220,21 +220,27 @@ class TransactionHistory extends React.Component {
</View> </View>
) : ) :
/** TYPE_RENEWAL */ /** TYPE_RENEWAL */
( i.type == 7 ? (
<View style={{ marginTop: 5 }} key={k}> <View style={{ marginTop: 5 }} key={k}>
<View style={{ flex: 2, height: 120, margin: 5, borderRadius: 5, borderWidth: 1, borderColor: '#838383', flexDirection: 'row' }}> <View style={{ flex: 2, height: 120, margin: 5, borderRadius: 5, borderWidth: 1, borderColor: '#838383', flexDirection: 'row' }}>
<View style={{ flex: 1.1, justifyContent: 'center', margin: 10 }}> <View style={{ flex: 1.1, justifyContent: 'center', margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 12, margin: 2 }}>{i.type_display}</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 12, margin: 2 }}>{i.type_display}</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: 'grey', fontSize: 12, margin: 2 }}>{moment(i.trans_time).format("DD MMMM YYYY, hh:mm A")}</Text> <Text style={{ fontFamily: 'Gotham-Light', color: 'grey', fontSize: 12, margin: 2 }}>{moment(i.trans_time).format("DD MMMM YYYY, hh:mm A")}</Text>
</View> </View>
<View style={{ flex: 0.9, justifyContent: 'center', alignItems: 'center', margin: 10, marginLeft: 15, borderLeftWidth: 1, borderColor: '#838383' }}> <View style={{ flex: 0.9, justifyContent: 'center', alignItems: 'center', margin: 10, marginLeft: 15, borderLeftWidth: 1, borderColor: '#838383' }}>
<View> <View>
<NumberFormat decimalScale={0} value={i.point_reduce} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', color: '#CFB368' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={i.point_reduce} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', color: '#CFB368' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
</View> </View>
</View> </View>
</View> </View>
</View>
) :
/** UNKNOWN TYPE */
(
<View style={{ marginTop: 0 }} key={k}>
</View>
) )
)) ))
)) ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment