Commit 1af1f3f6 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

alert untuk grab

parent 67fa458f
......@@ -169,7 +169,9 @@ class DeliveryAddrees extends React.Component {
}).catch(error => {
console.log('ini error ' + error)
let response = error.response.data;
Alert.alert(response.msg)
console.log('ini error ' + response.msg)
})
......
......@@ -21,13 +21,13 @@ class MenuConfirmation extends React.Component {
}
componentDidMount(){
console.log(" DESTINASI : "+ this.props.grabdestination)
console.log("ONGKIR"+ this.props.grabamount)
console.log("drop off"+this.props.grabdropoff)
console.log("pickup"+this.props.grabpickup)
console.log("type" +this.props.grabtype)
console.log("BALANCED" +this.props.balanceUsed)
console.log("POINT" +this.props.pointsused)
// console.log(" DESTINASI : "+ this.props.grabdestination)
// console.log("ONGKIR"+ this.props.grabamount)
// console.log("drop off"+this.props.grabdropoff)
// console.log("pickup"+this.props.grabpickup)
// console.log("type" +this.props.grabtype)
// console.log("BALANCED" +this.props.balanceUsed)
// console.log("POINT" +this.props.pointsused)
}
......
......@@ -49,6 +49,37 @@ class MenuSelection extends React.Component {
this._unsubscribe();
}
// _getOutletClosest() {
// let params = {
// session_id: this.props.session_id,
// lat: this.state.my_lat,
// long: this.state.my_long
// }
// // console.log(params);
// Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then((res) => {
// let outletId = res.data.data.outlet_id
// let outletName = res.data.data.outlet_name
// let OutletChange = {
// outlet_id: outletId,
// name_outlet: outletName,
// }
// this.props.setChangeOutletProps(OutletChange);
// this.setState({
// indicator: false
// })
// }).catch(error => {
// const {navigation} = this.props
// let response = error.response.data
// session(response,navigation)
// Alert.alert(response.msg);
// })
// }
getMenuList() {
let params = {
outlet_id: this.props.outlet_id
......@@ -96,12 +127,12 @@ class MenuSelection extends React.Component {
this.props.updateMenu(data.menu)
}).catch(error =>{
}).catch(error => {
const {navigation} = this.props
let response = error.response.data
session(response,navigation)
Alert.alert(response.msg);
} )
})
}
renderTabBar = ({ item }) => {
......@@ -278,7 +309,6 @@ const styles = StyleSheet.create({
const mapStateToProps = (state) => {
return {
session_id: state.session_id,
grabamount: state.grabamount,
outlet_id: state.outlet_id,
......
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