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

add pickup

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