Commit d339cb78 authored by Trisno's avatar Trisno

display all trans history

parent 074fe596
...@@ -88,6 +88,7 @@ class TransactionHistory extends React.Component { ...@@ -88,6 +88,7 @@ class TransactionHistory extends React.Component {
this.state.history_list.map((item) => ( this.state.history_list.map((item) => (
item.transactions.map((i, k) => ( item.transactions.map((i, k) => (
i.type == 2 ? (
<TouchableOpacity key={k} onPress={() => this.props.navigation.navigate('Order Detail', { idTrans: i.id })}> <TouchableOpacity key={k} onPress={() => this.props.navigation.navigate('Order Detail', { idTrans: i.id })}>
<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' }}>
...@@ -109,6 +110,22 @@ class TransactionHistory extends React.Component { ...@@ -109,6 +110,22 @@ class TransactionHistory extends React.Component {
</View> </View>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
) : (
<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: 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-Light', color: 'grey', fontSize: 12, margin: 2 }}>{moment(i.trans_time).format("DD MMMM YYYY, hh:mm A")}</Text>
</View>
<View style={{ flex: 0.9, justifyContent: 'center', alignItems: 'center', margin: 10, marginLeft: 15, borderLeftWidth: 1, borderColor: '#838383' }}>
<View>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 12 }}></Text>
</View>
</View>
</View>
</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