Commit 4e58e227 authored by Afid's avatar Afid

numberId

parent 5efd6b8b
......@@ -22,7 +22,8 @@ class TransactionDetail extends React.Component {
trans_total: '',
point_reduce: '',
transaction_detail: [],
detail_trans: ''
detail_trans: '',
numberId: ''
}
}
......@@ -50,7 +51,8 @@ class TransactionDetail extends React.Component {
trans_total: data.trans_total,
point_reduce: data.point_reduce,
transaction_detail: data.transaction_detail,
detail_trans: data
detail_trans: data,
numberId: data.id.substring(0, 5)
})
console.log(this.state.detail_trans)
// console.log(this.props.route.params.idTrans)
......@@ -61,7 +63,7 @@ class TransactionDetail extends React.Component {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={{ fontSize: 16, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.detail_trans.id}</Text>
<Text style={{ fontSize: 16, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.numberId}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{moment(this.state.detail_trans.trans_time).format('DD MMMM YYYY HH:mm:ss')}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.detail_trans.trans_status_display}</Text>
</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