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 { createStackNavigator, HeaderBackButton } from '@react-navigation/stack';
import { connect } from 'react-redux';
import { View, Text } from 'react-native';
import { View, Text, Image } from 'react-native';
import ActionType from '../redux/globalActionType';
import MenuSelection from './MenuSelection';
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
......@@ -62,23 +62,52 @@ function HomePage({ navigation }) {
return (
<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 }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
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') {
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') {
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') {
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') {
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') {
iconName = focused ? 'account' : 'account';
return <MaterialCommunityIcons name={iconName} size={size} color={color} />
// iconName = focused ? 'account' : 'account';
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!
......@@ -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="MENU" component={MenuSelection} />
......
......@@ -126,7 +126,7 @@ class Home extends React.Component {
let point = dataCard.kaspro_point
let balance = dataCard.kaspro_balance
let expire = dataCard.expire_date
let account_number = dataCard.kaspro_account_number
let account_number = dataCard.card_number
this.setState({
point: point,
......@@ -259,16 +259,16 @@ class Home extends React.Component {
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */}
<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 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>
</View>
{/* <Text style={{ textAlign: 'center', fontSize: 12, }}>
{i18n.t('orderInfo')}
</Text> */}
<Text style={{ textAlign: 'center', fontSize: 12, }}>
<Text style={{ textAlign: 'center', fontSize: 12, fontFamily:'Gotham-Black' }}>
YOU WILL PICKUP YOUR ORDER AT
</Text>
{this.state.indicator == true ? (
......@@ -313,11 +313,19 @@ class Home extends React.Component {
{/* <Text>
{i18n.t('yourCardNumber')} | {this.state.expire_date}{'\n'}
</Text> */}
<Text>
{/* <Text>
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 }}>
<Text style={{ textAlign: "center", fontSize: 30, color: '#c9af6d' }}>
<Text style={{ textAlign: "center", fontSize: 30, color: '#c9af6d',fontFamily:'Gotham-Black' }}>
{this.state.account_number}
</Text>
</View>
......@@ -356,12 +364,22 @@ class Home extends React.Component {
</View>
)
}
<TouchableOpacity style={styles.submitUpgradePemium} activeOpacity={.5} onPress={this.onPress}>
<View style={{ flexDirection: 'row', flex: 1 }}>
<TouchableOpacity
// style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={this.onPress}>
<View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>TOP BALANCE </Text>
</View>
</TouchableOpacity>
<Text> App version : {version} </Text>
<Text> Expo build version : {buildNumber} </Text>
<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>
</View>
......@@ -437,16 +455,16 @@ const styles = StyleSheet.create({
borderColor: '#fff',
},
submitUpgradePemium: {
topUseBalance: {
flex: 0.5,
backgroundColor: 'green',
top: 20,
margin: 20,
paddingTop: 15,
paddingBottom: 5,
backgroundColor: '#c9af6d',
margin: 10,
padding: 10,
paddingHorizontal: 30,
borderRadius: 10,
width: "90%",
borderWidth: 0,
borderColor: '#fff',
backgroundColor: '#CFB368',
paddingBottom: -5
},
line: {
......
......@@ -447,7 +447,8 @@ const styles = StyleSheet.create({
margin: 15,
fontSize: 26,
fontWeight: 'bold',
color: 'white'
color: 'white',
fontFamily : 'Gotham-Black'
},
textInput: {
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