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