Commit 742cdd41 authored by Trisno's avatar Trisno
parents deaba70b 2719898f
import * as React from 'react';
import Auth from './view/Auth';
import { NavigationContainer } from '@react-navigation/native';
import { persistStore, persistReducer } from 'redux-persist';
......@@ -11,15 +11,19 @@ import * as Localization from 'expo-localization';
import i18n from 'i18n-js';
import en from './lib/en';
import id from './lib/id';
import React, { useState, useEffect } from 'react';
import { Text, View } from 'react-native';
import { AppLoading } from 'expo';
import * as Font from 'expo-font';
export const lang = i18n.translations = {
en:en,
id:id
}
export const set_lang = i18n.locale = Localization.locale;
export const fallbacks = i18n.fallbacks = true;
export const lang = i18n.translations = {
en: en,
id: id
}
export const set_lang = i18n.locale = Localization.locale;
export const fallbacks = i18n.fallbacks = true;
const persistConfig = {
key: 'root',
......@@ -30,14 +34,39 @@ const persistReducers = persistReducer(persistConfig, rootReducer)
const store = createStore(persistReducers);
const persistor = persistStore(store)
i18n.locale = Localization.locale;
let customFonts = {
'Gotham-Black': require('./assets/font/Gotham-Bold-700.otf'),
'Gotham-SemiBoldItalic': require('./assets/font/Gotham-BoldItalic-400.otf'),
'Gotham-Thin': require('./assets/font/iCiel-Gotham-Thin.ttf'),
'Gotham-Light': require('./assets/font/Metropolis-Light.otf'),
};
export default function App() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer>
<Auth />
</NavigationContainer>
</PersistGate>
</Provider>
);
const [fontsLoaded, setfontsLoaded] = useState(false)
const loadFont = async () => {
await Font.loadAsync(customFonts);
};
useEffect(() => {
console.log('===> Did Mount');
loadFont().then(_ => {
setfontsLoaded(true);
})
}, [])
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer>
<Auth />
</NavigationContainer>
</PersistGate>
</Provider>
);
}
}
{
"expo": {
"name": "Excelso_update v1. 13.05.2020",
"name": "Excelso_update v1. siang.13.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......
......@@ -1409,6 +1409,11 @@
"prop-types": "^15.6.1"
}
},
"@use-expo/font": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@use-expo/font/-/font-2.0.0.tgz",
"integrity": "sha512-oOJ2uaRyZNQg7PnQviz7nBcdrRL38zxScab4ktgtI4asa6G0dHW9wg307uJJmn0sHS04Yqtw+m0EOjDcGw3iWg=="
},
"@valdio/react-native-scrollable-tabview": {
"version": "0.8.12",
"resolved": "https://registry.npmjs.org/@valdio/react-native-scrollable-tabview/-/react-native-scrollable-tabview-0.8.12.tgz",
......@@ -6278,9 +6283,9 @@
}
},
"react-native-device-info": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-5.5.3.tgz",
"integrity": "sha512-bzUVTPHca+FfNco1qaOM1+idoeII8zdpGRsR+RK+DWhwp9utHZWfbkonZZ9XFm/U+i3mirNxt6oaKV+vUMjMzg=="
"version": "5.5.7",
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-5.5.7.tgz",
"integrity": "sha512-0021blhx/N1+mWQPOW3QAMWhOjYdG0uC5n+P6sMXZD3pF9aiIeCKuw4JpBpfNXXpUmDmQ7qWgHZUZO7JBMRijw=="
},
"react-native-drawer": {
"version": "2.5.1",
......
......@@ -14,6 +14,7 @@
"@react-navigation/native": "^5.0.5",
"@react-navigation/stack": "^5.0.5",
"@shankarmorwal/rn-viewpager": "^1.2.11",
"@use-expo/font": "^2.0.0",
"@valdio/react-native-scrollable-tabview": "^0.8.12",
"accordion-collapse-react-native": "^0.2.8",
"axios": "^0.19.2",
......@@ -39,7 +40,7 @@
"react-native-check-box": "^2.1.7",
"react-native-date-picker": "^2.7.7",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^5.5.3",
"react-native-device-info": "^5.5.7",
"react-native-elements": "^1.2.7",
"react-native-form-select-picker": "0.0.7",
"react-native-fs": "^2.16.6",
......@@ -75,5 +76,6 @@
"babel-preset-expo": "~8.0.0",
"@babel/core": "^7.0.0"
},
"private": true
}
......@@ -56,10 +56,10 @@ enableScreens();
const Tab = createBottomTabNavigator();
function HomePage({navigation}) {
function HomePage({ navigation }) {
return (
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
......@@ -88,7 +88,7 @@ function HomePage({navigation}) {
tabBarOptions={{ activeTintColor: 'cornflowerblue', inactiveTintColor: 'gray' }}
>
<Tab.Screen name="HOME" component={Home} />
<Tab.Screen name="HOME" component={Home} />
<Tab.Screen name="MENU" component={MenuSelection} />
<Tab.Screen name="REWARDS" component={RewardsList} />
<Tab.Screen name="ORDER" component={OrderHistory} />
......@@ -113,7 +113,7 @@ class Auth extends React.Component {
this.props.session_id === '' ? (
<>
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
......@@ -124,11 +124,24 @@ class Auth extends React.Component {
<>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Home" component={Home} options={{headerShown:false}} />
<Stack.Screen name="Home" component={Home} options={{ headerShown: false }} />
</>
) : (
<>
<Stack.Screen name="Home" component={HomePage} options={{headerShown:false}}/>
<Stack.Screen name="Home" component={HomePage}
options={{
headerShown: false,
title: 'TODAY PROMOTION',
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle:{alignContent:'center'},
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color:'white',
textAlign:'center'
}
}} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Change language" component={ChangeLanguage} />
......@@ -136,26 +149,27 @@ class Auth extends React.Component {
<Stack.Screen name="Card Activation" component={CardActivation} />
<Stack.Screen name="Renewal" component={Renewal} />
<Stack.Screen name="Account" component={Account} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="Transfer Balance" component={TransferBalance} />
<Stack.Screen name="Register" component={Register} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Upgrade Premium" component={UpgradePremium} />
<Stack.Screen name="Camera" component={Cameras} />
<Stack.Screen name="Delivery Address" component={DeliveryAddress}/>
<Stack.Screen name="Delivery Address" component={DeliveryAddress} />
<Stack.Screen name="Address Detail" component={AddressDetail} />
<Stack.Screen name="Menu Detail" component={MenuDetail} />
<Stack.Screen name="Pickup Name" component={PickupName} options={{title:"PICKUP STORE",headerStyle:{backgroundColor:"#ccb46c"},headerTitleAlign:'center',headerTitleStyle:{color:'white',fontWeight:'bold'}}} />
<Stack.Screen name="Outlet Detail" component={OutletDetail}/>
<Stack.Screen name="Menu Select" component={MenuSelection} options={{headerShown:false}} />
<Stack.Screen name="Pickup Name" component={PickupName} options={{ title: "PICKUP STORE", headerStyle: { backgroundColor: "#ccb46c" }, headerTitleAlign: 'center', headerTitleStyle: { color: 'white', fontWeight: 'bold' } }} />
<Stack.Screen name="Outlet Detail" component={OutletDetail} />
<Stack.Screen name="Menu Select" component={MenuSelection} options={{ headerShown: false }} />
<Stack.Screen name="Card Info" component={CardInfo} />
<Stack.Screen name="Shopping Cart" component={ShoppingCart} />
<Stack.Screen name="Order History" component={OrderHistory} />
<Stack.Screen name="Reward History" component={RewardHistory} />
<Stack.Screen name="Order Detail" component={OrderDetail} options={({ navigation, route }) => ({ headerLeft: props => <HeaderBackButton {...props} onPress={()=>navigation.navigate('Home',{screen:'ORDER'})}/>,
})}/>
<Stack.Screen name="Order Detail" component={OrderDetail} options={({ navigation, route }) => ({
headerLeft: props => <HeaderBackButton {...props} onPress={() => navigation.navigate('Home', { screen: 'ORDER' })} />,
})} />
</>
)
......@@ -177,10 +191,10 @@ class Auth extends React.Component {
<Stack.Screen name="News Detail" component={NewsDetail} />
{/* <Stack.Screen name="Delivery Address" component={DeliveryAddress} /> */}
<Stack.Screen name="Confirm Your Order" component={MenuConfirmation} />
{/* <Stack.Screen name="Card Info" component={CardInfo} /> */}
{/* <Stack.Screen name="Change password" component={ChangePassword} /> */}
......
......@@ -12,8 +12,13 @@ import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device';
import ActionType from '../redux/globalActionType';
import session from '../function/session';
import Constants from 'expo-constants';
import info from '../app.json';
let version = info.expo.version
let buildNumber = info.expo.android.versionCode
class Home extends React.Component {
constructor(props) {
......@@ -31,6 +36,7 @@ class Home extends React.Component {
}
componentDidMount() {
console.log("INI BUILD VERSION : "+ Constants.nativeBuildVersio)
this._account();
this._getPermissions()
this._renderCarousell()
......@@ -294,7 +300,9 @@ class Home extends React.Component {
<TouchableOpacity style={styles.submitUpgradePemium} activeOpacity={.5} onPress={this.onPress}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white' }}>TOP BALANCE </Text>
</TouchableOpacity>
<Text> 13 May 2020 </Text>
<Text> App version : {version} </Text>
<Text> Expo build version : {buildNumber} </Text>
<View style={{ height: 60 }}></View>
</View>
</View>
......
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform } from 'react-native';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground } from 'react-native';
import Axios from 'axios';
import Constants from 'expo-constants';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { Notifications } from 'expo';
import i18n from 'i18n-js';
import { StackActions } from '@react-navigation/native';
import Spinner from 'react-native-loading-spinner-overlay';
class Login extends React.Component {
constructor(props) {
......@@ -29,7 +26,7 @@ class Login extends React.Component {
})
}
componentDidMount(){
componentDidMount() {
// console.log(this.props.language)
}
......@@ -37,208 +34,210 @@ class Login extends React.Component {
if (/\s/.test(this.state.email)) {
Alert.alert('Email tidak boleh mengandung spasi')
} else {
this.setState({
spinner: true,
})
try {
let device_id = Constants.deviceId
let os_name = Constants.platform
// let fb_token = await Notifications.getExpoPushTokenAsync();
let os_version = Platform.Version
if (this.props.device_id) {
this.setState({
device_id: this.props.device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
})
} else {
let deviceInfoProps = {
device_id: device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
this.setState({
spinner: true,
})
try {
let device_id = Constants.deviceId
let os_name = Constants.platform
// let fb_token = await Notifications.getExpoPushTokenAsync();
let os_version = Platform.Version
if (this.props.device_id) {
this.setState({
device_id: this.props.device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
})
} else {
let deviceInfoProps = {
device_id: device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
}
// console.log(deviceInfoProps);
this.props.setDeviceInfo(deviceInfoProps)
}
// console.log(deviceInfoProps);
this.props.setDeviceInfo(deviceInfoProps)
}
} catch (error) {
} catch (error) {
let device_id = Constants.deviceId
let os_name = Constants.platform
let fb_token = await Notifications.getExpoPushTokenAsync();
let os_version = Platform.Version
if (this.props.device_id) {
this.setState({
device_id: this.props.device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
})
} else {
let deviceInfoProps = {
device_id: device_id,
os_name: os_name,
os_version: os_version,
fb_token: fb_token,
}
this.props.setDeviceInfo(deviceInfoProps)
}
let device_id = Constants.deviceId
let os_name = Constants.platform
let fb_token = await Notifications.getExpoPushTokenAsync();
let os_version = Platform.Version
this.state.os_name = '';
this.state.os_version = '';
this.state.fb_token = '';
}
if (this.props.device_id) {
if (this.props.app_version) {
this.setState({
device_id: this.props.device_id,
os_name: os_name,
fb_token: fb_token,
os_version: os_version,
app_version: this.props.app_version
})
} else {
let deviceInfoProps = {
device_id: device_id,
os_name: os_name,
os_version: os_version,
fb_token: fb_token,
}
this.props.setDeviceInfo(deviceInfoProps)
this.setState({
app_version: 'Unknown'
})
}
this.state.os_name = '';
this.state.os_version = '';
this.state.fb_token = '';
}
if (this.props.app_version) {
this.setState({
app_version: this.props.app_version
})
} else {
this.setState({
app_version: 'Unknown'
})
}
//get request
let params = {
"email": this.state.email,
"password": this.state.password,
"fb_token": this.state.fb_token,
"device_id": this.state.device_id,
"os_name": this.state.os_name,
"os_version": this.state.os_version,
"app_version": this.state.app_version,
}
// console.log(params)
Axios.post(BASE_URL_LOGIN, params).then(res => {
const navigation = this.props.navigation
let loginProps = {
email: this.state.email,
password: this.state.password,
session_id: res.data.session_id
//get request
let params = {
"email": this.state.email,
"password": this.state.password,
"fb_token": this.state.fb_token,
"device_id": this.state.device_id,
"os_name": this.state.os_name,
"os_version": this.state.os_version,
"app_version": this.state.app_version,
}
// console.log(params)
Axios.post(BASE_URL_LOGIN, params).then(res => {
let prosesProps = {
proses:'Register'
}
this.props.setProses(prosesProps);
this.props.setLoginInfo(loginProps);
this.setState({
spinner: false,
})
navigation.reset({
index: 0,
routes: [
{
name: 'Home',
params: { someParam: 'Param1' },
},
],
})
console.log("INI SESSION : " + this.props.session_id)
}).catch(error => {
let response = error.response.data;
if (response.code === "NEED_VERIFICATION") {
const navigation = this.props.navigation
let loginProps = {
email: this.state.email,
password: this.state.password,
password: this.state.password,
session_id: res.data.session_id
}
let emailConfirmProps = {
isEmailverif: true
}
let pageProps = {
pageEmailConfirmation:true
let prosesProps = {
proses: 'Register'
}
this.props.setLoginInfo(loginProps)
this.props.setEmailConfirm(emailConfirmProps)
this.props.setPage(pageProps)
this.props.setProses(prosesProps);
this.props.setLoginInfo(loginProps);
this.setState({
spinner: false,
})
this.props.navigation.navigate('Email Confirmation')
} else {
let response = error.response.data;
Alert.alert(response.msg);
this.setState({
spinner: false,
navigation.reset({
index: 0,
routes: [
{
name: 'Home',
params: { someParam: 'Param1' },
},
],
})
}
})
console.log("INI SESSION : " + this.props.session_id)
}).catch(error => {
let response = error.response.data;
if (response.code === "NEED_VERIFICATION") {
let loginProps = {
email: this.state.email,
password: this.state.password,
}
let emailConfirmProps = {
isEmailverif: true
}
let pageProps = {
pageEmailConfirmation: true
}
this.props.setLoginInfo(loginProps)
this.props.setEmailConfirm(emailConfirmProps)
this.props.setPage(pageProps)
this.setState({
spinner: false,
})
this.props.navigation.navigate('Email Confirmation')
} else {
let response = error.response.data;
Alert.alert(response.msg);
this.setState({
spinner: false,
})
}
})
}
}
}
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={styles.form}>
<View style={{ marginRight: 10, marginLeft: 10, }}>
<Text style={{ top: 5 }}>Email</Text>
</View>
<View style={{ margin: 10 }}>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'
/>
</View>
<View style={{ marginRight: 10, marginLeft: 10 }}>
<Text style={{ top: 5 }}>{i18n.t('password')}</Text>
</View>
<View style={{ margin: 10 }}>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
onChangeText={password => this.setState({ password })}
value={this.state.password}
secureTextEntry={true}
/>
</View>
<View style={{ marginRight: 10, marginLeft: 10 }}>
<Button
title={i18n.t('login')}
onPress={() => this.handleLoggin()}
/>
<StatusBar
hidden={true} />
<ImageBackground source={require('../assets/images/loging-background.jpg')} style={{ width: '100%', height: '100%' }}>
<View style={styles.logo}>
<Image source={require('../assets/images/excelso-log.png')} style={styles.imageslogo}></Image>
</View>
</View>
<View style={styles.footer}>
<View style={styles.container_register}>
<View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('New Register')}>
<Text style={{ fontSize: 20 }}>{i18n.t('register')}</Text>
<View style={styles.v_form}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Email</Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 10, borderRadius: 10,textAlign:'center', fontFamily:'Gotham-Black',color:'white',fontSize:13,fontWeight:'bold' }}
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'
/>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Password</Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 10,textAlign:'center',fontFamily:'Gotham-Black',color:'white',fontSize:13,fontWeight:'bold' }}
onChangeText={password => this.setState({ password })}
value={this.state.password}
secureTextEntry={true}
/>
</View>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={()=>this.handleLoggin()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGIN</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ flex: 1, }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Reset Password')}>
<Text style={{ fontSize: 20, textAlign: 'right' }}>{i18n.t('forgotPassword')}</Text>
</View>
<View style={styles.v_policy}>
<View style={{ flex: 1, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('New Register')}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>REGISTER</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Reset Password')}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 19, textAlign: 'center', marginTop: 5 }}>FORGOT PASSWORD</Text>
</TouchableOpacity>
</View>
<View style={{ flex: 1, justifyContent: 'center', marginRight: 60, marginLeft: 60 }}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 13, textAlign: 'center', marginBottom: 5 }}>
Dengan Login atau Register, Kamu menyetujui aturan <Text style={{ fontWeight: 'bold' }}> Panduan Layanan</Text> dan <Text style={{ fontWeight: 'bold' }}>Kebijakan Privasi kami</Text>
</Text>
</View>
</View>
</View>
</ImageBackground>
</View>
)
}
......@@ -247,19 +246,30 @@ class Login extends React.Component {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
backgroundColor: '#151515',
},
form: {
flex: 6,
logo: {
flex: 2.5,
height: 50
},
footer: {
flex: 1,
imageslogo: {
height: 170,
margin: 10,
width: 150,
justifyContent: 'center',
alignSelf: 'center',
top: 50
},
v_form: {
flex: 3,
// borderColor: 'red',
// borderWidth: 1,
},
container_register: {
height: 50,
flexDirection: 'row',
margin: 10
v_policy: {
flex: 2,
// borderColor: 'red',
// borderWidth: 1,
}
})
......@@ -322,4 +332,62 @@ const mapStateToProps = (state) => {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Login);
\ No newline at end of file
export default connect(mapStateToProps, mapDispatchToProps)(Login);
// <Spinner
// visible={this.state.spinner}
// textContent={'Loading...'}
// textStyle={styles.spinnerTextStyle}
// />
// <View style={styles.form}>
// <View style={{ marginRight: 10, marginLeft: 10, }}>
// <Text style={{ top: 5 }}>Email</Text>
// </View>
// <View style={{ margin: 10 }}>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
// onChangeText={(email) => this.setState({ email })}
// autoCapitalize="none"
// value={this.state.email}
// keyboardType='email-address'
// />
// </View>
// <View style={{ marginRight: 10, marginLeft: 10 }}>
// <Text style={{ top: 5 }}>{i18n.t('password')}</Text>
// </View>
// <View style={{ margin: 10 }}>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
// onChangeText={password => this.setState({ password })}
// value={this.state.password}
// secureTextEntry={true}
// />
// </View>
// <View style={{ marginRight: 10, marginLeft: 10 }}>
// <Button
// title={i18n.t('login')}
// onPress={() => this.handleLoggin()}
// />
// </View>
// </View>
// <View style={styles.footer}>
// <View style={styles.container_register}>
// <View style={{ flex: 1 }}>
// <TouchableOpacity onPress={() => this.props.navigation.navigate('New Register')}>
// <Text style={{ fontSize: 20 }}>{i18n.t('register')}</Text>
// </TouchableOpacity>
// </View>
// <View style={{ flex: 1, }}>
// <TouchableOpacity onPress={() => this.props.navigation.navigate('Reset Password')}>
// <Text style={{ fontSize: 20, textAlign: 'right' }}>{i18n.t('forgotPassword')}</Text>
// </TouchableOpacity>
// </View>
// </View>
// </View>
\ No newline at end of file
......@@ -80,7 +80,7 @@ class RewardsList extends React.Component {
</TouchableOpacity>
))
}
<TouchableOpacity>
<TouchableOpacity onPress={()=> this.props.navigation.navigate('Reward History')}>
<Text style={{ textAlign: 'right', color: '#ccb46c' }}>REDEEM E-VOUCHER HISTORY</Text>
</TouchableOpacity>
</ScrollView>
......
......@@ -43,8 +43,9 @@ class ShoppingCart extends React.Component {
componentDidMount() {
console.log(this.props.voucher)
console.log('INI VALUE : ' + this.props.value_voucher)
// console.log(this.props.voucher)
// console.log('INI VALUE : ' + this.props.value_voucher)
if (!this.props.type_pickup) {
this.getRate()
}
......@@ -396,7 +397,7 @@ class ShoppingCart extends React.Component {
kasproPoint: kaspro_point.replace(/,/g, '')
})
// console.log(this.state.kasproBalance, this.state.kasproPoint)
console.log(this.state.kasproBalance, this.state.kasproPoint)
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
......
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