Commit 23060292 by Giang Tran

fix code

parent bc0c8dc0
...@@ -56,6 +56,7 @@ const PacketCQG = (props) => { ...@@ -56,6 +56,7 @@ const PacketCQG = (props) => {
props.hideLoading(); props.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
props.saveUserToRedux(res.data.data); props.saveUserToRedux(res.data.data);
navigate.goBack();
showAlert(TYPE.SUCCESS, I18n.t('Notification'), res.data.message); showAlert(TYPE.SUCCESS, I18n.t('Notification'), res.data.message);
} else { } else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message); showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
......
import React from 'react'; import React from 'react';
import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native'; import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
import R from '../../../../assets/R'; import R from '../../../../assets/R';
import {getFontXD} from '../../../../Config/Functions'; import {getFontXD, HEIGHTXD, WIDTHXD} from '../../../../Config/Functions';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import AppText from '../../../../components/AppText'; import AppText from '../../../../components/AppText';
import I18n from '../../../../helper/i18/i18n'; import I18n from '../../../../helper/i18/i18n';
...@@ -9,6 +9,9 @@ import {useNavigation} from '@react-navigation/native'; ...@@ -9,6 +9,9 @@ import {useNavigation} from '@react-navigation/native';
import {PACKETCQG} from '../../../../routers/ScreenNames'; import {PACKETCQG} from '../../../../routers/ScreenNames';
const Profile = (props) => { const Profile = (props) => {
const onClickCLose = () => {
console.log('Close click');
};
const navigation = useNavigation(); const navigation = useNavigation();
return ( return (
<View style={styles.container}> <View style={styles.container}>
...@@ -30,6 +33,23 @@ const Profile = (props) => { ...@@ -30,6 +33,23 @@ const Profile = (props) => {
style={styles.txtTitle}></AppText> style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.cqg_account}</Text> <Text style={styles.txtBig}>{props.user.cqg_account}</Text>
</View> </View>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginTop: 50,
}}>
<TouchableOpacity
onPress={() => navigation.navigate(PACKETCQG)}
style={styles.btnLeft}>
<AppText i18nKey={'UpdatePacket'} style={styles.txtBtn}></AppText>
</TouchableOpacity>
<TouchableOpacity onPress={onClickCLose} style={styles.btnRight}>
<AppText i18nKey={'CloseAccount'} style={styles.txtBtn}></AppText>
</TouchableOpacity>
</View>
</View> </View>
) : ( ) : (
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
...@@ -91,8 +111,9 @@ const styles = StyleSheet.create({ ...@@ -91,8 +111,9 @@ const styles = StyleSheet.create({
fontSize: getFontXD(46), fontSize: getFontXD(46),
}, },
txtBtn: { txtBtn: {
fontSize: getFontXD(52), fontSize: getFontXD(42),
color: R.colors.white, color: R.colors.white,
fontWeight: '600',
}, },
containerBtn: { containerBtn: {
paddingVertical: 10, paddingVertical: 10,
...@@ -101,6 +122,22 @@ const styles = StyleSheet.create({ ...@@ -101,6 +122,22 @@ const styles = StyleSheet.create({
borderRadius: 5, borderRadius: 5,
marginTop: 30, marginTop: 30,
}, },
btnLeft: {
backgroundColor: R.colors.main,
width: WIDTHXD(460),
alignItems: 'center',
justifyContent: 'center',
height: HEIGHTXD(109),
borderRadius: 5,
},
btnRight: {
backgroundColor: '#E3434F',
width: WIDTHXD(460),
alignItems: 'center',
justifyContent: 'center',
height: HEIGHTXD(109),
borderRadius: 5,
},
}); });
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
......
...@@ -74,6 +74,8 @@ const ExchangeRate = (props) => { ...@@ -74,6 +74,8 @@ const ExchangeRate = (props) => {
title={I18n.t('UnitsQuotedFloor')} title={I18n.t('UnitsQuotedFloor')}
/> />
<TextField <TextField
isNumber={true}
maxLength={12}
onChangeText={(val) => setPriceExchange(val)} onChangeText={(val) => setPriceExchange(val)}
title={I18n.t('ConversionPrice')} title={I18n.t('ConversionPrice')}
/> />
......
...@@ -274,4 +274,6 @@ export default { ...@@ -274,4 +274,6 @@ export default {
ProfitLoss: 'Profit/Loss', ProfitLoss: 'Profit/Loss',
BUY_IN: 'Buy in', BUY_IN: 'Buy in',
SELL_OUT: 'Sell out', SELL_OUT: 'Sell out',
CloseAccount: 'Close account',
UpdatePacket: 'Update packet',
}; };
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
Photo_library: 'Thư viện ảnh', Photo_library: 'Thư viện ảnh',
Take_photo: 'Chụp ảnh', Take_photo: 'Chụp ảnh',
EnableCQG: 'Có tài khoản CQG', EnableCQG: 'Kích hoạt',
Request_Open_Account_CQG: 'Yêu cầu mở TK CQG', Request_Open_Account_CQG: 'Yêu cầu mở TK CQG',
Waiting_for_Progress: 'Chờ xử lý', Waiting_for_Progress: 'Chờ xử lý',
Free: 'Miễn phí', Free: 'Miễn phí',
...@@ -269,4 +269,6 @@ export default { ...@@ -269,4 +269,6 @@ export default {
SELL_OUT: 'Bán ra', SELL_OUT: 'Bán ra',
EscrowCalculator: 'Tính ký quỹ', EscrowCalculator: 'Tính ký quỹ',
FirstEscrowTotal: 'Ký quỹ khả dụng', FirstEscrowTotal: 'Ký quỹ khả dụng',
CloseAccount: 'Đóng tài khoản',
UpdatePacket: 'Cập nhật gói cước',
}; };
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