Commit 39002021 authored by Fred's avatar Fred

fix force close outlet page

parent 7e20a7a1
......@@ -26,11 +26,14 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "id.web.ravintola.excelsocrm",
"buildNumber": "2006151800"
"buildNumber": "2006161400",
"config": {
"googleMapsApiKey": "AIzaSyCvIFNvXKmBNetqPrV4VnjvF772avYbA3M"
}
},
"android": {
"package": "id.web.ravintola.excelsocrm",
"versionCode": 2006151800,
"versionCode": 2006161400,
"config": {
"googleMaps": {
"apiKey": "AIzaSyAcCfuNHVFstDUE-ZDafWsiUmA3ON79cqo"
......
......@@ -42,7 +42,7 @@ class Outlets extends React.Component {
this.setState({
indicator: true,
})
this._getOutletClosest()
// this._getOutletClosest()
this.OrderedList()
this._getPermissions()
});
......@@ -165,31 +165,31 @@ class Outlets extends React.Component {
})
}
_getOutletClosest() {
let params = {
session_id: this.props.session_id,
lat: this.props.lat,
long: this.props.long
}
// console.log(params);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => {
let outletName = res.data.data.outlet_name
this.setState({
indicator: false,
data_name: outletName
})
// console.log("INI ADALAH RESPON : + " + JSON.stringify(res))
// console.log("INI DATANYA NAME : " + outletName)
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
})
}
// _getOutletClosest() {
// let params = {
// session_id: this.props.session_id,
// lat: this.props.lat,
// long: this.props.long
// }
// // console.log(params);
// Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => {
// let outletName = res.data.data.outlet_name
// this.setState({
// indicator: false,
// data_name: outletName
// })
// // console.log("INI ADALAH RESPON : + " + JSON.stringify(res))
// // console.log("INI DATANYA NAME : " + outletName)
// }).catch(error => {
// const { navigation } = this.props
// let response = error.response.data
// session(response, navigation)
// Alert.alert(response.msg);
// })
// }
toRad(value) {
return value * Math.PI / 180;
......
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