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"
}
}
]
......
This diff is collapsed.
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
This diff is collapsed.
This diff is collapsed.
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
This diff is collapsed.
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}>
......
This diff is collapsed.
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