Commit 23060292 by Giang Tran

fix code

parent bc0c8dc0
......@@ -56,6 +56,7 @@ const PacketCQG = (props) => {
props.hideLoading();
if (res.data.code == 200) {
props.saveUserToRedux(res.data.data);
navigate.goBack();
showAlert(TYPE.SUCCESS, I18n.t('Notification'), res.data.message);
} else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
......
import React from 'react';
import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
import R from '../../../../assets/R';
import {getFontXD} from '../../../../Config/Functions';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../../../Config/Functions';
import {connect} from 'react-redux';
import AppText from '../../../../components/AppText';
import I18n from '../../../../helper/i18/i18n';
......@@ -9,6 +9,9 @@ import {useNavigation} from '@react-navigation/native';
import {PACKETCQG} from '../../../../routers/ScreenNames';
const Profile = (props) => {
const onClickCLose = () => {
console.log('Close click');
};
const navigation = useNavigation();
return (
<View style={styles.container}>
......@@ -30,6 +33,23 @@ const Profile = (props) => {
style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.cqg_account}</Text>
</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 style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
......@@ -91,8 +111,9 @@ const styles = StyleSheet.create({
fontSize: getFontXD(46),
},
txtBtn: {
fontSize: getFontXD(52),
fontSize: getFontXD(42),
color: R.colors.white,
fontWeight: '600',
},
containerBtn: {
paddingVertical: 10,
......@@ -101,6 +122,22 @@ const styles = StyleSheet.create({
borderRadius: 5,
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) => {
......
......@@ -74,6 +74,8 @@ const ExchangeRate = (props) => {
title={I18n.t('UnitsQuotedFloor')}
/>
<TextField
isNumber={true}
maxLength={12}
onChangeText={(val) => setPriceExchange(val)}
title={I18n.t('ConversionPrice')}
/>
......
......@@ -274,4 +274,6 @@ export default {
ProfitLoss: 'Profit/Loss',
BUY_IN: 'Buy in',
SELL_OUT: 'Sell out',
CloseAccount: 'Close account',
UpdatePacket: 'Update packet',
};
......@@ -92,7 +92,7 @@ export default {
Photo_library: 'Thư viện ả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',
Waiting_for_Progress: 'Chờ xử lý',
Free: 'Miễn phí',
......@@ -269,4 +269,6 @@ export default {
SELL_OUT: 'Bán ra',
EscrowCalculator: 'Tính ký quỹ',
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