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 { ...@@ -169,7 +169,9 @@ class DeliveryAddrees extends React.Component {
}).catch(error => { }).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 { ...@@ -21,13 +21,13 @@ class MenuConfirmation extends React.Component {
} }
componentDidMount(){ componentDidMount(){
console.log(" DESTINASI : "+ this.props.grabdestination) // console.log(" DESTINASI : "+ this.props.grabdestination)
console.log("ONGKIR"+ this.props.grabamount) // console.log("ONGKIR"+ this.props.grabamount)
console.log("drop off"+this.props.grabdropoff) // console.log("drop off"+this.props.grabdropoff)
console.log("pickup"+this.props.grabpickup) // console.log("pickup"+this.props.grabpickup)
console.log("type" +this.props.grabtype) // console.log("type" +this.props.grabtype)
console.log("BALANCED" +this.props.balanceUsed) // console.log("BALANCED" +this.props.balanceUsed)
console.log("POINT" +this.props.pointsused) // console.log("POINT" +this.props.pointsused)
} }
......
...@@ -49,6 +49,37 @@ class MenuSelection extends React.Component { ...@@ -49,6 +49,37 @@ class MenuSelection extends React.Component {
this._unsubscribe(); 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() { getMenuList() {
let params = { let params = {
outlet_id: this.props.outlet_id outlet_id: this.props.outlet_id
...@@ -96,12 +127,12 @@ class MenuSelection extends React.Component { ...@@ -96,12 +127,12 @@ class MenuSelection extends React.Component {
this.props.updateMenu(data.menu) this.props.updateMenu(data.menu)
}).catch(error =>{ }).catch(error => {
const {navigation} = this.props const {navigation} = this.props
let response = error.response.data let response = error.response.data
session(response,navigation) session(response,navigation)
Alert.alert(response.msg); Alert.alert(response.msg);
} ) })
} }
renderTabBar = ({ item }) => { renderTabBar = ({ item }) => {
...@@ -278,7 +309,6 @@ const styles = StyleSheet.create({ ...@@ -278,7 +309,6 @@ const styles = StyleSheet.create({
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
return { return {
session_id: state.session_id, session_id: state.session_id,
grabamount: state.grabamount, grabamount: state.grabamount,
outlet_id: state.outlet_id, 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