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

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

# Conflicts:
#	view/Auth.js
parents 71aa7f84 3b67158f
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import * as React from 'react'; import * as React from 'react';
import { createStackNavigator, HeaderBackButton } from '@react-navigation/stack'; import { createStackNavigator, HeaderBackButton } from '@react-navigation/stack';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { View, Text } from 'react-native'; import { View, Text, Image } from 'react-native';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import MenuSelection from './MenuSelection'; import MenuSelection from './MenuSelection';
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons'; import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
...@@ -62,23 +62,52 @@ function HomePage({ navigation }) { ...@@ -62,23 +62,52 @@ function HomePage({ navigation }) {
return ( return (
<Tab.Navigator <Tab.Navigator
// screenOptions={({ route }) => ({
// tabBarIcon: ({ focused, color, size }) => {
// let iconName;
// if (route.name === 'HOME') {
// iconName = focused ? 'ios-home' : 'ios-home'
// } else if (route.name === 'MENU') {
// iconName = focused ? 'ios-paper' : 'ios-paper';
// } else if (route.name === 'REWARDS') {
// iconName = focused ? 'ios-gift' : 'ios-gift';
// } else if (route.name === 'ORDER') {
// iconName = focused ? 'md-cart' : 'md-cart';
// } else if (route.name === 'OUTLETS') {
// iconName = focused ? 'ios-cafe' : 'ios-cafe';
// } else if (route.name === 'ACCOUNT') {
// iconName = focused ? 'account' : 'account';
// return <MaterialCommunityIcons name={iconName} size={size} color={color} />
// }
// // You can return any component that you like here!
// return <Ionicons name={iconName} size={size} color={color} />;
// },
// })}
screenOptions={({ route }) => ({ screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => { tabBarIcon: ({ focused, color, size }) => {
let iconName; let iconName;
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'} />
} 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'}/>
} 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'}/>
} 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'}/>
} 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'}/>
} else if (route.name === 'ACCOUNT') { } else if (route.name === 'ACCOUNT') {
iconName = focused ? 'account' : 'account'; // iconName = focused ? 'account' : 'account';
return <MaterialCommunityIcons name={iconName} size={size} color={color} /> 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!
...@@ -86,7 +115,9 @@ function HomePage({ navigation }) { ...@@ -86,7 +115,9 @@ function HomePage({ navigation }) {
}, },
})} })}
tabBarOptions={{ activeTintColor: 'cornflowerblue', inactiveTintColor: 'gray' }}
tabBarOptions={{ activeTintColor: '#CFB368', inactiveTintColor: 'gray', showLabel: false }}
> >
<Tab.Screen name="HOME" component={Home} /> <Tab.Screen name="HOME" component={Home} />
<Tab.Screen name="MENU" component={MenuSelection} /> <Tab.Screen name="MENU" component={MenuSelection} />
......
...@@ -126,7 +126,7 @@ class Home extends React.Component { ...@@ -126,7 +126,7 @@ class Home extends React.Component {
let point = dataCard.kaspro_point let point = dataCard.kaspro_point
let balance = dataCard.kaspro_balance let balance = dataCard.kaspro_balance
let expire = dataCard.expire_date let expire = dataCard.expire_date
let account_number = dataCard.kaspro_account_number let account_number = dataCard.card_number
this.setState({ this.setState({
point: point, point: point,
...@@ -259,16 +259,16 @@ class Home extends React.Component { ...@@ -259,16 +259,16 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text> <Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */} </TouchableOpacity> */}
<TouchableOpacity style={styles.buttonDelivery} onPress={() => this._delivery()}> <TouchableOpacity style={styles.buttonDelivery} onPress={() => this._delivery()}>
<Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold' }}>DELIVERY</Text> <Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold',fontFamily:'Gotham-Black' }}>DELIVERY</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.buttonPickup} onPress={() => this._pickup()}> <TouchableOpacity style={styles.buttonPickup} onPress={() => this._pickup()}>
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>PICK UP</Text> <Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold',fontFamily:'Gotham-Black' }}>PICK UP</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}> {/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
{i18n.t('orderInfo')} {i18n.t('orderInfo')}
</Text> */} </Text> */}
<Text style={{ textAlign: 'center', fontSize: 12, }}> <Text style={{ textAlign: 'center', fontSize: 12, fontFamily:'Gotham-Black' }}>
YOU WILL PICKUP YOUR ORDER AT YOU WILL PICKUP YOUR ORDER AT
</Text> </Text>
{this.state.indicator == true ? ( {this.state.indicator == true ? (
...@@ -313,11 +313,19 @@ class Home extends React.Component { ...@@ -313,11 +313,19 @@ class Home extends React.Component {
{/* <Text> {/* <Text>
{i18n.t('yourCardNumber')} | {this.state.expire_date}{'\n'} {i18n.t('yourCardNumber')} | {this.state.expire_date}{'\n'}
</Text> */} </Text> */}
<Text> {/* <Text>
YOUR CARD NUMBER | {this.state.expire_date} YOUR CARD NUMBER | {this.state.expire_date}
</Text> </Text> */}
<View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 9 ,fontFamily:'Gotham-Black'}}>YOUR CARD NUMBER</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 9, textAlign: 'right',fontFamily:'Gotham-Black' }}>Expired At {this.state.expire_date}</Text>
</View>
</View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
<Text style={{ textAlign: "center", fontSize: 30, color: '#c9af6d' }}> <Text style={{ textAlign: "center", fontSize: 30, color: '#c9af6d',fontFamily:'Gotham-Black' }}>
{this.state.account_number} {this.state.account_number}
</Text> </Text>
</View> </View>
...@@ -356,12 +364,22 @@ class Home extends React.Component { ...@@ -356,12 +364,22 @@ class Home extends React.Component {
</View> </View>
) )
} }
<TouchableOpacity style={styles.submitUpgradePemium} activeOpacity={.5} onPress={this.onPress}> <View style={{ flexDirection: 'row', flex: 1 }}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>TOP BALANCE </Text> <TouchableOpacity
</TouchableOpacity> // style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={this.onPress}>
<Text> App version : {version} </Text> <View style={styles.topUseBalance}>
<Text> Expo build version : {buildNumber} </Text> <Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>TOP BALANCE </Text>
</View>
</TouchableOpacity>
<TouchableOpacity
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={this.onPress}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>USE BALANCE </Text>
</View>
</TouchableOpacity>
</View>
<View style={{ height: 60 }}></View> <View style={{ height: 60 }}></View>
</View> </View>
</View> </View>
...@@ -437,16 +455,16 @@ const styles = StyleSheet.create({ ...@@ -437,16 +455,16 @@ const styles = StyleSheet.create({
borderColor: '#fff', borderColor: '#fff',
}, },
submitUpgradePemium: { topUseBalance: {
flex: 0.5,
backgroundColor: 'green',
top: 20, top: 20,
margin: 20, margin: 10,
paddingTop: 15, padding: 10,
paddingBottom: 5, paddingHorizontal: 30,
backgroundColor: '#c9af6d',
borderRadius: 10, borderRadius: 10,
width: "90%", backgroundColor: '#CFB368',
borderWidth: 0, paddingBottom: -5
borderColor: '#fff',
}, },
line: { line: {
......
...@@ -447,7 +447,8 @@ const styles = StyleSheet.create({ ...@@ -447,7 +447,8 @@ const styles = StyleSheet.create({
margin: 15, margin: 15,
fontSize: 26, fontSize: 26,
fontWeight: 'bold', fontWeight: 'bold',
color: 'white' color: 'white',
fontFamily : 'Gotham-Black'
}, },
textInput: { textInput: {
height: 40, height: 40,
......
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