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

pemasangan translate di account dan menu selection

parent 5f3bc839
...@@ -27,6 +27,7 @@ import * as Device from 'expo-device'; ...@@ -27,6 +27,7 @@ import * as Device from 'expo-device';
import session from '../function/session'; import session from '../function/session';
import Constants from 'expo-constants'; import Constants from 'expo-constants';
import Toast from 'react-native-tiny-toast'; import Toast from 'react-native-tiny-toast';
import i18n from 'i18n-js';
class Account extends React.Component { class Account extends React.Component {
constructor(props) { constructor(props) {
...@@ -204,7 +205,7 @@ class Account extends React.Component { ...@@ -204,7 +205,7 @@ class Account extends React.Component {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView> <ScrollView>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}>
<View style={{ flex: 1, height: 90 }}> <View style={{ flex: 1, height: 90 }}>
<View style={{ alignSelf: 'center' }}> <View style={{ alignSelf: 'center' }}>
<Image <Image
...@@ -217,11 +218,10 @@ class Account extends React.Component { ...@@ -217,11 +218,10 @@ class Account extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center' }}> <Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center' }}>
{this.state.full_name} {this.state.full_name}
</Text> </Text>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Profile')}> <Text style={{ fontFamily: 'Gotham-Light', color: '#838383', fontSize: 12, textAlign: 'center', top: 2 }}>{i18n.t('Viewprofil')}</Text>
<Text style={{ fontFamily: 'Gotham-Light', color: '#838383', fontSize: 12, textAlign: 'center', top: 2 }}>View Profile</Text>
</TouchableOpacity>
</View> </View>
</View> </View>
</TouchableOpacity>
{ {
this.props.set_card === false ? ( this.props.set_card === false ? (
...@@ -230,7 +230,7 @@ class Account extends React.Component { ...@@ -230,7 +230,7 @@ class Account extends React.Component {
<View style={{ justifyContent: 'center' }}> <View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}> <TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, }}> <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> <Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}> {i18n.t('Acitvatecard')}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
...@@ -239,7 +239,7 @@ class Account extends React.Component { ...@@ -239,7 +239,7 @@ class Account extends React.Component {
<View style={{ flex: 1, height: 250 }}> <View style={{ flex: 1, height: 250 }}>
<TouchableOpacity style={{ top: 10, marginLeft: 15, marginRight: 15, justifyContent: 'center' }} onPress={() => this.logout()}> <TouchableOpacity style={{ top: 10, marginLeft: 15, marginRight: 15, justifyContent: 'center' }} onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', justifyContent: 'center' }}> <View style={{ height: 40, borderRadius: 20, backgroundColor: '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>LOGOUT</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('logout')}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<View style={styles.v_logo}> <View style={styles.v_logo}>
...@@ -266,10 +266,10 @@ class Account extends React.Component { ...@@ -266,10 +266,10 @@ class Account extends React.Component {
<Card style={{ padding: 20, alignContent: 'center' }}> <Card style={{ padding: 20, alignContent: 'center' }}>
<View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}> <View style={{ flexDirection: 'row', flex: 1, paddingBottom: 5 }}>
<View style={{ flex: 0.5 }}> <View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>YOUR CARD NUMBER</Text> <Text style={{ fontSize: 10, fontFamily: 'Gotham-Light' }}>{i18n.t('cardnumber')}</Text>
</View> </View>
<View style={{ flex: 0.5 }}> <View style={{ flex: 0.5 }}>
<Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>Expired At {this.state.expire_date}</Text> <Text style={{ fontSize: 10, textAlign: 'right', fontFamily: 'Gotham-Light' }}>{i18n.t('expired')} {this.state.expire_date}</Text>
</View> </View>
</View> </View>
<View style={{ paddingHorizontal: 10 }}> <View style={{ paddingHorizontal: 10 }}>
...@@ -282,7 +282,7 @@ class Account extends React.Component { ...@@ -282,7 +282,7 @@ class Account extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}> <View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{ flex: 0.3, justifyContent: 'center' }}> <View style={{ flex: 0.3, justifyContent: 'center' }}>
{/* <Text>{i18n.t('balance')}</Text> */} {/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>BALANCE</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>{i18n.t('balance')}</Text>
</View> </View>
<View style={{ flex: 0.7, alignItems: 'center' }}> <View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.balance}</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.balance}</Text>
...@@ -293,7 +293,7 @@ class Account extends React.Component { ...@@ -293,7 +293,7 @@ class Account extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}> <View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{ flex: 0.3, justifyContent: 'center' }}> <View style={{ flex: 0.3, justifyContent: 'center' }}>
{/* <Text>{i18n.t('balance')}</Text> */} {/* <Text>{i18n.t('balance')}</Text> */}
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>POINTS</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light' }}>{i18n.t('point')}</Text>
</View> </View>
<View style={{ flex: 0.7, alignItems: 'center' }}> <View style={{ flex: 0.7, alignItems: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.points}</Text> <Text style={{ fontSize: 14, fontFamily: 'Gotham-Black', color: 'gray' }}>IDR {this.state.points}</Text>
...@@ -306,7 +306,7 @@ class Account extends React.Component { ...@@ -306,7 +306,7 @@ class Account extends React.Component {
</View> </View>
</View> </View>
<TouchableOpacity style={styles.submitTopUp} activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}> <TouchableOpacity style={styles.submitTopUp} activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>TOP UP BALANCE</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('topup')}</Text>
</TouchableOpacity> </TouchableOpacity>
<View style={{ padding: 10, height: 200, top: 10, margin: 10 }}> <View style={{ padding: 10, height: 200, top: 10, margin: 10 }}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}> <ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}>
...@@ -326,7 +326,7 @@ class Account extends React.Component { ...@@ -326,7 +326,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }} style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/4.png')} source={require('../assets/icon/4.png')}
/> />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}>TRANSFER BALANCE</Text> <Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}> {i18n.t('Transferbalance')}</Text>
</View> </View>
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
...@@ -338,7 +338,7 @@ class Account extends React.Component { ...@@ -338,7 +338,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }} style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/2.png')} source={require('../assets/icon/2.png')}
/> />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}>USE BALANCE / POINT</Text> <Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, color: '#838383' }}> {i18n.t('Usebalancepoint')}</Text>
</View> </View>
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
...@@ -352,7 +352,7 @@ class Account extends React.Component { ...@@ -352,7 +352,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }} style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/1.png')} source={require('../assets/icon/1.png')}
/> />
<Text style={{ fontFamily: 'Gotham-Black', flexDirection: 'row', textAlign: 'center', flexWrap: 'wrap', margin: 5, color: '#838383' }}>TRANSACTION HISTORY</Text> <Text style={{ fontFamily: 'Gotham-Black', flexDirection: 'row', textAlign: 'center', flexWrap: 'wrap', margin: 5, color: '#838383' }}> {i18n.t('Transactionhistory')}</Text>
</View> </View>
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
...@@ -365,7 +365,7 @@ class Account extends React.Component { ...@@ -365,7 +365,7 @@ class Account extends React.Component {
style={{ height: 50, width: 50, justifyContent: 'center' }} style={{ height: 50, width: 50, justifyContent: 'center' }}
source={require('../assets/icon/3.png')} source={require('../assets/icon/3.png')}
/> />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, margin: 5, color: '#838383' }}>RENEWAL</Text> <Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', top: 5, fontSize: 14, margin: 5, color: '#838383' }}> {i18n.t('Renewal')}</Text>
</View> </View>
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
...@@ -377,7 +377,7 @@ class Account extends React.Component { ...@@ -377,7 +377,7 @@ class Account extends React.Component {
<Card style={{ width: 200, paddingHorizontal: 10, paddingTop: 20, paddingBottom: 20 }}> <Card style={{ width: 200, paddingHorizontal: 10, paddingTop: 20, paddingBottom: 20 }}>
<View style={{ flex: 1, alignItems: 'center' }}> <View style={{ flex: 1, alignItems: 'center' }}>
<MaterialIcons name="autorenew" size={30} color="gray" style={{ marginBottom: 10 }} /> <MaterialIcons name="autorenew" size={30} color="gray" style={{ marginBottom: 10 }} />
<Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', fontSize: 14, color: '#838383' }}>UPGRADE PREMIUM</Text> <Text style={{ fontFamily: 'Gotham-Black', textAlign: 'center', fontSize: 14, color: '#838383' }}></Text>
</View> </View>
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
...@@ -390,7 +390,7 @@ class Account extends React.Component { ...@@ -390,7 +390,7 @@ class Account extends React.Component {
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.logout()}> <TouchableOpacity onPress={() => this.logout()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginLeft: 20, marginRight: 20, marginBottom: 20, padding: 5, bottom: 5, top: 1 }}> <View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginLeft: 20, marginRight: 20, marginBottom: 20, padding: 5, bottom: 5, top: 1 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>LOGOUT</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('logout')}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
...@@ -523,7 +523,8 @@ const mapStateToProps = (state) => { ...@@ -523,7 +523,8 @@ const mapStateToProps = (state) => {
return { return {
session_id: state.session_id, session_id: state.session_id,
set_card: state.set_card, set_card: state.set_card,
in_payment: state.in_payment in_payment: state.in_payment,
language: state.language,
} }
} }
......
...@@ -11,6 +11,7 @@ import * as Location from 'expo-location'; ...@@ -11,6 +11,7 @@ import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions'; import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device'; import * as Device from 'expo-device';
import NumberFormat from 'react-number-format'; import NumberFormat from 'react-number-format';
import i18n from 'i18n-js';
class MenuSelection extends React.Component { class MenuSelection extends React.Component {
constructor(props) { constructor(props) {
...@@ -342,7 +343,7 @@ class MenuSelection extends React.Component { ...@@ -342,7 +343,7 @@ class MenuSelection extends React.Component {
<View> <View>
<View style={{ height: 40, borderRadius: 10, width: '68%', backgroundColor: '#CFB368', marginRight: 20, marginLeft: 40, top: 15, flexDirection: 'row', marginBottom: 30 }}> <View style={{ height: 40, borderRadius: 10, width: '68%', backgroundColor: '#CFB368', marginRight: 20, marginLeft: 40, top: 15, flexDirection: 'row', marginBottom: 30 }}>
<Image source={(require('../assets/icon/icon-order.png'))} style={{ height: 40, width: 40, tintColor: 'white', }}></Image> <Image source={(require('../assets/icon/icon-order.png'))} style={{ height: 40, width: 40, tintColor: 'white', }}></Image>
<Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 16, alignSelf: 'center', textAlign: 'center' }}>View Cart</Text> <Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 16, alignSelf: 'center', textAlign: 'center' }}>{i18n.t('Viewcart')}</Text>
</View> </View>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
...@@ -389,7 +390,8 @@ const mapStateToProps = (state) => { ...@@ -389,7 +390,8 @@ const mapStateToProps = (state) => {
order_total: state.order_total, order_total: state.order_total,
quantity: state.quantity, quantity: state.quantity,
address: state.address, address: state.address,
menu_item: state.menu_item menu_item: state.menu_item,
language: state.language
} }
} }
......
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