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

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	view/RewardSelect.js
#	view/RewardsList.js
parents 15baa0ef 82e9461b
{ {
"expo": { "expo": {
"name": "Excelso_update 09.30 / 18.05.2020", "name": "Excelso_update 11.30 / 18.05.2020",
"slug": "excelso-pro", "slug": "excelso-pro",
"privacy": "public", "privacy": "public",
"sdkVersion": "36.0.0", "sdkVersion": "36.0.0",
......
...@@ -92,22 +92,22 @@ function HomePage({ navigation }) { ...@@ -92,22 +92,22 @@ function HomePage({ navigation }) {
if (route.name === 'HOME') { if (route.name === 'HOME') {
// iconName = focused ? 'ios-home' : 'ios-home' // iconName = focused ? 'ios-home' : 'ios-home'
return <Image source={require('../assets/icon/icon-home.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'} /> return <Image source={require('../assets/icon/icon-home.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} else if (route.name === 'MENU') { } else if (route.name === 'MENU') {
// iconName = focused ? 'ios-paper' : 'ios-paper'; // iconName = focused ? 'ios-paper' : 'ios-paper';
return <Image source={require('../assets/icon/icon-menu.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'}/> return <Image source={require('../assets/icon/icon-menu.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} else if (route.name === 'REWARDS') { } else if (route.name === 'REWARDS') {
// iconName = focused ? 'ios-gift' : 'ios-gift'; // iconName = focused ? 'ios-gift' : 'ios-gift';
return <Image source={require('../assets/icon/icon-rewards.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'}/> return <Image source={require('../assets/icon/icon-rewards.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} else if (route.name === 'ORDER') { } else if (route.name === 'ORDER') {
// iconName = focused ? 'md-cart' : 'md-cart'; // iconName = focused ? 'md-cart' : 'md-cart';
return <Image source={require('../assets/icon/icon-order.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'}/> return <Image source={require('../assets/icon/icon-order.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} else if (route.name === 'OUTLETS') { } else if (route.name === 'OUTLETS') {
// iconName = focused ? 'ios-cafe' : 'ios-cafe'; // iconName = focused ? 'ios-cafe' : 'ios-cafe';
return <Image source={require('../assets/icon/icon-outlets.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'}/> return <Image source={require('../assets/icon/icon-outlets.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} else if (route.name === 'ACCOUNT') { } else if (route.name === 'ACCOUNT') {
// iconName = focused ? 'account' : 'account'; // iconName = focused ? 'account' : 'account';
return <Image source={require('../assets/icon/icon-account.png')} style={{height :50, width:50}} tintColor={ focused ? '#CFB368' : 'gray'}/> return <Image source={require('../assets/icon/icon-account.png')} style={{ height: 50, width: 50 }} tintColor={focused ? '#CFB368' : 'gray'} />
} }
// You can return any component that you like here! // You can return any component that you like here!
...@@ -146,11 +146,11 @@ class Auth extends React.Component { ...@@ -146,11 +146,11 @@ class Auth extends React.Component {
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} /> <Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{ <Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false , headerShown: false,
}} /> }} />
<Stack.Screen name="Home" component={Home} /> <Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Profile" component={ProfilePage} options={{ <Stack.Screen name="Profile" component={ProfilePage} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
...@@ -162,7 +162,7 @@ class Auth extends React.Component { ...@@ -162,7 +162,7 @@ class Auth extends React.Component {
color: 'white', color: 'white',
textAlign: 'center' textAlign: 'center'
}, title: 'PROFIL' }, title: 'PROFIL'
}}/> }} />
<Stack.Screen name="Change Profil" component={ChangeProfile} options={{ <Stack.Screen name="Change Profil" component={ChangeProfile} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
...@@ -174,7 +174,7 @@ class Auth extends React.Component { ...@@ -174,7 +174,7 @@ class Auth extends React.Component {
color: 'white', color: 'white',
textAlign: 'center' textAlign: 'center'
}, title: 'CHANGE PROFIL' }, title: 'CHANGE PROFIL'
}}/> }} />
<Stack.Screen name="Register" component={Register} /> <Stack.Screen name="Register" component={Register} />
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */} {/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{ <Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
...@@ -189,17 +189,17 @@ class Auth extends React.Component { ...@@ -189,17 +189,17 @@ class Auth extends React.Component {
textAlign: 'center' textAlign: 'center'
}, title: 'EMAIL CONFIRMATION' }, title: 'EMAIL CONFIRMATION'
}} /> }} />
<Stack.Screen name="Welcomes" component={WelcomeReg} options={{ <Stack.Screen name="Welcomes" component={WelcomeReg} options={{
headerShown: false , headerShown: false,
}} /> }} />
</> </>
) : this.props.pageEmailConfirmation === true ? ( ) : this.props.pageEmailConfirmation === true ? (
<> <>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> <Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Login" component={Login} /> <Stack.Screen name="Login" component={Login} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{ <Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false , headerShown: false,
}} /> }} />
<Stack.Screen name="Home" component={Home} options={{ headerShown: false }} /> <Stack.Screen name="Home" component={Home} options={{ headerShown: false }} />
</> </>
...@@ -219,8 +219,22 @@ class Auth extends React.Component { ...@@ -219,8 +219,22 @@ class Auth extends React.Component {
} }
}} /> }} />
<Stack.Screen name="Profile" component={ProfilePage} <Stack.Screen name="Profile" component={ProfilePage}
options={{ options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'PROFIL'
}} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Change language" component={ChangeLanguage} />
<Stack.Screen name="Change password" component={ChangePassword} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center', headerTitleAlign: 'center',
...@@ -230,22 +244,8 @@ class Auth extends React.Component { ...@@ -230,22 +244,8 @@ class Auth extends React.Component {
fontFamily: 'Gotham-Black', fontFamily: 'Gotham-Black',
color: 'white', color: 'white',
textAlign: 'center' textAlign: 'center'
}, title: 'PROFIL' }, title: 'CHANGE PROFIL'
}}/> }} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Change language" component={ChangeLanguage} />
<Stack.Screen name="Change password" component={ChangePassword} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'CHANGE PROFIL'
}}/>
<Stack.Screen name="Card Activation" component={CardActivation} /> <Stack.Screen name="Card Activation" component={CardActivation} />
<Stack.Screen name="Renewal" component={Renewal} /> <Stack.Screen name="Renewal" component={Renewal} />
<Stack.Screen name="Account" component={Account} /> <Stack.Screen name="Account" component={Account} />
...@@ -255,10 +255,22 @@ class Auth extends React.Component { ...@@ -255,10 +255,22 @@ class Auth extends React.Component {
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> <Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Upgrade Premium" component={UpgradePremium} /> <Stack.Screen name="Upgrade Premium" component={UpgradePremium} />
<Stack.Screen name="Camera" component={Cameras} /> <Stack.Screen name="Camera" component={Cameras} />
<Stack.Screen name="Delivery Address" component={DeliveryAddress} /> <Stack.Screen name="Delivery Address" component={DeliveryAddress} options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontFamily: 'Gotham-Black',
color: 'white',
fontSize: 20,
},
title: 'Delivery Address'
}} />
<Stack.Screen name="Address Detail" component={AddressDetail} /> <Stack.Screen name="Address Detail" component={AddressDetail} />
<Stack.Screen name="Menu Detail" component={MenuDetail} options={({route})=>({title:route.params.nameMenu, <Stack.Screen name="Menu Detail" component={MenuDetail} options={({ route }) => ({
headerStyle: { backgroundColor: '#CFB368' }, title: route.params.nameMenu,
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center', headerTitleAlign: 'center',
headerTintColor: '#fff', headerTintColor: '#fff',
...@@ -267,8 +279,9 @@ class Auth extends React.Component { ...@@ -267,8 +279,9 @@ class Auth extends React.Component {
fontFamily: 'Gotham-Black', fontFamily: 'Gotham-Black',
color: 'white', color: 'white',
textAlign: 'center' textAlign: 'center'
}}) } /> }
<Stack.Screen name="Pickup Name" component={PickupName} options={{ })} />
<Stack.Screen name="Pickup Name" component={PickupName} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center', headerTitleAlign: 'center',
...@@ -279,7 +292,7 @@ class Auth extends React.Component { ...@@ -279,7 +292,7 @@ class Auth extends React.Component {
color: 'white', color: 'white',
textAlign: 'center' textAlign: 'center'
}, title: 'PICKUP STORE' }, title: 'PICKUP STORE'
}}/> }} />
<Stack.Screen name="Outlet Detail" component={OutletDetail} /> <Stack.Screen name="Outlet Detail" component={OutletDetail} />
<Stack.Screen name="Menu Select" component={MenuSelection} options={{ headerShown: false }} /> <Stack.Screen name="Menu Select" component={MenuSelection} options={{ headerShown: false }} />
<Stack.Screen name="Card Info" component={CardInfo} /> <Stack.Screen name="Card Info" component={CardInfo} />
...@@ -370,17 +383,17 @@ class Auth extends React.Component { ...@@ -370,17 +383,17 @@ class Auth extends React.Component {
}} /> }} />
<Stack.Screen name="TopUpInfo" component={TopUpInfo} /> <Stack.Screen name="TopUpInfo" component={TopUpInfo} />
<Stack.Screen name="Reward Detail" component={RewardDetail} options={{ <Stack.Screen name="Reward Detail" component={RewardDetail} options={{
headerStyle: { backgroundColor: "#ccb46c" }, headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' }, headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff', headerTintColor: '#fff',
headerTitleAlign: 'center', headerTitleAlign: 'center',
headerTitleStyle: { headerTitleStyle: {
fontFamily: 'Gotham-Black', fontFamily: 'Gotham-Black',
color: 'white', color: 'white',
fontSize: 20, fontSize: 20,
}, },
title: 'REWARD DETAIL' title: 'REWARD DETAIL'
}} /> }} />
<Stack.Screen name="Reward Select" component={RewardSelect} /> <Stack.Screen name="Reward Select" component={RewardSelect} />
</Stack.Navigator> </Stack.Navigator>
) )
......
import React from 'react'; import React from 'react';
import { View, Text, StyleSheet, Button, FlatList, Alert } from 'react-native'; import { View, Text, StyleSheet, Button, FlatList, Alert, TextInput, Image } from 'react-native';
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler'; import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { CheckBox, Icon } from 'react-native-elements';
import Axios from 'axios'; import Axios from 'axios';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
// import ravLog from '../helper/debug'; // import ravLog from '../helper/debug';
class DeliveryAddrees extends React.Component { class DeliveryAddrees extends React.Component {
...@@ -11,6 +13,8 @@ class DeliveryAddrees extends React.Component { ...@@ -11,6 +13,8 @@ class DeliveryAddrees extends React.Component {
super(props) super(props)
this.state = { this.state = {
data: [], data: [],
data_before_search: [],
search: '',
// outlet_id: '', // outlet_id: '',
// grabamount: '' // grabamount: ''
} }
...@@ -42,7 +46,8 @@ class DeliveryAddrees extends React.Component { ...@@ -42,7 +46,8 @@ class DeliveryAddrees extends React.Component {
} }
this.setState({ this.setState({
data: address data: address,
data_before_search: dataAlamat,
}) })
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
...@@ -106,6 +111,27 @@ class DeliveryAddrees extends React.Component { ...@@ -106,6 +111,27 @@ class DeliveryAddrees extends React.Component {
} }
filterData(text) {
const newData = this.state.data_before_search.filter(function (item) {
const itemData = item.name ? item.name.toUpperCase() : ''.toUpperCase();
const textData = text.toUpperCase();
return itemData.indexOf(textData) > -1;
});
if (text === '') {
this.setState({
data: this.state.data_before_search,
search: ''
})
} else {
this.setState({
data: newData,
search: text
});
}
}
onSave(address, id) { onSave(address, id) {
let setDataAddress = { let setDataAddress = {
...@@ -182,18 +208,36 @@ class DeliveryAddrees extends React.Component { ...@@ -182,18 +208,36 @@ class DeliveryAddrees extends React.Component {
renderItem = ({ item }) => { renderItem = ({ item }) => {
return ( return (
<View style={styles.list_addrees}> <View style={styles.list_addrees}>
<TouchableOpacity onPress={() => this.onSave(item.address, item.id)}> <TouchableOpacity onPress={() => this.onSave(item.address, item.id)}>
<View style={{ margin: 5, }}> <View style={{ flex: 1, flexDirection: 'row', margin: 20, }}>
<Text style={{ fontWeight: 'bold', fontSize: 20 }}>{item.name}</Text> <View style={{ flex: 1, marginBottom: 10, justifyContent: 'center' }}>
</View> <CheckBox
<Text style={{ margin: 5 }}> center
{item.address} checkedIcon='dot-circle-o'
</Text> uncheckedIcon='circle-o'
<Text style={{ margin: 5 }}> checked={this.state.checked}
Patokan : {item.description} checkedColor="#ccb46c"
</Text> uncheckedColor="#ccb46c"
</TouchableOpacity> />
</View> <Text style={{ textAlign: 'center', color: '#ccb46c', fontFamily: 'Gotham-Light' }}>PILIH</Text>
</View>
<View style={{ flex: 3, justifyContent: 'center' }}>
<View style={{ margin: 5, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 19, marginBottom: 5 }}>{item.name}</Text>
</View>
<Text style={{ fontFamily: 'Gotham-Light', color: 'grey', fontSize: 15, marginBottom: 5 }}>{item.address}</Text>
</View>
<View style={{ flex: 1,justifyContent:'center' }}>
<View style={{ margin: 5, }}>
<Image
style={{height:20,width:20,tintColor:'#ccb46c'}}
source={require('../assets/ellipsis-v.png')}
/>
</View>
</View>
</View>
</TouchableOpacity>
</View>
); );
} }
...@@ -202,12 +246,29 @@ class DeliveryAddrees extends React.Component { ...@@ -202,12 +246,29 @@ class DeliveryAddrees extends React.Component {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.body}> <View style={{ height: 45, borderRadius: 10, borderColor: '#ccb46c', borderWidth: 1, flexDirection: 'row', marginTop: 15, marginLeft: 10, marginRight: 10 }}>
{/* <ScrollView> */} <View style={{ flex: 1 }}>
<View style={styles.btn_addreess}> <MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
<Button title="Tambah Alamat" onPress={() => this.addAdreess()}></Button> </View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder="Cari Alamat"
onChangeText={text => this.filterData(text)}
onClear={text => this.filterData('')}
value={this.state.search}></TextInput>
</View> </View>
<View style={{ flex: 1, margin: 5 }}>
<Ionicons name="ios-search" size={32} color="#ccb46c" />
</View>
</View>
<View style={styles.btn_addreess}>
<TouchableOpacity onPress={() => this.addAdreess()}>
<View style={{ height: 40, borderRadius: 15, marginRight: 70, marginLeft: 70, backgroundColor: '#CFB368', justifyContent: 'center', alignContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', color: 'white', fontSize: 20 }}> + Tambah Alamat </Text>
</View>
</TouchableOpacity>
</View>
<View style={styles.listAddress}>
<FlatList <FlatList
data={this.state.data} data={this.state.data}
renderItem={this.renderItem} renderItem={this.renderItem}
...@@ -232,7 +293,7 @@ const styles = StyleSheet.create({ ...@@ -232,7 +293,7 @@ const styles = StyleSheet.create({
body: { body: {
flex: 3, flex: 3,
marginTop:10, marginTop: 10,
marginRight: 20, marginRight: 20,
marginLeft: 20, marginLeft: 20,
marginBottom: 20, marginBottom: 20,
...@@ -240,14 +301,16 @@ const styles = StyleSheet.create({ ...@@ -240,14 +301,16 @@ const styles = StyleSheet.create({
}, },
btn_addreess: { btn_addreess: {
margin: 20, margin: 10,
}, },
list_addrees: { list_addrees: {
flex: 1, flex: 1,
margin: 20, margin: 20,
borderWidth: 1, borderWidth: 1,
borderColor: 'grey',
borderRadius: 10,
} }
}) })
...@@ -347,4 +410,20 @@ export default connect(mapStateToProps, mapDispatchToProps)(DeliveryAddrees) ...@@ -347,4 +410,20 @@ export default connect(mapStateToProps, mapDispatchToProps)(DeliveryAddrees)
// renderItem={this.renderItem} // renderItem={this.renderItem}
// keyExtractor={item => item.id} // keyExtractor={item => item.id}
// /> // />
// </View> // </View>
\ No newline at end of file
// <View style={styles.body}>
// {/* <ScrollView> */}
// <View style={styles.btn_addreess}>
// <Button title="Tambah Alamat" onPress={() => this.addAdreess()}></Button>
// </View>
// <FlatList
// data={this.state.data}
// renderItem={this.renderItem}
// keyExtractor={item => item.id}
// />
// </View>
\ No newline at end of file
...@@ -126,27 +126,6 @@ class PickupName extends React.Component { ...@@ -126,27 +126,6 @@ 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({
...@@ -229,16 +208,14 @@ class PickupName extends React.Component { ...@@ -229,16 +208,14 @@ class PickupName extends React.Component {
<View style={{ margin: 5 }}> <View style={{ margin: 5 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20 }}>{item.name}</Text>
<View style={{flexDirection:'row'}}> <View style={{flexDirection:'row'}}>
{item.can_accept_order == true ? (<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c",top:5}}>OPEN - </Text>) {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> :(<Text style={{fontFamily: 'Gotham-Black',color:"#ccb46c"}}>CLOSED : </Text>) }
</View> </View>
</View> </View>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 15}}> Opening Hours : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, color: '#b1b1b2',fontFamily: 'Gotham-Light' }}> <Text style={{ margin: 5, color: '#b1b1b2',fontFamily: 'Gotham-Light' }}>
{item.full_address} {item.full_address}
</Text> </Text>
<Text style={{ margin: 5, color: '#aeaead',fontFamily: 'Gotham-Light' }}>
{item.distance} KM
</Text>
</View> </View>
<View> <View>
<CheckBox <CheckBox
...@@ -249,7 +226,7 @@ class PickupName extends React.Component { ...@@ -249,7 +226,7 @@ class PickupName extends React.Component {
checkedColor="#ccb46c" checkedColor="#ccb46c"
uncheckedColor="#ccb46c" uncheckedColor="#ccb46c"
/> />
<Text style={{textAlign:'center',color:'#ccb46c',fontFamily:'Gotham-Light' }}>PILIH</Text> <Text style={{textAlign:'center',color:'#ccb46c',fontFamily:'Gotham-Light' }}>{item.distance} KM</Text>
</View> </View>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
......
...@@ -84,9 +84,9 @@ class RewardSelect extends React.Component { ...@@ -84,9 +84,9 @@ class RewardSelect extends React.Component {
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
{/* <View style={styles.header}> */} <View style={styles.header}>
{/* <Text style={{ color: 'white', textAlign: 'center', fontSize: 28 }}>REWARDS E-VOUCHER</Text> */} <Text style={{ color: 'white', textAlign: 'center', fontSize: 18, fontFamily: 'Gotham-Black' }}>REWARDS E-VOUCHER</Text>
{/* </View> */} </View>
<ScrollView style={styles.body}> <ScrollView style={styles.body}>
{ {
this.state.rewardsList.map((item, key) => ( this.state.rewardsList.map((item, key) => (
...@@ -101,12 +101,12 @@ class RewardSelect extends React.Component { ...@@ -101,12 +101,12 @@ class RewardSelect extends React.Component {
</View> </View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 10 }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', padding: 10 }}>
<View> <View>
<Text style={{ color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 14, textAlign: 'center' }}>{item.reward.title}</Text> <Text style={{textAlign:'left', fontSize: 12, fontFamily: 'Gotham-Black'}}>{item.reward.title}</Text>
<Text style={{ color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 14, textAlign: 'center' }}>{item.reward.subtitle}</Text> <Text style={{textAlign:'left', fontSize: 12, fontFamily: 'Gotham-Light'}}>{item.reward.subtitle}</Text>
</View> </View>
<View> <View>
<Text style={{ color: '#CFB368', textAlign: 'right', fontFamily: 'Gotham-Black', fontSize: 12 }}>Expired</Text> <Text style={{textAlign:'right', fontSize: 12, fontFamily: 'Gotham-Light'}}>Expired</Text>
<Text style={{ color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 12, textAlign: 'center' }}>{item.expire_time}</Text> <Text style={{textAlign:'right', fontSize: 12, fontFamily: 'Gotham-Light'}}>{item.expire_time}</Text>
</View> </View>
</View> </View>
</Card> </Card>
......
...@@ -51,7 +51,7 @@ class RewardsList extends React.Component { ...@@ -51,7 +51,7 @@ class RewardsList extends React.Component {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.header}> <View style={styles.header}>
<Text style={{ color: 'white', textAlign: 'center', fontSize: 28 }}>REWARDS E-VOUCHER</Text> <Text style={{ color: 'white', textAlign: 'center', fontSize: 18, fontFamily: 'Gotham-Black' }}>REWARDS E-VOUCHER</Text>
</View> </View>
<ScrollView style={styles.body}> <ScrollView style={styles.body}>
{ {
...@@ -67,12 +67,12 @@ class RewardsList extends React.Component { ...@@ -67,12 +67,12 @@ class RewardsList extends React.Component {
</View> </View>
<View style={{ flexDirection: 'row', justifyContent:'space-between', padding:10 }}> <View style={{ flexDirection: 'row', justifyContent:'space-between', padding:10 }}>
<View> <View>
<Text style={{ color:'#CFB368',fontFamily: 'Gotham-Black', fontSize: 14, textAlign: 'center'}}>{item.reward.title}</Text> <Text style={{textAlign:'left', fontSize: 12, fontFamily: 'Gotham-Black'}}>{item.reward.title}</Text>
<Text style={{ color:'#CFB368',fontFamily: 'Gotham-Black', fontSize: 14, textAlign: 'center'}}>{item.reward.subtitle}</Text> <Text style={{textAlign:'left', fontSize: 12, fontFamily: 'Gotham-Light'}}>{item.reward.subtitle}</Text>
</View> </View>
<View> <View>
<Text style={{color:'#CFB368', textAlign:'right',fontFamily: 'Gotham-Black', fontSize: 12}}>Expired</Text> <Text style={{textAlign:'right', fontSize: 12, fontFamily: 'Gotham-Light'}}>Expired</Text>
<Text style={{ color:'#CFB368',fontFamily: 'Gotham-Black', fontSize: 12, textAlign: 'center'}}>{item.expire_time}</Text> <Text style={{textAlign:'right', fontSize: 12, fontFamily: 'Gotham-Light'}}>{item.expire_time}</Text>
</View> </View>
</View> </View>
</Card> </Card>
...@@ -80,9 +80,10 @@ class RewardsList extends React.Component { ...@@ -80,9 +80,10 @@ class RewardsList extends React.Component {
</TouchableOpacity> </TouchableOpacity>
)) ))
} }
<TouchableOpacity style={{margin:20}} onPress={()=> this.props.navigation.navigate('Reward History')}> <TouchableOpacity onPress={()=> this.props.navigation.navigate('Reward History')}>
<Text style={{ color:'#CFB368', fontFamily: 'Gotham-Black', fontSize: 15, textAlign: 'center'}}>REDEEM E-VOUCHER HISTORY</Text> <Text style={{ textAlign: 'center', color: '#CFB368', fontSize: 12, fontFamily: 'Gotham-Black' }}>REDEEM E-VOUCHER HISTORY</Text>
</TouchableOpacity> </TouchableOpacity>
<View style={{height:15}}/>
</ScrollView> </ScrollView>
</View> </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