Commit bd6aecb3 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

change menu selection (3)

parent 38f08cff
...@@ -183,7 +183,7 @@ class Account extends React.Component { ...@@ -183,7 +183,7 @@ class Account extends React.Component {
source={require('../assets/images/people-actv.png')} source={require('../assets/images/people-actv.png')}
/> />
</View> </View>
<Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 20, textAlign: 'center', top: 5 }}> <Text style={{ fontFamily: 'Gotham-Black', color: 'grey', fontSize: 17, textAlign: 'center', top: 5 }}>
{this.state.full_name} {this.state.full_name}
</Text> </Text>
<View style={{ height: 90, flexDirection: 'row', justifyContent: 'center' }}> <View style={{ height: 90, flexDirection: 'row', justifyContent: 'center' }}>
...@@ -200,27 +200,36 @@ class Account extends React.Component { ...@@ -200,27 +200,36 @@ class Account extends React.Component {
color='#CFB368' color='#CFB368'
/> />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
{ {
this.props.set_card === false ? ( this.props.set_card === false ? (
<View> <View style={{ marginTop: 65 }}>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 50 }}> <View style={{ flex: 1, backgroundColor: 'grey', height: 250, borderRadius: 20, marginRight: 10, marginLeft: 10,justifyContent:'center' }}>
<View style={{ height: 250, flex: 1, backgroundColor: 'grey', marginRight: 20, marginLeft: 20, top: 25, borderRadius: 20 }}> <View style={{justifyContent:'center'}}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', top: 20 }}>No card yet</Text> <TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<TouchableOpacity onPress={() => this.handleLoggin()}> <View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, }}>
<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 }}>ACTIVATE CARD</Text> <Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATE CARD</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
<TouchableOpacity onPress={() => this.logout()}> <View style={{ flex: 1, height: 250 }}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 40, top: 40, }}> <TouchableOpacity style={{ top: 20, marginLeft: 10, marginRight: 10, justifyContent: 'center' }} onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start',marginTop:20 }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
</View>
</View>
</View>
</View> </View>
) : ( ) : (
<View> <View>
...@@ -420,7 +429,7 @@ const styles = StyleSheet.create({ ...@@ -420,7 +429,7 @@ const styles = StyleSheet.create({
}, },
logo: { logo: {
alignSelf: 'flex-start', alignSelf: 'flex-start',
marginTop: 50, marginTop: 70,
width: 290, width: 290,
height: 290, height: 290,
bottom: 145, bottom: 145,
...@@ -496,3 +505,24 @@ export default connect(mapStateToProps, mapDispatchToProps)(Account); ...@@ -496,3 +505,24 @@ export default connect(mapStateToProps, mapDispatchToProps)(Account);
</View> </View>
</Card> </Card>
</TouchableOpacity> */} </TouchableOpacity> */}
{/* <View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center' }}>
<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.props.navigation.navigate('Card Activation')}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATE CARD</Text>
</View>
</TouchableOpacity>
</View>
</View>
<View>
<TouchableOpacity style={{backgroundColor:'red',top:20}} onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
</TouchableOpacity>
</View> */}
\ No newline at end of file
...@@ -260,7 +260,19 @@ class Auth extends React.Component { ...@@ -260,7 +260,19 @@ class Auth extends React.Component {
textAlign: 'center' textAlign: 'center'
}, title: 'CHANGE PASSWORD' }, title: 'CHANGE PASSWORD'
}} /> }} />
<Stack.Screen name="Card Activation" component={CardActivation} /> <Stack.Screen name="Card Activation" component={CardActivation} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 18,
color: 'white',
textAlign: 'center'
}, title: 'ACTIVATE CARD'
}} />
<Stack.Screen name="Renewal" component={Renewal} options={{ <Stack.Screen name="Renewal" component={Renewal} options={{
headerStyle: { backgroundColor: '#CFB368' }, headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' }, headerTitleContainerStyle: { alignContent: 'center' },
......
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 } 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';
...@@ -49,8 +49,8 @@ class CardActivation extends React.Component { ...@@ -49,8 +49,8 @@ class CardActivation extends React.Component {
}) })
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
const {navigation} = this.props const { navigation } = this.props
session(response,navigation) session(response, navigation)
Alert.alert(response.msg); Alert.alert(response.msg);
}) })
} }
...@@ -81,8 +81,8 @@ class CardActivation extends React.Component { ...@@ -81,8 +81,8 @@ class CardActivation extends React.Component {
spinner: false, spinner: false,
}) })
let response = error.response.data; let response = error.response.data;
const {navigation} = this.props const { navigation } = this.props
session(response,navigation) session(response, navigation)
Alert.alert(response.msg); Alert.alert(response.msg);
}) })
} }
...@@ -112,8 +112,8 @@ class CardActivation extends React.Component { ...@@ -112,8 +112,8 @@ class CardActivation extends React.Component {
spinner: false, spinner: false,
}) })
let response = error.response.data; let response = error.response.data;
const {navigation} = this.props const { navigation } = this.props
session(response,navigation) session(response, navigation)
Alert.alert(response.msg); Alert.alert(response.msg);
}) })
...@@ -127,64 +127,64 @@ class CardActivation extends React.Component { ...@@ -127,64 +127,64 @@ class CardActivation extends React.Component {
textContent={'Loading...'} textContent={'Loading...'}
textStyle={styles.spinnerTextStyle} textStyle={styles.spinnerTextStyle}
/> />
<View style={styles.header}>
<Text style={{ textAlign: 'center', marginTop: 10, fontSize: 25 }}>Activate Card</Text>
</View>
<View style={styles.form}> <View style={styles.form}>
<View style={styles.field_phone}> <View style={styles.field_phone}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Phone</Text>
</View>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Mobile phone</Text>
<TextInput <TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }} style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 10,textAlign:'center',fontFamily:'Gotham-Black' }}
onChangeText={mobile_phone => this.setState({ mobile_phone })} onChangeText={mobile_phone => this.setState({ mobile_phone })}
value={this.state.mobile_phone} value={this.state.mobile_phone}
/> />
</View> </View>
<View style={styles.button}> <View style={styles.button}>
<Button title="Token" onPress={() => this.handleToken()}></Button> <TouchableOpacity style={{top:25}} onPress={() => this.handleToken()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center',margin:10 }}>Token</Text>
</View>
</TouchableOpacity>
</View> </View>
</View> </View>
{ {
this.state.onclick === true ? (<Text style={{ textAlign: 'center' }}> 0:{this.state.timer} </Text>) : ( this.state.onclick === true ? (<Text style={{ textAlign: 'center',fontFamily:'Gotham-Black' }}> 0:{this.state.timer} </Text>) : (
null null
) )
} }
{ {
this.state.timer === 0 ? ( this.state.timer === 0 ? (
<View style={{ width: 90, height: 40, alignSelf: 'center', margin: 20, top: 0 }}> <View style={{ width: 90, height: 40, alignSelf: 'center', margin: 20, top: 0 }}>
<Button title="Resend Token" onPress={() => this.ResendToken()}></Button> <Button title="Resend Token" onPress={() => this.ResendToken()}></Button>
</View> </View>
) : (null)} ) : (null)}
<View style={styles.field_email}> <View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Card number</Text>
</View>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Card Number</Text>
<TextInput <TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }} style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 10 }}
onChangeText={card_number => this.setState({ card_number })} onChangeText={card_number => this.setState({ card_number })}
value={this.state.card_number} value={this.state.card_number}
/> />
</View> </View>
</View> </View>
<View style={styles.field_email}> <View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Token</Text>
</View>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Token</Text>
<TextInput <TextInput
style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5 }} style={{ height: 40, borderColor: 'gray', borderWidth: 1, padding: 5, borderRadius: 10 }}
onChangeText={token => this.setState({ token })} onChangeText={token => this.setState({ token })}
value={this.state.token} value={this.state.token}
/> />
</View> </View>
</View> </View>
<View style={styles.button}> <View style={styles.button}>
<Button title="Activate" onPress={() => this.handleActivate()}></Button> <TouchableOpacity onPress={() => this.handleActivate()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', margin: 20, justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>ACTIVATE</Text>
</View>
</TouchableOpacity>
</View> </View>
</View> </View>
</View> </View>
...@@ -206,8 +206,8 @@ const styles = StyleSheet.create({ ...@@ -206,8 +206,8 @@ const styles = StyleSheet.create({
form: { form: {
flex: 3, flex: 3,
margin: 10, margin: 5,
marginTop: 0, marginTop: 50,
}, },
field_email: { field_email: {
......
...@@ -309,11 +309,12 @@ class MenuSelection extends React.Component { ...@@ -309,11 +309,12 @@ class MenuSelection extends React.Component {
</View> </View>
<View> <View>
</View> </View>
<View style={styles.shadow}> <View style={{ height: 1, borderWidth: 1, marginLeft: 10, marginRight: 10, borderColor: 'grey' }}></View>
<View style={{ height: 70 }}>
<View style={{ flex: 1, flexDirection: 'row' }}> <View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ flex: 1}}> <View style={{ flex: 1 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', textAlign: 'center',top:10,marginLeft:45 }}> {this.props.order_quantity} Item | {this.props.type_pickup == true ? (null) : ( <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', textAlign: 'center', top: 10, marginLeft: 45 }}> {this.props.order_quantity} Item | {this.props.type_pickup == true ? (null) : (
<Text style={{ fontSize: 12 }}> Ongkir {this.props.grabamount} </Text> <Text style={{ fontSize: 12 }}> Ongkir {this.props.grabamount} </Text>
)} </Text> )} </Text>
<NumberFormat decimalScale={0} value={this.props.order_total} renderText={value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Light', top: 20, textAlign: 'center' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.props.order_total} renderText={value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Light', top: 20, textAlign: 'center' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
...@@ -341,19 +342,20 @@ const styles = StyleSheet.create({ ...@@ -341,19 +342,20 @@ const styles = StyleSheet.create({
flex: 1, flex: 1,
backgroundColor: 'white', backgroundColor: 'white',
}, },
shadow: { // shadow: {
borderWidth:1,
borderColor: '#ddd', // borderWidth:1,
borderBottomWidth: 0, // borderColor: '#ddd',
shadowColor: '#000', // borderBottomWidth: 0,
shadowOffset: { width: 0, height: 0 }, // shadowColor: '#000',
shadowOpacity: 10, // shadowOffset: { width: 0, height: 0 },
shadowRadius: 0, // shadowOpacity: 10,
elevation: 0, // shadowRadius: 0,
marginTop: 10, // elevation: 0,
flex: 0.5, // marginTop: 10,
height: 50, // flex: 0.5,
} // height: 50,
// }
}) })
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
...@@ -423,4 +425,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(MenuSelection) ...@@ -423,4 +425,9 @@ export default connect(mapStateToProps, mapDispatchToProps)(MenuSelection)
// ) // )
// } // }
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', textAlign: 'center',top:10,marginLeft:45 }}> {this.props.order_quantity} Item | {this.props.type_pickup == true ? (null) : (
<Text style={{ fontSize: 12 }}> Ongkir {this.props.grabamount} </Text>
)} </Text>
<NumberFormat decimalScale={0} value={this.props.order_total} renderText={value => <Text style={{ fontSize: 20, fontFamily: 'Gotham-Light', top: 20, textAlign: 'center' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> */}
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