Commit c5af5e89 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

ini udah bisa

parent 9e0f0674
......@@ -34,6 +34,9 @@ class Home extends React.Component {
this._renderCarousell()
this._account();
this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.setState({
indicator:true,
})
this._getPermissions()
this._renderCarousell()
this._account();
......
......@@ -26,6 +26,7 @@ class MenuSelection extends React.Component {
componentDidMount() {
if (this.props.outlet_id != '') {
this.getMenuList()
} else {
Alert.alert('Device belum mendapatkan lokasi anda')
......@@ -33,6 +34,9 @@ class MenuSelection extends React.Component {
console.log("INI OUTLET : "+ this.props.outlet_id)
this._unsubscribe = this.props.navigation.addListener('focus', () => {
if (this.props.outlet_id != '') {
this.setState({
indicator:true
})
this.getMenuList()
} else {
Alert.alert('Device belum mendapatkan lokasi anda')
......@@ -221,10 +225,17 @@ class MenuSelection extends React.Component {
)}
</View>
<View style={styles.shadow}>
<View style={{ flexDirection: 'row', }}>
<Text style={{ fontSize: 12, margin: 10 }}> Price Estimation / Item {this.props.order_quantity} </Text>
<Text style={{ fontSize: 20, margin: 10, marginBottom: 10 }}> Rp. {this.props.order_total}</Text>
</View>
{
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: 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>
......
......@@ -18,9 +18,12 @@ class OrderHistory extends React.Component {
componentDidMount() {
this.getOrderHistory()
this._unsubscribe = this.props.navigation.addListener('focus', () => {
return (
this.setState({
indicator:true,
})
this.getOrderHistory()
)
});
}
......
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