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