Commit 15baa0ef authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

add pickup

parent ca55e122
{
"expo": {
"name": "Excelso_update 16.30 / 14.05.2020",
"name": "Excelso_update 09.30 / 18.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......
......@@ -38,7 +38,8 @@ class Account extends React.Component {
expire_date: "",
premium: "",
my_lat: 0,
my_long: 0
my_long: 0,
full_name:''
}
}
......@@ -112,6 +113,7 @@ class Account extends React.Component {
let expire = dataCard.expire_date
let premium = dataCard.kaspro_is_premium
let kaspro = dataCard.kaspro_account_number
let full_name = dataCard.name
if (kaspro === "") {
......@@ -140,6 +142,7 @@ class Account extends React.Component {
img_card: img_card,
expire_date: expire,
premium: premium,
full_name:full_name
})
}).catch(error => {
......@@ -180,17 +183,24 @@ class Account extends React.Component {
source={require('../assets/images/people-actv.png')}
/>
</View>
<View style={{ height: 50, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 17, textAlign: 'center', margin: 15 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center',top:5 }}>
{this.state.full_name}
</Text>
<View style={{ height: 90, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity style={{flexDirection:'row'}} onPress={() => this.props.navigation.navigate('Profile')}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 17, textAlign: 'center',top:10 }}>
{this.state.email}
</Text>
</TouchableOpacity>
<Icon
containerStyle={{ top: 8 }}
containerStyle={{margin:5}}
name='ios-create'
type='ionicon'
color='#CFB368'
/>
</TouchableOpacity>
</View>
</View>
......@@ -227,7 +237,7 @@ class Account extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', top: 20 }}>No card yet</Text>
<TouchableOpacity onPress={() => this.handleLoggin()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, top: 90 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATION CARD</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATE CARD</Text>
</View>
</TouchableOpacity>
</View>
......@@ -249,12 +259,12 @@ class Account extends React.Component {
{this.state.account_number}
</Text>
<View style={styles.line}></View>
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold',fontSize:15 }}> {'\n'}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left',fontSize:15 }}> {'\n'}
BALANCE : {this.state.balance}{'\n'}
</Text>
<View style={styles.line}></View>
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold' }}>{'\n'}
POINTS : {this.state.points}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left',fontSize:15 }}> {'\n'}
POINTS : {this.state.points}{'\n'}
</Text>
</Card>
</View>
......@@ -359,7 +369,8 @@ const styles = StyleSheet.create({
},
Card: {
top: 50,
top: 60,
alignItems: 'center',
backgroundColor: 'white',
alignContent: 'center',
......
......@@ -369,7 +369,18 @@ class Auth extends React.Component {
title: 'REGISTER'
}} />
<Stack.Screen name="TopUpInfo" component={TopUpInfo} />
<Stack.Screen name="Reward Detail" component={RewardDetail} />
<Stack.Screen name="Reward Detail" component={RewardDetail} options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontFamily: 'Gotham-Black',
color: 'white',
fontSize: 20,
},
title: 'REWARD DETAIL'
}} />
<Stack.Screen name="Reward Select" component={RewardSelect} />
</Stack.Navigator>
)
......
......@@ -202,9 +202,6 @@ class DeliveryAddrees extends React.Component {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={{ textAlign: 'center', margin: 20, fontSize: 25, alignSelf: 'center' }}>Delivery Address</Text>
</View>
<View style={styles.body}>
{/* <ScrollView> */}
<View style={styles.btn_addreess}>
......@@ -235,6 +232,7 @@ const styles = StyleSheet.create({
body: {
flex: 3,
marginTop:10,
marginRight: 20,
marginLeft: 20,
marginBottom: 20,
......
......@@ -320,7 +320,7 @@ class MenuSelection extends React.Component {
<View style={{ flex: 1,height:100,marginBottom:30}}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Shopping Cart')}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368',marginRight:20,flexDirection:'row',marginBottom:30}}>
<Image source={(require('../assets/icon/icon-order.png'))} style={{height:50,width:40,tintColor:'white',marginLeft:10,top:2}}></Image>
<Image source={(require('../assets/icon/icon-order.png'))} style={{height:50,width:40,tintColor:'white',}}></Image>
<Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 15,alignSelf:'center', textAlign: 'center' }}>View Cart</Text>
</View>
</TouchableOpacity>
......
......@@ -101,6 +101,7 @@ class PickupName extends React.Component {
Axios.post("https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_list", params).then(res => {
let dataOutlets = res.data.outlets;
console.log("INI ADALAH DATA OUTLETS : "+ JSON.stringify(dataOutlets))
for (let i = 0; i < dataOutlets.length; i++) {
dataOutlets[i]['distance'] = this.distance(dataOutlets[i]['lat'], dataOutlets[i]['long']);
let address = dataOutlets[i]['address'];
......@@ -125,6 +126,27 @@ class PickupName extends React.Component {
address = dataOutlets[i]['postal_code'];
}
}
if (dataOutlets[i]['open_time']) {
if (address !== '') {
address = address + ' ' + dataOutlets[i]['open_time'];
} else {
address = dataOutlets[i]['open_time'];
}
}
if (dataOutlets[i]['close_time']) {
if (address !== '') {
address = address + ' ' + dataOutlets[i]['close_time'];
} else {
address = dataOutlets[i]['close_time'];
}
}
if (dataOutlets[i]['can_accept_order']) {
if (address !== '') {
address = address + ' ' + dataOutlets[i]['can_accept_order'];
} else {
address = dataOutlets[i]['can_accept_order'];
}
}
dataOutlets[i]['full_address'] = address;
}
this.setState({
......@@ -200,19 +222,21 @@ class PickupName extends React.Component {
<View>
<TouchableOpacity onPress={() => this.getOutletDetail(item.id, item.name)}>
<View style={{ flexDirection: 'row', flex: 1 }}>
<View>
<MaterialCommunityIcons name="map-marker" size={32} color="brown" />
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={styles.list_addrees}>
<View style={{ margin: 5 }}>
<Text style={{ fontWeight: 'bold', fontSize: 20 }}>{item.name}</Text>
<Text style={{ fontWeight: 'bold', fontSize: 15, color: '#ccb46c' }}>OPEN - </Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text>
<View style={{flexDirection:'row'}}>
{item.can_accept_order == true ? (<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c",top:5}}>OPEN - </Text>)
:(<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c"}}>CLOSED - </Text>) }<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 15}}>Everyday {item.open_time} - {item.close_time}</Text>
</View>
</View>
<Text style={{ margin: 5, color: '#b1b1b2' }}>
<Text style={{ margin: 5, color: '#b1b1b2',fontFamily: 'Gotham-Light' }}>
{item.full_address}
</Text>
<Text style={{ margin: 5, color: '#aeaead' }}>
<Text style={{ margin: 5, color: '#aeaead',fontFamily: 'Gotham-Light' }}>
{item.distance} KM
</Text>
</View>
......@@ -222,8 +246,10 @@ class PickupName extends React.Component {
checkedIcon='dot-circle-o'
uncheckedIcon='circle-o'
checked={this.state.checked}
checkedColor="#ccb46c"
uncheckedColor="#ccb46c"
/>
<Text style={{textAlign:'center',color:'#ccb46c',fontFamily:'Gotham-Light' }}>PILIH</Text>
</View>
</View>
</TouchableOpacity>
......@@ -242,7 +268,7 @@ class PickupName extends React.Component {
<View style={styles.searchbar}>
<View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row' }}>
<View style={{ flex: 1 }}>
<MaterialCommunityIcons name="map-marker" size={32} color="brown" />
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
</View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder="Cari lokasi Pickup Store"
......@@ -251,7 +277,7 @@ class PickupName extends React.Component {
value={this.state.search}></TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Ionicons name="ios-search" size={32} color="brown" />
<Ionicons name="ios-search" size={32} color="#ccb46c" />
</View>
</View>
......
......@@ -100,11 +100,11 @@ class RewardDetail extends React.Component {
<Image style={{ height: 250, width: '100%' }} source={this.state.image ? { uri: this.state.image } : null} />
<View style={styles.voucher_code}>
<Text style={styles.text_voucher}>Voucher Code : </Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 29, textAlign: 'center', marginBottom: 5, top: 5 }}>{this.state.code}</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 18, textAlign: 'center', marginBottom: 5, top: 15 }}>{this.state.code}</Text>
</View>
<View style={styles.expire_time}>
<Text style={styles.text_expire}>Expire Time : </Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 29, textAlign: 'center', marginBottom: 5, top: 7 }}>{this.state.expire}</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', marginBottom: 5, top: 7 }}>{this.state.expire}</Text>
</View>
</View>
......@@ -178,6 +178,7 @@ const styles = StyleSheet.create({
marginLeft: 20,
marginRight: 20,
height: 70,
justifyContent:'center',
backgroundColor: 'black',
},
......@@ -185,6 +186,7 @@ const styles = StyleSheet.create({
fontFamily: 'Gotham-Black',
fontSize: 14,
marginLeft: 10,
top:5,
color: 'white'
},
......
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