Commit e19c59a5 authored by Trisno's avatar Trisno

sudah di sesuaikan this.props nya

parent 63f561bc
......@@ -25,7 +25,6 @@ class MenuConfirmation extends React.Component {
console.log("BALANCED" +this.props.balanceUsed)
console.log("POINT" +this.props.pointsused)
this.setOrder()
}
......@@ -36,7 +35,7 @@ class MenuConfirmation extends React.Component {
address_id : this.props.addressId,
trans_type: "Delivery",
order_item: this.props.order_item,
delivery_charge: this.state.ongkir,
delivery_charge: this.props.grabamount,
voucher: [],
payment: {
balance: this.props.route.params.balanceUsed,
......@@ -45,7 +44,7 @@ class MenuConfirmation extends React.Component {
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/booking', params).then(res => {
console.log(res)
Alert.alert(res.data.response.msg)
}).catch(error => {
let response = error.response.data;
Alert.alert(response.msg);
......@@ -53,7 +52,7 @@ class MenuConfirmation extends React.Component {
}
render() {
// console.log(this.props)
console.log(this.props)
let total = 0
return (
<ScrollView style={styles.container}>
......@@ -96,7 +95,7 @@ class MenuConfirmation extends React.Component {
<Text>Delivery Charge</Text>
</View>
<View style={{ margin: 10 }}>
<Text>0</Text>
<Text>{this.props.grabamount}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', margin: 10, justifyContent: 'space-between', borderTopWidth: 1 }}>
......@@ -132,7 +131,7 @@ class MenuConfirmation extends React.Component {
</View>
</View>
<View style={{ margin: 10 }}>
<Button title='order' onPress={this.setOrder()}/>
<Button title='order' onPress={() => this.setOrder()}/>
</View>
</ScrollView>
)
......
......@@ -503,7 +503,7 @@ class ShoppingCart extends React.Component {
<Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Ongkos Kirim</Text>
</View>
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: 'gray' }}>{this.state.ongkir}</Text>
<Text style={{ color: 'gray' }}>{this.props.grabamount}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
......
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