Commit 69ddd765 authored by Trisno's avatar Trisno
parents 1aa2ff3b c8b301f2
......@@ -319,7 +319,7 @@ class Account extends React.Component {
</TouchableOpacity>
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center'}}>
<TouchableOpacity style={{ marginBottom: 10 }} onPress={() => this.TransferBalance()} >
<TouchableOpacity style={{ marginBottom: 5 }} onPress={() => this.TransferBalance()} >
<Card style={{ height: 120, width: 155 }}>
<View style={{ height: 50, alignItems: 'center', padding: 10 }}>
......@@ -332,7 +332,7 @@ class Account extends React.Component {
</Card>
</TouchableOpacity>
<View style={{ width: 5 }}></View>
<TouchableOpacity style={{ marginBottom: 10 }} onPress={() => this.props.navigation.navigate('Transaction History')} >
<TouchableOpacity onPress={() => this.props.navigation.navigate('Transaction History')} >
<Card style={{ height: 120, width: 155 }}>
<View style={{ height: 50, alignItems: 'center', padding: 10 }}>
<Image
......@@ -344,11 +344,10 @@ class Account extends React.Component {
</Card>
</TouchableOpacity>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 10 }}>
<View style={{ flex:1, flexDirection: 'row', justifyContent: 'center'}}>
{this.state.premium === false ? (
<TouchableOpacity onPress={() => this.props.navigation.navigate('Upgrade Premium')} style={{ marginBottom: 20, marginRight: 5, marginLeft: 5 }}>
<Card style={{ height: 100, width: 160 }}>
<Card style={{ height: 120, width: 155 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14, color: '#838383' }}>UPGRADE PREMIUM</Text>
......@@ -359,9 +358,11 @@ class Account extends React.Component {
null
)}
</View>
</View>
<View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginLeft: 20, marginRight: 20, marginBottom: 10, padding: 5, bottom: 5 }}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginLeft: 20, marginRight: 20, marginBottom: 20, padding: 5, bottom: 5,top:1 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>LOGOUT</Text>
</View>
</TouchableOpacity>
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Platform, Dimensions, Alert, Image } from 'react-native';
import { View, Text, TextInput, StyleSheet, Button, Platform, Dimensions, Alert, Image ,ActivityIndicator } from 'react-native';
import * as Device from 'expo-device';
import * as Permissions from 'expo-permissions';
import * as Location from 'expo-location';
......@@ -33,6 +33,7 @@ class AddreesDetail extends React.Component {
address: '',
address_d: '',
spinner: false,
indicator: true,
}
}
......@@ -76,13 +77,11 @@ class AddreesDetail extends React.Component {
// name: detail[0].name,
region: detail[0].region,
postalCode: detail[0].postalCode,
indicator: false,
})
this.setState({
spinner: false,
})
}
//searchlocation (mencari lokasi)
......@@ -156,15 +155,10 @@ class AddreesDetail extends React.Component {
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<ScrollView>
<View style={styles.content}>
<View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row', marginTop: 15, marginLeft: 10, marginRight: 10 }}>
<View style={{ flex: 1,top:5 }}>
<View style={{ flex: 1, top: 5 }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 6 }}>
......@@ -212,28 +206,34 @@ class AddreesDetail extends React.Component {
</View>
</View>
<View style={styles.name_addrees_input}>
<View style={{ flexDirection: 'row', top: 10,justifyContent:'center' }}>
<View style={{flex:1,justifyContent:'center',flexDirection:'row'}}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
<View style={{ flexDirection: 'row', top: 10, justifyContent: 'center' }}>
<View style={{ flex: 1, justifyContent: 'center', flexDirection: 'row' }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 3 ,justifyContent:'center'}}>
<Text style={{ fontFamily: 'Gotham-Light',textAlign:'center' }}>{this.state.street}</Text>
<Text style={{ fontFamily: 'Gotham-Light',textAlign:'center' }}>{this.state.city} </Text>
<Text style={{fontFamily: 'Gotham-Light',textAlign:'center'}}>{this.state.region}</Text>
<Text style={{fontFamily: 'Gotham-Light',textAlign:'center'}}>{this.state.postalCode}</Text>
</View>
<View style={{flex:1}}>
{this.state.indicator == true ? (
<ActivityIndicator size="large" color="#c9af6d" />
) : (
<View style={{ flex: 3, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.street}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.city} </Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.region}</Text>
<Text style={{ fontFamily: 'Gotham-Light', textAlign: 'center' }}>{this.state.postalCode}</Text>
</View>
)}
<View style={{ flex: 1 }}>
</View>
</View>
<View style={styles.field_name_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c",textAlign:'center',fontSize:18 }}>Label</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>Label</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey' }} onChangeText={(name) => this.setState({ name })} />
</View>
<View style={styles.field_detail_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', marginLeft: 10, color: "#ccb46c",textAlign:'center',fontSize:18 }} >Detail</Text>
<TextInput style={{ height: 150, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey',justifyContent:'flex-start' }}
<Text style={{ fontFamily: 'Gotham-Black', marginLeft: 10, color: "#ccb46c", textAlign: 'center', fontSize: 18 }} >Detail</Text>
<TextInput style={{ height: 150, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey', justifyContent: 'flex-start' }}
onChangeText={(description) => this.setState({ description })}
numberOfLines={10}
multiline={true} />
......@@ -258,7 +258,7 @@ const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ffff'
},
header: {
......@@ -268,8 +268,8 @@ const styles = StyleSheet.create({
content: {
flex: 3,
marginRight:10,
marginLeft:10,
marginRight: 10,
marginLeft: 10,
},
field_search: {
......@@ -279,22 +279,22 @@ const styles = StyleSheet.create({
cont_google_map: {
flex: 1,
top: 5,
marginRight:10,
marginLeft:10,
marginRight: 10,
marginLeft: 10,
height: 250,
},
name_addrees_input: {
flex: 1,
marginLeft:10,
marginRight:10,
top:20
marginLeft: 10,
marginRight: 10,
top: 20
},
field_name_addrees: {
flexDirection: 'column',
top: 40,
justifyContent:'center'
justifyContent: 'center'
},
field_detail_addrees: {
......
......@@ -168,7 +168,7 @@ class Auth extends React.Component {
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PROFIL'
}, title: 'CHANGE PROFILE'
}} />
<Stack.Screen name="Register" component={Register} />
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
......
import React from 'react';
import { View, Text, StyleSheet, Button, FlatList, Alert, TextInput, Image } from 'react-native';
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
import { View, Text, StyleSheet, Button, FlatList, Alert, TextInput, Image,ScrollView,ActivityIndicator } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { connect } from 'react-redux';
import { CheckBox, Icon } from 'react-native-elements';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
// import ravLog from '../helper/debug';
class DeliveryAddrees extends React.Component {
......@@ -16,6 +17,7 @@ class DeliveryAddrees extends React.Component {
data: [],
data_before_search: [],
search: '',
indicator: true,
// outlet_id: '',
// grabamount: ''
}
......@@ -49,6 +51,7 @@ class DeliveryAddrees extends React.Component {
this.setState({
data: address,
data_before_search: dataAlamat,
indicator: false
})
let data_alamat = []
......@@ -245,6 +248,7 @@ class DeliveryAddrees extends React.Component {
</View>
</View>
</TouchableOpacity>
</View>
);
......@@ -254,6 +258,7 @@ class DeliveryAddrees extends React.Component {
return (
<View style={styles.container}>
<ScrollView>
<View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row', marginTop: 15, marginLeft: 20, marginRight: 20 }}>
<View style={{ flex: 1, top: 5 }}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
......@@ -277,12 +282,19 @@ class DeliveryAddrees extends React.Component {
</View>
<View style={styles.listAddress}>
<FlatList
data={this.state.data}
renderItem={this.renderItem}
keyExtractor={item => item.id}
/>
{this.state.indicator == true ? (
<ActivityIndicator size="large" color="#c9af6d" />
) : (
<FlatList style={{marginBottom:25}}
data={this.state.data}
renderItem={this.renderItem}
keyExtractor={item => item.id}
/>
)}
</View>
</ScrollView>
</View>
)
......@@ -317,7 +329,7 @@ const styles = StyleSheet.create({
top:20,
marginLeft:20,
marginRight:20,
marginBottom:10,
marginBottom:20,
borderWidth: 1,
borderColor: '#838383',
borderRadius: 10,
......
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