Commit cd5e3149 authored by Trisno's avatar Trisno

update checkout

parent baf57aa8
......@@ -8,27 +8,22 @@ class MenuConfirmation extends React.Component {
this.state = {
kasproBalance: '',
kasproPoint: '',
checkedBalance: false,
checkedPoint: false,
checkedBalancePoint: false,
balanceused: 0,
pointsused: 0,
ongkir: 0,
diskon: 0,
isDelivery: false,
isPickUp: false
// dummyBalance : 155000,
// dummyPoint : 20000
totalOrder: 0
}
}
render() {
console.log(this.props)
let total = 0
return (
<ScrollView style={styles.container}>
{
this.props.order_item.map((item, index) => {
total = total + item.quantity * item.price
return (
<View style={{ margin: 10 }} key={index}>
<View style={{ flex: 1, margin: 10, flexDirection: 'row', justifyContent: 'space-around' }}>
......@@ -50,7 +45,7 @@ class MenuConfirmation extends React.Component {
})
}
<View style={{ alignItems: 'flex-end', borderTopWidth: 1, margin: 10, padding: 10 }}>
<Text>0</Text>
<Text>{total}</Text>
</View>
<View style={{ flexDirection: 'row', margin: 10, justifyContent: 'space-between' }}>
<View style={{ margin: 10 }}>
......@@ -84,7 +79,7 @@ class MenuConfirmation extends React.Component {
<Text>{this.props.route.params.balanceUsed}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', margin: 10, justifyContent: 'space-between'}}>
<View style={{ flexDirection: 'row', margin: 10, justifyContent: 'space-between' }}>
<View style={{ margin: 10 }}>
<Text>Point Used</Text>
</View>
......@@ -92,6 +87,17 @@ class MenuConfirmation extends React.Component {
<Text>{this.props.route.params.pointused}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', margin: 10, justifyContent: 'space-between' }}>
<View style={{ margin: 10 }}>
<Text>Delivery to</Text>
</View>
<View style={{ margin: 10 }}>
<Text>{this.props.address}</Text>
</View>
</View>
<View style={{ margin: 10 }}>
<Button title='order'/>
</View>
</ScrollView>
)
}
......
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