Commit 7bb18693 by Giang Tran

edit home

parent bd1a3c70
......@@ -903,7 +903,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = MXZ24GRH48;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
......@@ -937,7 +937,7 @@
CODE_SIGN_ENTITLEMENTS = Invest/Invest.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 4;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
import React, {Component} from 'react';
import {View, Text, StyleSheet, TouchableOpacity, Linking} from 'react-native';
import {getFontXD, toPriceVnd} from '../../../Config/Functions';
import {
getFontXD,
toPriceVnd,
WIDTHXD,
HEIGHTXD,
} from '../../../Config/Functions';
import R from '../../../assets/R';
import AppText from '../../../components/AppText';
import I18n from '../../../helper/i18/i18n';
......@@ -44,8 +49,8 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
},
btnSend: {
width: 140,
height: 40,
width: WIDTHXD(400),
height: HEIGHTXD(120),
backgroundColor: R.colors.main,
borderRadius: 10,
justifyContent: 'center',
......
......@@ -70,6 +70,7 @@ const ConfirmOTP = (propsa) => {
if (propsa.route.params.type == 'DEPOSIT') {
const {amount, notes} = propsa.route.params;
res = await walletDeposit({
amount,
platform: Platform.OS,
......@@ -96,10 +97,10 @@ const ConfirmOTP = (propsa) => {
navigate.navigate(TABNAVIGATOR);
}, 500);
} else {
showAlert(TYPE.SUCCESS, I18n.t('Notification'), res.data.message);
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
}
} else {
showAlert(TYPE.SUCCESS, I18n.t('Notification'), res.data.message);
showAlert(TYPE.ERROR, I18n.t('Notification'), res1.data.message);
}
propsa.hideLoading();
......
......@@ -94,6 +94,7 @@ const WalletWithdraw = (props) => {
const index = checkFormatArray([type, amount]);
if (index === true) {
if (amount >= props.user.configs.request_withdraw_amount_min) {
props.showLoading();
const res = await getOTPApi({
platform: Platform.OS,
......@@ -112,12 +113,18 @@ const WalletWithdraw = (props) => {
} else {
showAlert(TYPE.ERROR, I18n.t('Notification'), res.data.message);
}
props.hideLoading();
} else {
showAlert(
TYPE.WARN,
I18n.t('Notification'),
I18n.t('WarnMinReqestWithdraw'),
);
}
} else {
showAlert(
TYPE.WARN,
I18n.t('Notification'),
I18n.t('Please_fill_in') + titles[index],
);
}
......@@ -265,7 +272,7 @@ const styles = StyleSheet.create({
},
btnSend: {
width: WIDTHXD(400),
height: HEIGHTXD(100),
height: HEIGHTXD(120),
backgroundColor: R.colors.main,
borderRadius: 10,
justifyContent: 'center',
......
......@@ -195,14 +195,25 @@ const renderActions = (onClickDetail) => {
<AppText i18nKey={'History'} style={styles.txt} />
</TouchableOpacity>
</View>
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<View style={{width: 30, height: 20}}>
<View
style={{
justifyContent: 'center',
alignItems: 'center',
}}>
<TouchableOpacity
onPress={() => onClickDetail()}
style={styles.containerBtn}>
onPress={() => {
onClickDetail();
}}
style={{
width: HEIGHTXD(160),
height: HEIGHTXD(80),
justifyContent: 'center',
alignItems: 'center',
}}>
<View style={styles.containerBtn}>
<Icon name={'up'} size={18} color={R.colors.color777} />
</TouchableOpacity>
</View>
</TouchableOpacity>
</View>
</View>
);
......@@ -280,14 +291,25 @@ const HeaderHome = (props) => {
{detail ? (
renderActions(onClickDetail)
) : (
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<View style={{width: HEIGHTXD(80), height: HEIGHTXD(60)}}>
<View
style={{
justifyContent: 'center',
alignItems: 'center',
}}>
<TouchableOpacity
onPress={onClickDetail}
style={styles.containerBtn}>
onPress={() => {
onClickDetail();
}}
style={{
width: HEIGHTXD(160),
height: HEIGHTXD(80),
justifyContent: 'center',
alignItems: 'center',
}}>
<View style={styles.containerBtn}>
<Icon name={'down'} size={18} color={R.colors.color777} />
</TouchableOpacity>
</View>
</TouchableOpacity>
</View>
)}
</View>
......@@ -317,23 +339,22 @@ const styles = StyleSheet.create({
borderBottomColor: '#EDEDF1',
},
containerBtn: {
position: 'absolute',
width: HEIGHTXD(80),
height: HEIGHTXD(80),
justifyContent: 'center',
alignItems: 'center',
backgroundColor: R.colors.white,
borderRadius: HEIGHTXD(80),
top: HEIGHTXD(20),
shadowColor: '#000',
marginTop: 15,
shadowOffset: {
width: 0,
height: 1,
width: 1,
height: 2,
},
shadowOpacity: 0.25,
shadowOpacity: 1.25,
shadowRadius: 1.84,
elevation: 1,
elevation: 3,
},
img: {
height: Platform.OS == 'ios' ? HEIGHTXD(728) : HEIGHTXD(808),
......
......@@ -286,4 +286,6 @@ export default {
WaitUpdateCQG: 'Waiting Update CQG',
code: 'Code',
AvailableMargin: 'Available margin',
WarnMinReqestWithdraw:
'The withdrawal amount must be more than 1 million dong',
};
......@@ -287,4 +287,5 @@ export default {
Calculator: 'Tính',
_Sell: 'Bán',
FirstEscrow: 'Ký quỹ ban đầu (VNĐ) ',
WarnMinReqestWithdraw: 'Số tiền rút phải lớn hơn 1 triệu đồng',
};
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