Commit 7bb18693 by Giang Tran

edit home

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