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