Commit 433a1919 authored by Trisno's avatar Trisno

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

# Conflicts:
#	view/Home.js
parents 5fadb173 f2c03d89
{
"expo": {
"name": "Excelso_update v1. siang.13.05.2020",
"name": "Excelso_update 09.00 / 14.05.2020",
"slug": "excelso-pro",
"privacy": "public",
"sdkVersion": "36.0.0",
......@@ -41,7 +41,7 @@
"organization": "ravintola",
"project": "ravintola",
"authToken": "5a140e31fb884af58c7d9e20e8baa5ddc8fee9ac79ba427786da245b3015f6d3",
"url": "your sentry url here" // OPTIONAL- only necessary when self-hosting Sentry
"url": "your sentry url here"
}
}
]
......
import { Alert } from 'react-native';
export default function session(response,navigation) {
export default function session(response,error_status, navigation) {
if (response.code === "WRONG_SESSION_ID") {
......@@ -13,5 +13,17 @@ export default function session(response,navigation) {
]
)
} else if (error_status == 500) {
Alert.alert(
'Server',
'Server Error ',
[
{ text: 'OK' }
]
)
}else{
Alert.alert(response_data.msg);
}
}
\ No newline at end of file
......@@ -8,10 +8,12 @@ import {
ScrollView,
TouchableOpacity,
Alert,
Button
Button,
ImageBackground
} from 'react-native';
import { StackActions } from '@react-navigation/native';
import { Icon } from 'react-native-elements'
import { connect } from 'react-redux';
import { Card } from 'react-native-shadow-cards';
import ActionType from '../redux/globalActionType';
......@@ -97,10 +99,11 @@ class Account extends React.Component {
lat: this.state.my_lat,
long: this.state.my_long,
closest_outlet: 1
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
// console.log('WAKWAWWWW ' + JSON.stringify(res.data))
console.log('WAKWAWWWW ' + JSON.stringify(res.data))
const dataCard = res.data
let email = dataCard.email
let point = dataCard.kaspro_point
......@@ -126,7 +129,7 @@ class Account extends React.Component {
this.props.setCardactive(cardProps)
}
let account_number = dataCard.kaspro_account_number
let account_number = dataCard.card_number
this.setState({
email: email,
......@@ -141,9 +144,9 @@ class Account extends React.Component {
})
}).catch(error => {
const {navigation} = this.props
const { navigation } = this.props
let response = error.response.data
session(response,navigation)
session(response, navigation)
Alert.alert(response.msg);
console.log('ini error ' + error)
})
......@@ -171,18 +174,27 @@ class Account extends React.Component {
return (
<View style={styles.container}>
<ScrollView>
<View style={styles.profil}>
<View style={{ flex: 1, height: 90, top: 30 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 15, }}
source={require('../assets/images/user.png')}
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
<Text style={styles.txtNama}>
{this.props.username}
</Text>
<Text style={styles.txtEmail}>
</View>
<View style={{ height: 60, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center', margin: 15 }}>
{this.state.email} {this.props.set_card}
</Text>
</TouchableOpacity>
<Icon
containerStyle={{ top: 8 }}
name='ios-create'
type='ionicon'
/>
</View>
</View>
{
this.props.set_card === false ? (
<View>
......@@ -211,65 +223,61 @@ class Account extends React.Component {
</Text>
</Card> */}
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 20 }}>
<View style={{ height: 250, flex: 1, backgroundColor: 'grey', marginRight: 20, marginLeft: 20, top: 25, borderRadius: 20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', top: 20 }}>No card yet</Text>
<TouchableOpacity onPress={() => this.handleLoggin()}>
<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>
</View>
</Card>
</TouchableOpacity>
<View style={{ width: 5 }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>ACTIVATION CARD</Text>
</View>
</Card>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 40 }}>
<Button
title="Logout"
onPress={() => this.logout()}
/>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 40, top: 30 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
</TouchableOpacity>
</View>
) : (
<View>
<View style={styles.Card}>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<Text>
YOUR CARD NUMBER | {this.state.expire_date}{'\n'}
<Card style={{ padding: 10, margin: 20, alignContent: 'center' }}>
<Text style={{fontSize:12, fontFamily: 'Gotham-Black', }}>
YOUR CARD NUMBER | EXPIRED ON {this.state.expire_date}{'\n'}
</Text>
<Text style={{ textAlign: "center", fontSize: 40, color: '#c9af6d' }}>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: "center", fontSize: 40, color: '#c9af6d' }}>
{this.state.account_number}
</Text>
<View style={styles.line}></View>
<Text style={{ textAlign: 'left', fontWeight: 'bold' }}> {'\n'}
BALANCE: {this.state.balance}{'\n'}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold' }}> {'\n'}
BALANCE : {this.state.balance}{'\n'}
</Text>
<View style={styles.line}></View>
<Text style={{ textAlign: 'left', fontWeight: 'bold' }}>{'\n'}
POINTS: {this.state.points}
<Text style={{fontFamily: 'Gotham-Light', textAlign: 'left', fontWeight: 'bold' }}>{'\n'}
POINTS : {this.state.points}
</Text>
</Card>
</View>
<TouchableOpacity style={styles.submitTopUp} activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<Text style={{ color: '#fff', textAlign: 'center' }}>TOP UP BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#fff', textAlign: 'center' }}>TOP UP BALANCE</Text>
</TouchableOpacity>
<View style={{ padding: 10, margin: 10, height: 200 }}>
<Image style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null} />
<View style={{ padding: 10, margin: 10, height: 200, top: 15 }}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}>
<View style={{justifyContent:'center'}}>
<Text style={{ fontFamily: 'Gotham-Black', margin:15,fontSize: 20, color: '#c9af6d',top:120 }}>
{this.state.account_number}
</Text>
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}>
</ImageBackground>
</View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 10 }}>
<TouchableOpacity style={{ marginBottom: 10 }} onPress={() => this.TransferBalance()} >
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>TRANSFER BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>TRANSFER BALANCE</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -278,7 +286,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>USE BALANCE</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>USE BALANCE</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -288,7 +296,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>RENEWAL</Text>
<Text style={{fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>RENEWAL</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -296,7 +304,7 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>TRANSACTION HISTORY</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>TRANSACTION HISTORY</Text>
</View>
</Card>
</TouchableOpacity>
......@@ -307,32 +315,27 @@ class Account extends React.Component {
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>UPGRADE PREMIUM</Text>
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 30, fontSize: 14 }}>UPGRADE PREMIUM</Text>
</View>
</Card>
</TouchableOpacity>
) : (
null
)}
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
</View>
</Card>
</TouchableOpacity>
<View style={{ flex: 1}}>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
<View style={{ flex: 1, margin: 40 }}>
<Button
title="Logout"
onPress={() => this.logout()}
/>
</TouchableOpacity>
</View>
</View>
)
}
</ScrollView>
</View>
)
}
......@@ -353,22 +356,26 @@ const styles = StyleSheet.create({
height: 150,
backgroundColor: 'white',
alignItems: 'center',
top: 20,
top: 40,
},
Card: {
top: 50,
alignItems: 'center',
backgroundColor: 'white',
alignContent: 'center',
},
line: {
borderBottomColor: "black",
borderBottomWidth: StyleSheet.hairlineWidth,
top:3,
borderRadius:1,
borderColor:'#c9af6d',
borderWidth:1,
alignSelf: 'stretch',
width: "100%",
height: 3,
bottom: 5,
},
imgBackground: {
......@@ -377,7 +384,8 @@ const styles = StyleSheet.create({
flex: 1
},
submitTopUp: {
marginTop: 10,
marginTop: 35,
top: 25,
paddingTop: 15,
paddingBottom: 15,
marginLeft: 15,
......@@ -388,6 +396,19 @@ const styles = StyleSheet.create({
borderColor: '#fff',
textAlign: 'center',
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
}
})
//subscribe
......@@ -416,3 +437,23 @@ const mapDispatchToProps = (dispacth) => {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Account);
{/* <TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')} style={{ marginBottom: 10 }}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<MaterialIcons name="monetization-on" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>PROFIL</Text>
</View>
</Card>
</TouchableOpacity>
<View style={{ width: 5 }}></View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<Card style={{ height: 100, width: 160 }}>
<View style={{ height: 50, alignItems: 'center' }}>
<AntDesign name="shoppingcart" size={30} color="gray" style={{ top: 20 }} />
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>ACTIVATION CARD</Text>
</View>
</Card>
</TouchableOpacity> */}
\ No newline at end of file
......@@ -50,7 +50,8 @@ import RewardDetail from './RewardDetail';
import RewardSelect from './RewardSelect';
import Outlets from './Outlets';
import RewardHistory from './RewardHistory';
// import { Image } from 'native-base';
import WelcomeReg from './WelcomeReg';
import WelcomeLog from './WelcomeLog';
enableScreens();
......@@ -142,18 +143,64 @@ class Auth extends React.Component {
{
this.props.session_id === '' ? (
<>
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false ,
}} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Change Profil" component={ChangeProfile} />
<Stack.Screen name="Profile" component={ProfilePage} 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} 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="Register" component={Register} />
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
{/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */}
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'EMAIL CONFIRMATION'
}} />
<Stack.Screen name="Welcomes" component={WelcomeReg} options={{
headerShown: false ,
}} />
</>
) : this.props.pageEmailConfirmation === true ? (
<>
<Stack.Screen name="Email Confirmation" component={EmailConfirmation} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="LoginWelcome" component={WelcomeLog} options={{
headerShown: false ,
}} />
<Stack.Screen name="Home" component={Home} options={{ headerShown: false }} />
</>
) : (
......@@ -163,19 +210,42 @@ class Auth extends React.Component {
headerShown: false,
title: 'TODAY PROMOTION',
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle:{alignContent:'center'},
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color:'white',
textAlign:'center'
color: 'white',
textAlign: 'center'
}
}} />
<Stack.Screen name="Profile" component={ProfilePage} />
<Stack.Screen name="Profile" component={ProfilePage}
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} />
<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="Renewal" component={Renewal} />
<Stack.Screen name="Account" component={Account} />
......@@ -188,13 +258,25 @@ class Auth extends React.Component {
<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="Pickup Name" component={PickupName} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
color: 'white',
textAlign: 'center'
}, title: 'PICKUP STORE'
}}/>
<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' })} />,
......@@ -206,11 +288,52 @@ class Auth extends React.Component {
}
<Stack.Screen name="New Password" component={NewPassword} />
<Stack.Screen name="New Password" component={NewPassword} options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
textAlign: 'center',
fontSize: 15,
fontFamily: 'Gotham-Black',
color: 'white'
},
headerTitle: 'New Password'
}} />
{/* <Stack.Screen name="Login" component={Login} /> */}
<Stack.Screen name="Reset Password" component={ResetPassword} />
<Stack.Screen name="Reset Password" component={ResetPassword}
options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
textAlign: 'center',
fontSize: 15,
fontFamily: 'Gotham-Black',
color: 'white'
},
headerTitle: 'RESET PASSWORD'
}} />
<Stack.Screen name="Verify Email" component={VerifyEmail} />
<Stack.Screen name="Change Email" component={ChangeEmail} />
<Stack.Screen name="Change Email" component={ChangeEmail} options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
textAlign: 'center',
fontSize: 15,
fontFamily: 'Gotham-Black',
color: 'white'
},
headerTitle: 'CHANGE EMAIL'
}} />
{/* <Stack.Screen name="Card Activation" component={CardActivation} /> */}
<Stack.Screen name="Confirm Mobile" component={ConfirmMobile} />
<Stack.Screen name="Balance" component={Balance} />
......@@ -220,16 +343,21 @@ class Auth extends React.Component {
{/* <Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> */}
<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} /> */}
<Stack.Screen name="Date Time" component={DateTime} />
<Stack.Screen name="New Register" component={NewRegister} />
<Stack.Screen name="New Register" component={NewRegister}
options={{
headerStyle: { backgroundColor: "#ccb46c" },
headerBackTitleStyle: { color: 'white' },
headerTintColor: '#fff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontFamily: 'Gotham-Black',
color: 'white',
fontSize: 20,
},
title: 'REGISTER'
}} />
<Stack.Screen name="TopUpInfo" component={TopUpInfo} />
<Stack.Screen name="Reward Detail" component={RewardDetail} />
<Stack.Screen name="Reward Select" component={RewardSelect} />
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Alert } from 'react-native';
import { View, Text, TextInput, StyleSheet, Button, Alert, TouchableOpacity, Image } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
class ChangeEmail extends React.Component {
......@@ -47,24 +48,40 @@ class ChangeEmail extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>Change Email</Text>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 50 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>New Email</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(email) => this.setState({ email })}
value={this.state.email}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address' />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.changeEmail()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
</View>
<View style={styles.form}>
<View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Email</Text>
</TouchableOpacity>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(email) => this.setState({ email })}
value={this.state.email}
/>
</View>
</View>
<View style={styles.button}>
<Button title="Submit" onPress={() => this.changeEmail()}></Button>
<View style={{ flex: 0.5 }}>
</View>
</View>
</View>
......@@ -86,6 +103,7 @@ const styles = StyleSheet.create({
form: {
flex: 3,
top: 40,
margin: 10,
marginTop: 0,
},
......@@ -95,9 +113,22 @@ const styles = StyleSheet.create({
},
button: {
height: 50,
height: 40,
margin: 10,
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
}
})
......@@ -127,3 +158,26 @@ const mapStateToProps = (state) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(ChangeEmail);
{/* <View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>Change Email</Text>
</View>
<View style={styles.form}>
<View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Email</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(email) => this.setState({ email })}
value={this.state.email}
/>
</View>
</View>
<View style={styles.button}>
<Button title="Submit" onPress={() => this.changeEmail()}></Button>
</View>
</View> */}
\ No newline at end of file
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, TextInput, Picker, Alert } from 'react-native';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity,Image,ScrollView,TouchableHighlight } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import RNPickerSelect from 'react-native-picker-select';
......@@ -87,25 +87,28 @@ class ChangeProfil extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Change Profile </Text>
<View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Name </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
onChangeText={(full_name) => this.setState({ full_name })}
value={this.state.full_name}
<ScrollView>
<View style={{ flex: 1, height: 90, top: 10 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Date of {'\n'}Birth </Text>
<Text style={{ fontSize: 15, margin: 5, borderWidth: 1, flex: 2, padding: 5 }}>{this.state.dob_day} - {this.state.dob_month} - {this.state.dob_year} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<View style={{ flex: 1 }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Gender </Text>
</View>
<View style={{ height: 50, flex: 1 }}>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, margin: 20,top:20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Name</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(full_name) => this.setState({ full_name })} value={this.state.full_name}>
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Date of Birth</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin:3 }}>Gender</Text>
<View style={{justifyContent:'center',borderRadius:10,borderWidth:1,borderColor:'grey',height:40,marginRight:10,marginLeft:10}}>
<RNPickerSelect
value={this.state.gender_selected}
// itemKey="1"
......@@ -113,33 +116,35 @@ class ChangeProfil extends React.Component {
onValueChange={(value) => this.setState({ gender_selected: value })}
items={this.state.gender} />
</View>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Email </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
onChangeText={(full_name) => this.setState({ full_name })}
value={this.state.email}
/>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Mobile phone </Text>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2, margin: 10 }}
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Mobile</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(no_tlp) => this.setState({ no_tlp })}
value={this.state.no_tlp}
/>
editable={true}>
</TextInput>
</View>
<View style={{ flexDirection: 'row', top: 0, margin: 10, }}>
</View>
<View style={{ flex: 2 }}>
<View style={{ flex: 1 }}>
<View style={{ flex: 1, flexDirection: 'row', top: 10, margin: 5,marginBottom:20,marginLeft:20,marginRight:20}}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Save" onPress={() => this.saveData()}></Button>
<TouchableOpacity title="Edit" onPress={() => this.saveData()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Save</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Cancel"></Button>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Profile')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Cancel</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</View>
</ScrollView>
</View>
)
}
......@@ -177,3 +182,58 @@ const mapStateToProps = (state) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(ChangeProfil);
// <View style={styles.container}>
// <Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Change Profile </Text>
// <View style={{ margin: 10, flex: 1, }}>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Name </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
// onChangeText={(full_name) => this.setState({ full_name })}
// value={this.state.full_name}
// />
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Date of {'\n'}Birth </Text>
// <Text style={{ fontSize: 15, margin: 5, borderWidth: 1, flex: 2, padding: 5 }}>{this.state.dob_day} - {this.state.dob_month} - {this.state.dob_year} </Text>
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <View style={{ flex: 1 }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Gender </Text>
// </View>
// <View style={{ height: 50, flex: 1 }}>
// <RNPickerSelect
// value={this.state.gender_selected}
// // itemKey="1"
// placeholderTextColor='gray'
// onValueChange={(value) => this.setState({ gender_selected: value })}
// items={this.state.gender} />
// </View>
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Email </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2 }}
// onChangeText={(full_name) => this.setState({ full_name })}
// value={this.state.email}
// />
// </View>
// <View style={{ height: 50, flexDirection: 'row' }}>
// <Text style={{ fontSize: 20, margin: 5, flex: 1 }}>Mobile phone </Text>
// <TextInput
// style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, flex: 2, margin: 10 }}
// onChangeText={(no_tlp) => this.setState({ no_tlp })}
// value={this.state.no_tlp}
// />
// </View>
// <View style={{ flexDirection: 'row', top: 0, margin: 10, }}>
// <View style={{ flex: 1, margin: 5 }}>
// <Button title="Save" onPress={() => this.saveData()}></Button>
// </View>
// <View style={{ flex: 1, margin: 5 }}>
// <Button title="Cancel"></Button>
// </View>
// </View>
// </View>
// </View>
\ No newline at end of file
import * as React from 'react';
import { Button, View, Text, StyleSheet, TextInput, Alert } from 'react-native';
import { Button, View, Text, StyleSheet, TextInput, Alert, Image } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import Axios from 'axios';
import { connect } from 'react-redux';
......@@ -66,7 +66,7 @@ class EmailConfirmation extends React.Component {
index: 0,
routes: [
{
name: 'Home',
name: 'Welcome log',
},
],
})
......@@ -97,7 +97,7 @@ class EmailConfirmation extends React.Component {
index: 0,
routes: [
{
name: 'Login',
name: 'Welcomes',
},
],
})
......@@ -161,28 +161,45 @@ class EmailConfirmation extends React.Component {
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={{ margin: 10, top: 10 }}>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
<View style={{ flex: 3 }}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 60 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Token</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(confirmation_number) => this.setState({ confirmation_number })}
value={this.state.confirmation_number}
/>
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address' />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleSubmit()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 10, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
</View>
<View style={{ margin: 10 }}>
<Button title="Submit" onPress={() => this.handleSubmit()} />
</View>
<View style={{ margin: 10 }}>
<Button title="Cancel" onPress={() => this.handleCancel()} />
</View>
<View>
<TouchableOpacity onPress={() => this.handleResend()}>
<Text style={{ color: 'red', textAlign: 'center' }}>Resend email token</Text>
</TouchableOpacity>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleCancel()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 10, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>CANCEL</Text>
</View>
<View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Change Email')}>
<Text style={{ color: 'red', textAlign: 'center' }}> Change email</Text>
</TouchableOpacity>
<TouchableOpacity style={{ height: 60}} onPress={() => this.handleResend()}>
<Text style={{ alignSelf: 'center', color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 20 ,top:10}}>RESEND EMAIL TOKEN</Text>
</TouchableOpacity>
<TouchableOpacity style={{ height: 60}} onPress={() => this.props.navigation.navigate('Change Email')}>
<Text style={{ alignSelf: 'center', color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 20, }}>CHANGE EMAIL</Text>
</TouchableOpacity>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
</View>
</View>
<View style={{ flex: 0.5 }}>
</View>
</View>
</View>
)
......@@ -191,9 +208,45 @@ class EmailConfirmation extends React.Component {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white'
backgroundColor: '#ffff'
},
header: {
flex: 0.5,
margin: 10,
},
form: {
flex: 3,
top: 40,
margin: 10,
marginTop: 0,
},
field_email: {
flexDirection: 'row'
},
button: {
height: 40,
margin: 10,
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
}
})
......@@ -249,3 +302,33 @@ const mapDispatchToProps = (dispacth) => {
export default connect(mapStateToProps,mapDispatchToProps)(EmailConfirmation);
{/* <Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={{ margin: 10, top: 10 }}>
<TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }}
onChangeText={(confirmation_number) => this.setState({ confirmation_number })}
value={this.state.confirmation_number}
/>
</View>
<View style={{ margin: 10 }}>
<Button title="Submit" onPress={() => this.handleSubmit()} />
</View>
<View style={{ margin: 10 }}>
<Button title="Cancel" onPress={() => this.handleCancel()} />
</View>
<View>
<TouchableOpacity onPress={() => this.handleResend()}>
<Text style={{ color: 'red', textAlign: 'center' }}>Resend email token</Text>
</TouchableOpacity>
</View>
<View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Change Email')}>
<Text style={{ color: 'red', textAlign: 'center' }}> Change email</Text>
</TouchableOpacity>
</View> */}
\ No newline at end of file
......@@ -37,11 +37,9 @@ class Home extends React.Component {
}
componentDidMount() {
console.log("INI BUILD VERSION : " + Constants.nativeBuildVersio)
this._account();
this._getPermissions()
this._renderCarousell()
console.log("INI LAT : " + this.props.lat)
this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.setState({
......@@ -109,6 +107,11 @@ class Home extends React.Component {
this.setState({
images: imageLink
})
}).catch(error =>{
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
})
}
......@@ -123,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,
......@@ -133,10 +136,11 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
// console.log("INI ERROR " + error);
// const { navigation } = this.props
// let response = error.response.data
// session(response, navigation)
// Alert.alert(response.msg);
})
}
......@@ -162,10 +166,12 @@ class Home extends React.Component {
indicator: false
})
}).catch(error => {
const { navigation } = this.props
let response = error.response.data
session(response, navigation)
Alert.alert(response.msg);
let response_data = error.response.data
let error_status = error.response.status
session(response_data,error_status,navigation)
})
}
......@@ -374,10 +380,6 @@ class Home extends React.Component {
</View>
</TouchableOpacity>
</View>
<View style={{top:20}}>
<Text> App version : {version} </Text>
<Text> Expo build version : {buildNumber} </Text>
</View>
<View style={{ height: 60 }}></View>
</View>
</View>
......
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground } from 'react-native';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground,ScrollView } 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 { Notifications } from 'expo';
import Spinner from 'react-native-loading-spinner-overlay';
class Login extends React.Component {
constructor(props) {
......@@ -138,13 +138,13 @@ class Login extends React.Component {
index: 0,
routes: [
{
name: 'Home',
name: 'Welcome log',
params: { someParam: 'Param1' },
},
],
})
console.log("INI SESSION : " + this.props.session_id)
}).catch(error => {
......@@ -181,13 +181,17 @@ class Login extends React.Component {
}
}
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<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>
......@@ -253,7 +257,7 @@ const styles = StyleSheet.create({
height: 50
},
imageslogo: {
height: 170,
height: 150,
margin: 10,
width: 150,
justifyContent: 'center',
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button,Alert } from 'react-native';
import { View, Text, TextInput, StyleSheet, Button, Alert, TouchableOpacity, Image } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import { BASE_URL_NEW_PASSWORD } from '../model/Base_Model'
......@@ -17,11 +17,11 @@ class NewPassword extends React.Component {
}
}
componentDidMount(){
componentDidMount() {
// console.log(this.props)
}
validation(){
validation() {
this.setState({
spinner: true,
})
......@@ -35,7 +35,7 @@ class NewPassword extends React.Component {
,
)
}else{
} else {
this.handleResetPassword();
}
}
......@@ -51,7 +51,7 @@ class NewPassword extends React.Component {
'password_confirmation': this.state.password_confirmation
}
// console.log(params);
Axios.post(BASE_URL_NEW_PASSWORD,params).then(res => {
Axios.post(BASE_URL_NEW_PASSWORD, params).then(res => {
this.setState({
spinner: false,
})
......@@ -73,45 +73,40 @@ class NewPassword extends React.Component {
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
{/* <Text>{this.state.email}</Text> */}
<View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>New Password</Text>
</View>
<View style={styles.form}>
<View style={styles.field_token}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Token</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
<View style={{ flex: 3}}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 50 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Token</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(confirmation_number) => this.setState({ confirmation_number })}
value={this.state.confirmation_number} />
</View>
</View>
<View style={styles.field_new_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>New Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>New Password</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(password) => this.setState({ password })}
value={this.state.password}
secureTextEntry={true}/>
secureTextEntry={true} />
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Repeat Password</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(password_confirmation) => this.setState({ password_confirmation })}
value={this.state.password_confirmation}
secureTextEntry={true} />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleResetPassword()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
</View>
</TouchableOpacity>
</View>
<View style={styles.field_repeat_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Repeat Password</Text>
</View>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(password_confirmation) => this.setState({ password_confirmation })}
value={this.state.password_confirmation}
secureTextEntry={true}/>
</View>
</View>
<View style={styles.button}>
<Button title="Submit" onPress={() => this.validation()}></Button>
<View style={{ flex: 0.5 }}>
</View>
</View>
</View>
......@@ -126,41 +121,82 @@ const styles = StyleSheet.create({
backgroundColor: '#ffff'
},
header: {
flex: 0.5,
margin: 10,
},
form: {
flex: 3,
margin: 10,
marginTop: 0,
},
field_token: {
flexDirection: 'row'
},
field_new_password: {
flexDirection: 'row'
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 150,
field_repeat_password: {
flexDirection: 'row'
},
button: {
height: 50,
margin: 10,
}
})
const mapStateToProps = (state) => { console.log(JSON.stringify(state))
const mapStateToProps = (state) => {
console.log(JSON.stringify(state))
return {
email: state.email
}
}
export default connect(mapStateToProps)(NewPassword);
{/* <Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>New Password</Text>
</View>
<View style={styles.form}>
<View style={styles.field_token}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Token</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(confirmation_number) => this.setState({ confirmation_number })}
value={this.state.confirmation_number} />
</View>
</View>
<View style={styles.field_new_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>New Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(password) => this.setState({ password })}
value={this.state.password}
secureTextEntry={true}/>
</View>
</View>
<View style={styles.field_repeat_password}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Repeat Password</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(password_confirmation) => this.setState({ password_confirmation })}
value={this.state.password_confirmation}
secureTextEntry={true}/>
</View>
</View>
<View style={styles.button}>
<Button title="Submit" onPress={() => this.validation()}></Button>
</View>
</View> */}
\ No newline at end of file
......@@ -236,11 +236,6 @@ class NewRegister extends React.Component {
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={styles.header}>
<StatusBar barStyle='dark-content' />
{/* <Text style={styles.titleText}>{i18n.t('register')}</Text> */}
<Text style={styles.titleText}>REGISTER</Text>
</View>
<View style={styles.body}>
<View style={styles.itemsRow}>
......
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, Alert } from 'react-native';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity,Image } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import i18n from 'i18n-js';
import { StackActions } from '@react-navigation/native';
import { ScrollView, TouchableHighlight } from 'react-native-gesture-handler';
class ProfilePage extends PureComponent {
constructor(props) {
......@@ -16,6 +17,7 @@ class ProfilePage extends PureComponent {
dob_year: '',
gender: '',
email: '',
onClicked: false,
}
}
......@@ -54,6 +56,9 @@ class ProfilePage extends PureComponent {
}
handleChangeProfil() {
this.setState({
onClicked:true
})
this.props.navigation.navigate('Change Profil', { 'data': 'sample', onChangeProfil: this.onChangeProfil })
}
......@@ -86,48 +91,78 @@ class ProfilePage extends PureComponent {
render() {
return (
<View style={styles.container}>
<Text style={{ textAlign: "center", margin: 50, fontWeight: 'bold', fontSize: 25 }}> Profil </Text>
<View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50, flexDirection: 'row' }}>
<ScrollView>
<View style={{ flex: 1, height: 90, top: 10 }}>
<View style={{ alignSelf: 'center' }}>
<Image
style={{ height: 70, width: 70, top: 5, justifyContent: 'center' }}
source={require('../assets/images/people-actv.png')}
/>
</View>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Name : </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.full_name} </Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center', margin: 15 }}>
{this.state.full_name}
</Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Date of Birth </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year} </Text>
<View style={{ flex: 3 }}>
<View style={{ flex: 1, margin: 20,top:20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Email</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false} value={this.state.email}>
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Date of Birth</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Gender</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
editable={false} value={this.state.gender}>
</TextInput>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Gender :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.gender} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Email :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.email} </Text>
<View style={{ flex: 2 }}>
<View style={{ flex: 1 }}>
<View style={{ flexDirection: 'row', top: 10, margin: 5,marginRight:20,marginLeft:20 }}>
<View style={{ flex: 1, margin: 5 }}>
<TouchableHighlight title="Edit" onPress={() => this.handleChangeProfil()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Edit</Text>
</View>
</TouchableHighlight>
</View>
<View style={{ flexDirection: 'row', top: 20, margin: 5, }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Edit" onPress={() => this.handleChangeProfil()}></Button>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Change password')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 15 }}>Change Password</Text>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Change Password" onPress={() => this.props.navigation.navigate('Change password')}></Button>
</TouchableOpacity>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', top: 20, margin: 5 }}>
<View style={{ flex: 1, flexDirection: 'row', top: 10, margin: 5, marginRight:20,marginLeft:20 }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Language" onPress={() => this.props.navigation.navigate('Change language')}></Button>
<TouchableOpacity title="Edit" onPress={() => this.props.navigation.navigate('Change language')}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Language</Text>
</View>
</TouchableOpacity>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Logout" onPress={() => this.logout()}></Button>
<TouchableOpacity title="Edit" onPress={() => this.logout()}>
<View style={{ height: 60, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 19, textAlign: 'center', margin: 15 }}>Logout</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</View>
</ScrollView>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
......@@ -158,3 +193,38 @@ const mapStateToProps = (state) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(ProfilePage);
{/* <View style={{ margin: 10, flex: 1, }}>
<View style={{ height: 50 }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Name : </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.full_name} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Date of Birth </Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Gender :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.gender} </Text>
</View>
<View style={{ height: 50, flexDirection: 'row' }}>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>Email :</Text>
<Text style={{ fontSize: 20, margin: 5, flex: 2 }}>{this.state.email} </Text>
</View>
</View>
<View style={{ flexDirection: 'row', top: 20, margin: 5, }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Edit" onPress={() => this.handleChangeProfil()}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Change Password" onPress={() => this.props.navigation.navigate('Change password')}></Button>
</View>
</View>
<View style={{ flex: 1, flexDirection: 'row', top: 20, margin: 5 }}>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Language" onPress={() => this.props.navigation.navigate('Change language')}></Button>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Button title="Logout" onPress={() => this.logout()}></Button>
</View>
</View> */}
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Alert } from 'react-native';
import { View, Text, TextInput, StyleSheet, Button, Alert, Image, TouchableOpacity } from 'react-native';
import Axios from 'axios';
import { BASE_URL_RESET_PASSWORD } from '../model/Base_Model';
import ActionType from '../redux/globalActionType';
import { connect } from 'react-redux';
import { TouchableOpacity } from 'react-native-gesture-handler';
import i18n from 'i18n-js';
import Spinner from 'react-native-loading-spinner-overlay';
......@@ -14,7 +13,7 @@ class ResetPassword extends React.Component {
this.state = {
email: '',
language: 'id',
spinner:false
spinner: false
}
}
......@@ -61,28 +60,38 @@ class ResetPassword extends React.Component {
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>{i18n.t('resetPassword')}</Text>
</View>
<View style={styles.form}>
<View style={styles.field_email}>
<View style={{ width: 40, justifyContent: 'center' }}>
<Text>Email</Text>
</View>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
<View style={{ flex: 3 }}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 50 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Email</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'/>
keyboardType='email-address' />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleResetPassword()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
</View>
</TouchableOpacity>
<TouchableOpacity style={{ height: 60}} onPress={() => this.handleResetPassword()}>
<Text style={{ alignSelf: 'center', color: '#CFB368', fontFamily: 'Gotham-Black', fontSize: 20 }}>ENTER TOKEN</Text>
</TouchableOpacity>
</View>
<View style={styles.button}>
<Button title={i18n.t('submit')} onPress={() => this.handleResetPassword()}></Button>
</View>
<TouchableOpacity onPress={() => this.handleResetPassword()}>
<Text style={{ fontSize: 20, textAlign: 'center', color: 'red' }}>{i18n.t('enterToken')}</Text>
</TouchableOpacity>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
</View>
</View>
<View style={{ flex: 0.5 }}>
</View>
</View>
</View>
)
......@@ -103,6 +112,7 @@ const styles = StyleSheet.create({
form: {
flex: 3,
top: 40,
margin: 10,
marginTop: 0,
},
......@@ -115,6 +125,19 @@ const styles = StyleSheet.create({
height: 40,
margin: 10,
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
}
})
......@@ -137,3 +160,29 @@ const mapDispatchToProps = (dispacth) => {
}
export default connect(mapStateToProps, mapDispatchToProps)(ResetPassword);
{/* <Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>{i18n.t('resetPassword')}</Text>
<View style={styles.form}>
<View style={styles.field_email}>
<View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius:20 }}
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'/>
</View>
</View>
<View style={styles.button}>
<Button title={i18n.t('submit')} onPress={() => this.handleResetPassword()}></Button>
<View></View>
</View>
<TouchableOpacity onPress={() => this.handleResetPassword()}>
<Text style={{ fontSize: 20, textAlign: 'center', color: 'red' }}>{i18n.t('enterToken')}</Text>
</TouchableOpacity>
</View> */}
\ No newline at end of file
......@@ -414,11 +414,17 @@ class ShoppingCart extends React.Component {
return (
<ScrollView style={styles.container}>
<View style={{ flexDirection: 'row', justifyContent: 'center' }}>
<TouchableOpacity style={styles.buttonDelivery} onPress={() => this.checkChangeTrans('delivery')}>
{/* <TouchableOpacity style={styles.buttonDelivery} onPress={() => this.checkChangeTrans('delivery')}>
<Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold' }}>{i18n.t('delivery')}</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}>
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */}
<TouchableOpacity style={styles.buttonDelivery} onPress={() => this.checkChangeTrans('delivery')}>
<Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>DELIVERY</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}>
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>PICKUP</Text>
</TouchableOpacity>
</View>
<View style={{ alignItems: 'center' }}>
......@@ -426,8 +432,8 @@ class ShoppingCart extends React.Component {
this.props.type_pickup == true ? (
<Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Ambil pesanan kamu di</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontWeight: 'bold' }}>Excelso {this.props.name_outlet}</Text>
<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Light' }}> Ambil pesanan kamu di</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>Excelso {this.props.name_outlet}</Text>
</Card>
) : (
<Card style={{ margin: 5, padding: 10 }}>
......
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground, ScrollView } 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 { Notifications } from 'expo';
import Spinner from 'react-native-loading-spinner-overlay';
export default class WelcomeLog extends React.Component {
constructor(props) {
super(props);
this.state = ({
spinner: ''
})
}
componentDidMount() {
// console.log(this.props.language)
}
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<StatusBar
hidden={true} />
<ImageBackground source={require('../assets/images/after-log.jpg')} style={{ width: '100%', height: '100%' }}>
<View style={styles.v_form}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
</View>
</View>
<View style={styles.v_policy}>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => navigation.reset({
index: 0,
routes: [
{
name: 'Home',
params: { someParam: 'Param9' },
},
],
})}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'black', fontSize: 20, textAlign: 'center', margin: 15 }}>NEXT</Text>
</View>
</TouchableOpacity>
</View>
</View>
</ImageBackground>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#151515',
},
logo: {
flex: 2.5,
height: 50
},
imageslogo: {
height: 170,
margin: 10,
width: 150,
justifyContent: 'center',
alignSelf: 'center',
top: 50
},
v_form: {
flex: 3,
},
v_policy: {
flex: 2,
}
})
import * as React from 'react';
import { View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
export default class Welcome extends React.Component {
constructor(props) {
super(props);
this.state = ({
spinner: ''
})
}
componentDidMount() {
// console.log(this.props.language)
}
render() {
return (
<View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<StatusBar
hidden={true} />
<ImageBackground source={require('../assets/images/after-log.jpg')} style={{ width: '100%', height: '100%' }}>
<View style={styles.v_form}>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 30, marginLeft: 30, justifyContent: 'center' }}>
</View>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
</View>
</View>
<View style={styles.v_policy}>
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={()=> this.props.navigation.navigate('Login')}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'black', fontSize: 20, textAlign: 'center', margin: 15 }}>NEXT</Text>
</View>
</TouchableOpacity>
</View>
</View>
</ImageBackground>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#151515',
},
logo: {
flex: 2.5,
height: 50
},
imageslogo: {
height: 170,
margin: 10,
width: 150,
justifyContent: 'center',
alignSelf: 'center',
top: 50
},
v_form: {
flex: 3,
},
v_policy: {
flex: 2,
}
})
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