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 {
source={require('../assets/images/people-actv.png')}
/>
</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}
</Text>
<View style={{ height: 90, flexDirection: 'row', justifyContent: 'center' }}>
......@@ -200,34 +200,43 @@ class Account extends React.Component {
color='#CFB368'
/>
</TouchableOpacity>
</View>
</View>
{
this.props.set_card === false ? (
<View>
<View style={{ flex: 1, flexDirection: 'row', justifyContent: 'center', top: 50 }}>
<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 }}>
<View style={{ marginTop: 65 }}>
<View style={{ flex: 1, backgroundColor: 'grey', height: 250, borderRadius: 20, marginRight: 10, marginLeft: 10,justifyContent:'center' }}>
<View style={{justifyContent:'center'}}>
<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>
<TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: '#CFB368', margin: 40, top: 40, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 15 }}>LOGOUT</Text>
</View>
<View style={{ flex: 1, height: 250 }}>
<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>
</View>
</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>
</TouchableOpacity>
</View>
</View>
) : (
<View>
<View style={styles.Card}>
<View style={styles.card}>
<Card style={{ padding: 20, alignContent: 'center' }}>
<View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
<View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text>
......@@ -420,7 +429,7 @@ const styles = StyleSheet.create({
},
logo: {
alignSelf: 'flex-start',
marginTop: 50,
marginTop: 70,
width: 290,
height: 290,
bottom: 145,
......@@ -495,4 +504,25 @@ export default connect(mapStateToProps, mapDispatchToProps)(Account);
<Text style={{ textAlign: 'center', top: 30, fontSize: 14 }}>ACTIVATION CARD</Text>
</View>
</Card>
</TouchableOpacity> */}
\ No newline at end of file
</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 {
textAlign: 'center'
}, 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={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
......
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 Axios from 'axios';
import ActionType from '../redux/globalActionType';
......@@ -49,8 +49,8 @@ class CardActivation extends React.Component {
})
}).catch(error => {
let response = error.response.data;
const {navigation} = this.props
session(response,navigation)
const { navigation } = this.props
session(response, navigation)
Alert.alert(response.msg);
})
}
......@@ -81,8 +81,8 @@ class CardActivation extends React.Component {
spinner: false,
})
let response = error.response.data;
const {navigation} = this.props
session(response,navigation)
const { navigation } = this.props
session(response, navigation)
Alert.alert(response.msg);
})
}
......@@ -112,8 +112,8 @@ class CardActivation extends React.Component {
spinner: false,
})
let response = error.response.data;
const {navigation} = this.props
session(response,navigation)
const { navigation } = this.props
session(response, navigation)
Alert.alert(response.msg);
})
......@@ -127,64 +127,64 @@ class CardActivation extends React.Component {
textContent={'Loading...'}
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.field_phone}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Phone</Text>
</View>
<View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Mobile phone</Text>
<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 })}
value={this.state.mobile_phone}
/>
</View>
<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>
{
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
)
}
{
this.state.timer === 0 ? (
<View style={{ width: 90, height: 40, alignSelf: 'center', margin: 20, top: 0 }}>
<Button title="Resend Token" onPress={() => this.ResendToken()}></Button>
</View>
) : (null)}
<View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Card number</Text>
</View>
<View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Card Number</Text>
<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 })}
value={this.state.card_number}
/>
</View>
</View>
<View style={styles.field_email}>
<View style={{ width: 55, justifyContent: 'center' }}>
<Text>Token</Text>
</View>
<View style={{ flex: 1, margin: 10 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 19, textAlign: 'center', marginBottom: 5 }}>Token</Text>
<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 })}
value={this.state.token}
/>
</View>
</View>
<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>
......@@ -206,8 +206,8 @@ const styles = StyleSheet.create({
form: {
flex: 3,
margin: 10,
marginTop: 0,
margin: 5,
marginTop: 50,
},
field_email: {
......
......@@ -309,11 +309,12 @@ class MenuSelection extends React.Component {
</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}}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Black', textAlign: 'center',top:10,marginLeft:45 }}> {this.props.order_quantity} Item | {this.props.type_pickup == true ? (null) : (
<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 }}> 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={''} />
......@@ -341,19 +342,20 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: 'white',
},
shadow: {
borderWidth:1,
borderColor: '#ddd',
borderBottomWidth: 0,
shadowColor: '#000',
shadowOffset: { width: 0, height: 0 },
shadowOpacity: 10,
shadowRadius: 0,
elevation: 0,
marginTop: 10,
flex: 0.5,
height: 50,
}
// shadow: {
// borderWidth:1,
// borderColor: '#ddd',
// borderBottomWidth: 0,
// shadowColor: '#000',
// shadowOffset: { width: 0, height: 0 },
// shadowOpacity: 10,
// shadowRadius: 0,
// elevation: 0,
// marginTop: 10,
// flex: 0.5,
// height: 50,
// }
})
const mapStateToProps = (state) => {
......@@ -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