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": { "expo": {
"name": "Excelso_update v1. siang.13.05.2020", "name": "Excelso_update 09.00 / 14.05.2020",
"slug": "excelso-pro", "slug": "excelso-pro",
"privacy": "public", "privacy": "public",
"sdkVersion": "36.0.0", "sdkVersion": "36.0.0",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"organization": "ravintola", "organization": "ravintola",
"project": "ravintola", "project": "ravintola",
"authToken": "5a140e31fb884af58c7d9e20e8baa5ddc8fee9ac79ba427786da245b3015f6d3", "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'; 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") { if (response.code === "WRONG_SESSION_ID") {
Alert.alert( Alert.alert(
...@@ -9,9 +9,21 @@ export default function session(response,navigation) { ...@@ -9,9 +9,21 @@ export default function session(response,navigation) {
'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ', 'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! ',
[ [
{ text: 'OK', onPress: () => navigation.replace('Login') } { text: 'OK', onPress: () => navigation.replace('Login') }
]
)
} 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 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 { connect } from 'react-redux';
import Axios from 'axios'; import Axios from 'axios';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
class ChangeEmail extends React.Component { class ChangeEmail extends React.Component {
...@@ -47,27 +48,43 @@ class ChangeEmail extends React.Component { ...@@ -47,27 +48,43 @@ class ChangeEmail extends React.Component {
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.header}> <Spinner
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>Change Email</Text> visible={this.state.spinner}
</View> textContent={'Loading...'}
<View style={styles.form}> textStyle={styles.spinnerTextStyle}
<View style={styles.field_email}> />
<View style={{ width: 55, justifyContent: 'center' }}> <View style={{ flex: 3 }}>
<Text>Email</Text> <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>
<View style={{ flex: 1 }}> </TouchableOpacity>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }} </View>
onChangeText={(email) => this.setState({ email })} </View>
value={this.state.email} <View style={{ flex: 1, flexDirection: 'row' }}>
/>
</View> <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>
<View style={styles.button}> <View style={{ flex: 1 }}>
<Button title="Submit" onPress={() => this.changeEmail()}></Button>
</View> </View>
</View> </View>
<View style={{ flex: 0.5 }}>
</View>
</View> </View>
</View>
) )
} }
} }
...@@ -86,6 +103,7 @@ const styles = StyleSheet.create({ ...@@ -86,6 +103,7 @@ const styles = StyleSheet.create({
form: { form: {
flex: 3, flex: 3,
top: 40,
margin: 10, margin: 10,
marginTop: 0, marginTop: 0,
}, },
...@@ -95,9 +113,22 @@ const styles = StyleSheet.create({ ...@@ -95,9 +113,22 @@ const styles = StyleSheet.create({
}, },
button: { button: {
height: 50, height: 40,
margin: 10, margin: 10,
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
} }
}) })
...@@ -126,4 +157,27 @@ const mapStateToProps = (state) => { ...@@ -126,4 +157,27 @@ const mapStateToProps = (state) => {
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(ChangeEmail); export default connect(mapStateToProps, mapDispatchToProps)(ChangeEmail);
\ No newline at end of file
{/* <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 * 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 { TouchableOpacity } from 'react-native-gesture-handler';
import Axios from 'axios'; import Axios from 'axios';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
...@@ -66,7 +66,7 @@ class EmailConfirmation extends React.Component { ...@@ -66,7 +66,7 @@ class EmailConfirmation extends React.Component {
index: 0, index: 0,
routes: [ routes: [
{ {
name: 'Home', name: 'Welcome log',
}, },
], ],
}) })
...@@ -97,7 +97,7 @@ class EmailConfirmation extends React.Component { ...@@ -97,7 +97,7 @@ class EmailConfirmation extends React.Component {
index: 0, index: 0,
routes: [ routes: [
{ {
name: 'Login', name: 'Welcomes',
}, },
], ],
}) })
...@@ -161,28 +161,45 @@ class EmailConfirmation extends React.Component { ...@@ -161,28 +161,45 @@ class EmailConfirmation extends React.Component {
textContent={'Loading...'} textContent={'Loading...'}
textStyle={styles.spinnerTextStyle} textStyle={styles.spinnerTextStyle}
/> />
<View style={{ margin: 10, top: 10 }}> <View style={{ flex: 3 }}>
<TextInput <View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 60 }}>
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }} <Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Token</Text>
onChangeText={(confirmation_number) => this.setState({ confirmation_number })} <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 }}
value={this.state.confirmation_number} 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>
</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>
</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>
<View style={{ margin: 10 }}> <View style={{ flex: 1, flexDirection: 'row' }}>
<Button title="Submit" onPress={() => this.handleSubmit()} /> <View style={styles.v_logo}>
</View> <View style={{ flex: 1, alignSelf: 'flex-start' }}>
<View style={{ margin: 10 }}> <Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
<Button title="Cancel" onPress={() => this.handleCancel()} /> </View>
</View> <View style={{ flex: 1 }}>
<View>
<TouchableOpacity onPress={() => this.handleResend()}> </View>
<Text style={{ color: 'red', textAlign: 'center' }}>Resend email token</Text> </View>
</TouchableOpacity>
</View> <View style={{ flex: 0.5 }}>
<View> </View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Change Email')}>
<Text style={{ color: 'red', textAlign: 'center' }}> Change email</Text>
</TouchableOpacity>
</View> </View>
</View> </View>
) )
...@@ -191,9 +208,45 @@ class EmailConfirmation extends React.Component { ...@@ -191,9 +208,45 @@ class EmailConfirmation extends React.Component {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, 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',
} }
}) })
...@@ -248,4 +301,34 @@ const mapDispatchToProps = (dispacth) => { ...@@ -248,4 +301,34 @@ const mapDispatchToProps = (dispacth) => {
} }
export default connect(mapStateToProps,mapDispatchToProps)(EmailConfirmation); export default connect(mapStateToProps,mapDispatchToProps)(EmailConfirmation);
\ No newline at end of file
{/* <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 { ...@@ -37,11 +37,9 @@ class Home extends React.Component {
} }
componentDidMount() { componentDidMount() {
console.log("INI BUILD VERSION : " + Constants.nativeBuildVersio)
this._account(); this._account();
this._getPermissions() this._getPermissions()
this._renderCarousell() this._renderCarousell()
console.log("INI LAT : " + this.props.lat)
this._unsubscribe = this.props.navigation.addListener('focus', () => { this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.setState({ this.setState({
...@@ -109,6 +107,11 @@ class Home extends React.Component { ...@@ -109,6 +107,11 @@ class Home extends React.Component {
this.setState({ this.setState({
images: imageLink 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 { ...@@ -123,7 +126,7 @@ class Home extends React.Component {
let point = dataCard.kaspro_point let point = dataCard.kaspro_point
let balance = dataCard.kaspro_balance let balance = dataCard.kaspro_balance
let expire = dataCard.expire_date let expire = dataCard.expire_date
let account_number = dataCard.kaspro_account_number let account_number = dataCard.card_number
this.setState({ this.setState({
point: point, point: point,
...@@ -133,10 +136,11 @@ class Home extends React.Component { ...@@ -133,10 +136,11 @@ class Home extends React.Component {
indicator: false indicator: false
}) })
}).catch(error => { }).catch(error => {
const { navigation } = this.props // console.log("INI ERROR " + error);
let response = error.response.data // const { navigation } = this.props
session(response, navigation) // let response = error.response.data
Alert.alert(response.msg); // session(response, navigation)
// Alert.alert(response.msg);
}) })
} }
...@@ -162,10 +166,12 @@ class Home extends React.Component { ...@@ -162,10 +166,12 @@ class Home extends React.Component {
indicator: false indicator: false
}) })
}).catch(error => { }).catch(error => {
const { navigation } = this.props const { navigation } = this.props
let response = error.response.data let response_data = error.response.data
session(response, navigation) let error_status = error.response.status
Alert.alert(response.msg); session(response_data,error_status,navigation)
}) })
} }
...@@ -374,10 +380,6 @@ class Home extends React.Component { ...@@ -374,10 +380,6 @@ class Home extends React.Component {
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={{top:20}}>
<Text> App version : {version} </Text>
<Text> Expo build version : {buildNumber} </Text>
</View>
<View style={{ height: 60 }}></View> <View style={{ height: 60 }}></View>
</View> </View>
</View> </View>
......
import * as React from 'react'; 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 Axios from 'axios';
import Constants from 'expo-constants'; import Constants from 'expo-constants';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model'; import { BASE_URL_LOGIN } from '../model/Base_Model';
import { Notifications } from 'expo'; import { Notifications } from 'expo';
import Spinner from 'react-native-loading-spinner-overlay';
class Login extends React.Component { class Login extends React.Component {
constructor(props) { constructor(props) {
...@@ -138,13 +138,13 @@ class Login extends React.Component { ...@@ -138,13 +138,13 @@ class Login extends React.Component {
index: 0, index: 0,
routes: [ routes: [
{ {
name: 'Home', name: 'Welcome log',
params: { someParam: 'Param1' }, params: { someParam: 'Param1' },
}, },
], ],
}) })
console.log("INI SESSION : " + this.props.session_id)
}).catch(error => { }).catch(error => {
...@@ -181,13 +181,17 @@ class Login extends React.Component { ...@@ -181,13 +181,17 @@ class Login extends React.Component {
} }
} }
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={styles.spinnerTextStyle}
/>
<StatusBar <StatusBar
hidden={true} /> hidden={true} />
<ImageBackground source={require('../assets/images/loging-background.jpg')} style={{ width: '100%', height: '100%' }}> <ImageBackground source={require('../assets/images/loging-background.jpg')} style={{ width: '100%', height: '100%' }}>
<View style={styles.logo}> <View style={styles.logo}>
<Image source={require('../assets/images/excelso-log.png')} style={styles.imageslogo}></Image> <Image source={require('../assets/images/excelso-log.png')} style={styles.imageslogo}></Image>
...@@ -253,7 +257,7 @@ const styles = StyleSheet.create({ ...@@ -253,7 +257,7 @@ const styles = StyleSheet.create({
height: 50 height: 50
}, },
imageslogo: { imageslogo: {
height: 170, height: 150,
margin: 10, margin: 10,
width: 150, width: 150,
justifyContent: 'center', justifyContent: 'center',
......
This diff is collapsed.
...@@ -236,11 +236,6 @@ class NewRegister extends React.Component { ...@@ -236,11 +236,6 @@ class NewRegister extends React.Component {
textContent={'Loading...'} textContent={'Loading...'}
textStyle={styles.spinnerTextStyle} 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.body}>
<View style={styles.itemsRow}> <View style={styles.itemsRow}>
......
This diff is collapsed.
import React from 'react'; 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 Axios from 'axios';
import { BASE_URL_RESET_PASSWORD } from '../model/Base_Model'; import { BASE_URL_RESET_PASSWORD } from '../model/Base_Model';
import ActionType from '../redux/globalActionType'; import ActionType from '../redux/globalActionType';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { TouchableOpacity } from 'react-native-gesture-handler';
import i18n from 'i18n-js'; import i18n from 'i18n-js';
import Spinner from 'react-native-loading-spinner-overlay'; import Spinner from 'react-native-loading-spinner-overlay';
...@@ -14,7 +13,7 @@ class ResetPassword extends React.Component { ...@@ -14,7 +13,7 @@ class ResetPassword extends React.Component {
this.state = { this.state = {
email: '', email: '',
language: 'id', language: 'id',
spinner:false spinner: false
} }
} }
...@@ -40,7 +39,7 @@ class ResetPassword extends React.Component { ...@@ -40,7 +39,7 @@ class ResetPassword extends React.Component {
'Email terkirim, mohon dicek' 'Email terkirim, mohon dicek'
, ,
) )
this.props.navigation.navigate('New Password'); this.props.navigation.navigate('New Password');
} }
}).catch(error => { }).catch(error => {
...@@ -56,33 +55,43 @@ class ResetPassword extends React.Component { ...@@ -56,33 +55,43 @@ class ResetPassword extends React.Component {
render() { render() {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Spinner <Spinner
visible={this.state.spinner} visible={this.state.spinner}
textContent={'Loading...'} textContent={'Loading...'}
textStyle={styles.spinnerTextStyle} textStyle={styles.spinnerTextStyle}
/> />
<View style={styles.header}> <View style={{ flex: 3 }}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>{i18n.t('resetPassword')}</Text> <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' />
<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> </View>
<View style={styles.form}> <View style={{ flex: 1, flexDirection: 'row' }}>
<View style={styles.field_email}>
<View style={{ width: 40, justifyContent: 'center' }}> <View style={styles.v_logo}>
<Text>Email</Text> <View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View> </View>
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10 }}
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address'/>
</View> </View>
</View> </View>
<View style={styles.button}>
<Button title={i18n.t('submit')} onPress={() => this.handleResetPassword()}></Button> <View style={{ flex: 0.5 }}>
</View> </View>
<TouchableOpacity onPress={() => this.handleResetPassword()}>
<Text style={{ fontSize: 20, textAlign: 'center', color: 'red' }}>{i18n.t('enterToken')}</Text>
</TouchableOpacity>
</View> </View>
</View> </View>
) )
...@@ -103,6 +112,7 @@ const styles = StyleSheet.create({ ...@@ -103,6 +112,7 @@ const styles = StyleSheet.create({
form: { form: {
flex: 3, flex: 3,
top: 40,
margin: 10, margin: 10,
marginTop: 0, marginTop: 0,
}, },
...@@ -115,6 +125,19 @@ const styles = StyleSheet.create({ ...@@ -115,6 +125,19 @@ const styles = StyleSheet.create({
height: 40, height: 40,
margin: 10, margin: 10,
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
width: 290,
height: 290,
bottom: 145,
},
v_logo: {
flex: 2,
flexDirection: 'column-reverse',
alignContent: 'flex-start',
} }
}) })
...@@ -136,4 +159,30 @@ const mapDispatchToProps = (dispacth) => { ...@@ -136,4 +159,30 @@ const mapDispatchToProps = (dispacth) => {
} }
} }
export default connect(mapStateToProps, mapDispatchToProps)(ResetPassword); export default connect(mapStateToProps, mapDispatchToProps)(ResetPassword);
\ No newline at end of file
{/* <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 { ...@@ -414,11 +414,17 @@ class ShoppingCart extends React.Component {
return ( return (
<ScrollView style={styles.container}> <ScrollView style={styles.container}>
<View style={{ flexDirection: 'row', justifyContent: 'center' }}> <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> <Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold' }}>{i18n.t('delivery')}</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}> <TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}>
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text> <Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */}
<TouchableOpacity 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> </TouchableOpacity>
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center' }}>
...@@ -426,8 +432,8 @@ class ShoppingCart extends React.Component { ...@@ -426,8 +432,8 @@ class ShoppingCart extends React.Component {
this.props.type_pickup == true ? ( this.props.type_pickup == true ? (
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Ambil pesanan kamu di</Text> <Text style={{ textAlign: 'center', fontFamily: 'Gotham-Light' }}> 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', fontSize: 12, top: 5, fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>Excelso {this.props.name_outlet}</Text>
</Card> </Card>
) : ( ) : (
<Card style={{ margin: 5, padding: 10 }}> <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