Commit 7854ba1a authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo
parents 6fcf4afd 004e96f7
...@@ -24,8 +24,6 @@ class MenuSelection extends React.Component { ...@@ -24,8 +24,6 @@ class MenuSelection extends React.Component {
order_list: [], order_list: [],
list_cart: [], list_cart: [],
indicator: true, indicator: true,
my_lat: 0,
my_long: 0
} }
} }
...@@ -38,16 +36,17 @@ class MenuSelection extends React.Component { ...@@ -38,16 +36,17 @@ class MenuSelection extends React.Component {
indicator: true indicator: true
}) })
this._getPermissions() this._getPermissions()
this.getMenuList()
} }
// console.log("INI OUTLET : "+ this.props.outlet_id) // console.log("INI OUTLET : "+ this.props.outlet_id)
this._unsubscribe = this.props.navigation.addListener('focus', () => { this._unsubscribe = this.props.navigation.addListener('focus', () => {
if (this.props.outlet_id != '') { if (this.props.outlet_id != '') {
this.getMenuList()
} else {
this.setState({ this.setState({
indicator: true indicator:true
}) })
this._getPermissions() this._getPermissions()
this.getMenuList()
} }
}); });
} }
...@@ -167,9 +166,9 @@ class MenuSelection extends React.Component { ...@@ -167,9 +166,9 @@ class MenuSelection extends React.Component {
}) })
}).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);
}) })
...@@ -283,18 +282,18 @@ class MenuSelection extends React.Component { ...@@ -283,18 +282,18 @@ class MenuSelection extends React.Component {
)} )}
</View> </View>
<View style={styles.shadow}> <View style={styles.shadow}>
{ {
this.state.indicator == true ? (<ActivityIndicator style={{ top: 10 }} size="large" color="#c9af6d" />) : ( this.state.indicator == true ? (<ActivityIndicator style={{ top: 10 }} size="large" color="#c9af6d" />):(
<View style={{ flexDirection: 'row', }}> <View style={{ flexDirection: 'row', }}>
<Text style={{ fontSize: 12, margin: 10 }}> Price Estimation / Item {this.props.order_quantity} </Text> <Text style={{ fontSize: 12, margin: 10 }}> Price Estimation / Item {this.props.order_quantity} </Text>
<Text style={{ fontSize: 12, margin: 10 }}> Ongkir {this.props.grabamount} </Text> <Text style={{ fontSize: 12, margin: 10 }}> Ongkir {this.props.grabamount} </Text>
<Text style={{ fontSize: 20, margin: 10, marginBottom: 10 }}> Rp. {this.props.order_total}</Text> <Text style={{ fontSize: 20, margin: 10, marginBottom: 10 }}> Rp. {this.props.order_total}</Text>
</View> </View>
) )
} }
<View> <View>
<Button title="VIEW CART" onPress={() => this.props.navigation.navigate('Shopping Cart')}></Button> <Button title="VIEW CART" onPress={() => this.props.navigation.navigate('Shopping Cart')}></Button>
</View> </View>
......
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