Commit 3d5d156a by Giang Tran

merge code

parents 163af2a7 e2aef260
...@@ -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 = 10; CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = MXZ24GRH48; DEVELOPMENT_TEAM = MXZ24GRH48;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
...@@ -912,7 +912,7 @@ ...@@ -912,7 +912,7 @@
); );
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";
MARKETING_VERSION = 1.8; MARKETING_VERSION = 1.9;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
...@@ -937,11 +937,11 @@ ...@@ -937,11 +937,11 @@
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 = 10; CURRENT_PROJECT_VERSION = 3;
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";
MARKETING_VERSION = 1.8; MARKETING_VERSION = 1.9;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
<array> <array>
<string>dcv.investcustomer.vn</string> <string>dcv.investcustomer.vn</string>
</array> </array>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
......
import React, {useEffect, useRef} from 'react'; import React, {useEffect, useRef} from 'react';
import { import {View} from 'react-native';
View,
} from 'react-native';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import StackNavigation from './routers/StackNavigation'; import StackNavigation from './routers/StackNavigation';
...@@ -19,7 +17,6 @@ import KEY from './assets/AsynStorage'; ...@@ -19,7 +17,6 @@ import KEY from './assets/AsynStorage';
import I18n, {setLocation} from './helper/i18/i18n'; import I18n, {setLocation} from './helper/i18/i18n';
import {changeLanguage} from './actions/language'; import {changeLanguage} from './actions/language';
enableScreens(); enableScreens();
const RootView = (props) => { const RootView = (props) => {
...@@ -28,7 +25,7 @@ const RootView = (props) => { ...@@ -28,7 +25,7 @@ const RootView = (props) => {
dropDownAlertRef.current, dropDownAlertRef.current,
dropDownAlertLongTimeRef.current, dropDownAlertLongTimeRef.current,
); );
setInitLanguage() setInitLanguage();
}, []); }, []);
const dropDownAlertRef = useRef(null); const dropDownAlertRef = useRef(null);
...@@ -42,9 +39,9 @@ const RootView = (props) => { ...@@ -42,9 +39,9 @@ const RootView = (props) => {
<> <>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Modal isVisible={props.loadingModal.isVisible}> <Modal isVisible={props.loadingModal.isVisible}>
<SkypeIndicator color={'white'}/> <SkypeIndicator color={'white'} />
</Modal> </Modal>
<StackNavigation/> <StackNavigation />
</View> </View>
<DropdownAlert <DropdownAlert
inactiveStatusBarBackgroundColor={R.colors.main} inactiveStatusBarBackgroundColor={R.colors.main}
...@@ -54,6 +51,7 @@ const RootView = (props) => { ...@@ -54,6 +51,7 @@ const RootView = (props) => {
errorImageSrc={R.images.iconError} errorImageSrc={R.images.iconError}
titleStyle={{color: '#fff'}} titleStyle={{color: '#fff'}}
messageStyle={{color: '#fff'}} messageStyle={{color: '#fff'}}
updateStatusBar={false}
closeInterval={1000} closeInterval={1000}
ref={dropDownAlertRef} ref={dropDownAlertRef}
warnColor={R.colors.orange400} warnColor={R.colors.orange400}
...@@ -66,6 +64,7 @@ const RootView = (props) => { ...@@ -66,6 +64,7 @@ const RootView = (props) => {
}} }}
/> />
<DropdownAlert <DropdownAlert
updateStatusBar={false}
inactiveStatusBarBackgroundColor={R.colors.colorMain} inactiveStatusBarBackgroundColor={R.colors.colorMain}
activeStatusBarBackgroundColor={R.colors.colorMain} activeStatusBarBackgroundColor={R.colors.colorMain}
warnImageSrc={R.images.iconWarn} warnImageSrc={R.images.iconWarn}
...@@ -84,7 +83,7 @@ const RootView = (props) => { ...@@ -84,7 +83,7 @@ const RootView = (props) => {
paddingHorizontal: WIDTHXD(20), paddingHorizontal: WIDTHXD(20),
}} }}
/> />
<NoInternetComponent/> <NoInternetComponent />
</> </>
); );
}; };
...@@ -95,4 +94,4 @@ const mapStateToProps = (state) => { ...@@ -95,4 +94,4 @@ const mapStateToProps = (state) => {
}; };
}; };
export default connect(mapStateToProps, {changeLanguage})(RootView); export default connect(mapStateToProps, {})(RootView);
...@@ -49,14 +49,23 @@ const ConfirmOTP = (propsa) => { ...@@ -49,14 +49,23 @@ const ConfirmOTP = (propsa) => {
showAlert(TYPE.WARN, I18n.t('Notification'), I18n.t('OTPInvalid')); showAlert(TYPE.WARN, I18n.t('Notification'), I18n.t('OTPInvalid'));
} else { } else {
propsa.showLoading(); propsa.showLoading();
let res1;
const res = await verifyOTPApi({ if (propsa.route.params.type == 'DEPOSIT') {
res1 = await verifyOTPApi({
platform: Platform.OS, platform: Platform.OS,
receiver_name: propsa.user.email, receiver_name: propsa.user.email,
otp: value, otp: value,
type: 'CUSTOMER_REQUEST_DEPOSIT',
}); });
} else {
if (res.data.code == 200) { res1 = await verifyOTPApi({
platform: Platform.OS,
receiver_name: propsa.user.email,
otp: value,
type: 'CUSTOMER_REQUEST_DEPOSIT',
});
}
if (res1.data.code == 200) {
let res; let res;
if (propsa.route.params.type == 'DEPOSIT') { if (propsa.route.params.type == 'DEPOSIT') {
......
...@@ -52,6 +52,7 @@ const WalletDeposit = (props) => { ...@@ -52,6 +52,7 @@ const WalletDeposit = (props) => {
const res = await getOTPApi({ const res = await getOTPApi({
platform: Platform.OS, platform: Platform.OS,
otp_by: props.user.email, otp_by: props.user.email,
type: 'CUSTOMER_REQUEST_DEPOSIT',
}); });
props.hideLoading(); props.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
......
...@@ -92,6 +92,7 @@ const WalletWithdraw = (props) => { ...@@ -92,6 +92,7 @@ const WalletWithdraw = (props) => {
const res = await getOTPApi({ const res = await getOTPApi({
platform: Platform.OS, platform: Platform.OS,
otp_by: props.user.email, otp_by: props.user.email,
type: 'REQUEST_WITHDRAW',
}); });
props.hideLoading(); props.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
......
...@@ -51,12 +51,12 @@ const Authen = (props) => { ...@@ -51,12 +51,12 @@ const Authen = (props) => {
<Tab.Screen <Tab.Screen
name="LOGIN" name="LOGIN"
component={Login} component={Login}
options={{tabBarLabel: 'Login'}} options={{tabBarLabel: I18n.t('Login')}}
/> />
<Tab.Screen <Tab.Screen
name="REGISTOR" name="REGISTOR"
component={Registor} component={Registor}
options={{tabBarLabel: 'Register'}} options={{tabBarLabel: I18n.t('Register')}}
/> />
</Tab.Navigator> </Tab.Navigator>
</ImageBackground> </ImageBackground>
......
...@@ -30,6 +30,7 @@ const ConfirmEmail = (props) => { ...@@ -30,6 +30,7 @@ const ConfirmEmail = (props) => {
const res = await getOTPApi({ const res = await getOTPApi({
platform: Platform.OS, platform: Platform.OS,
otp_by: value, otp_by: value,
type: 'FORGOT_PASSWORD',
}); });
props.hideLoading(); props.hideLoading();
......
...@@ -52,6 +52,7 @@ const ConfirmOTP = (propsa) => { ...@@ -52,6 +52,7 @@ const ConfirmOTP = (propsa) => {
platform: Platform.OS, platform: Platform.OS,
receiver_name: propsa.route.params.email, receiver_name: propsa.route.params.email,
otp: value, otp: value,
type: 'FORGOT_PASSWORD',
}); });
propsa.hideLoading(); propsa.hideLoading();
......
...@@ -52,6 +52,7 @@ const ConfirmOTP = (propsa) => { ...@@ -52,6 +52,7 @@ const ConfirmOTP = (propsa) => {
platform: Platform.OS, platform: Platform.OS,
receiver_name: propsa.route.params.email, receiver_name: propsa.route.params.email,
otp: value, otp: value,
type: 'CUSTOMER_VERIFY',
}); });
if (res.data.code == 200) { if (res.data.code == 200) {
......
...@@ -47,6 +47,7 @@ const Registor = (props) => { ...@@ -47,6 +47,7 @@ const Registor = (props) => {
const res = await getOTPApi({ const res = await getOTPApi({
platform: Platform.OS, platform: Platform.OS,
otp_by: email, otp_by: email,
type: 'CUSTOMER_VERIFY',
}); });
props.hideLoading(); props.hideLoading();
console.log(res); console.log(res);
......
...@@ -35,7 +35,7 @@ const Profile = (props) => { ...@@ -35,7 +35,7 @@ const Profile = (props) => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
{props.user.status == 6 ? ( {props.user.status == 6 || props.user.status == 7 ? (
<View> <View>
<View style={styles.item}> <View style={styles.item}>
<AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText> <AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText>
...@@ -61,11 +61,21 @@ const Profile = (props) => { ...@@ -61,11 +61,21 @@ const Profile = (props) => {
justifyContent: 'space-between', justifyContent: 'space-between',
marginTop: 50, marginTop: 50,
}}> }}>
{props.user.status == 7 ? (
<View style={styles.btnLeft}>
<AppText
i18nKey={'WaitUpdateCQG'}
style={styles.txtBtn}></AppText>
</View>
) : (
<TouchableOpacity <TouchableOpacity
onPress={() => navigation.navigate(PACKETCQG)} onPress={() => navigation.navigate(PACKETCQG)}
style={styles.btnLeft}> style={styles.btnLeft}>
<AppText i18nKey={'UpdatePacket'} style={styles.txtBtn}></AppText> <AppText
i18nKey={'UpdatePacket'}
style={styles.txtBtn}></AppText>
</TouchableOpacity> </TouchableOpacity>
)}
<TouchableOpacity onPress={onClickCLose} style={styles.btnRight}> <TouchableOpacity onPress={onClickCLose} style={styles.btnRight}>
<AppText i18nKey={'CloseAccount'} style={styles.txtBtn}></AppText> <AppText i18nKey={'CloseAccount'} style={styles.txtBtn}></AppText>
</TouchableOpacity> </TouchableOpacity>
......
...@@ -29,22 +29,22 @@ const NewFeed = (props) => { ...@@ -29,22 +29,22 @@ const NewFeed = (props) => {
<Tab.Screen <Tab.Screen
name="PriceList" name="PriceList"
component={PriceList} component={PriceList}
options={{tabBarLabel: I18n.t('Price_List')}} options={{tabBarLabel: 'Bảng phí'}}
/> />
<Tab.Screen <Tab.Screen
name="TimeTransaction" name="TimeTransaction"
component={TimeTransaction} component={TimeTransaction}
options={{tabBarLabel: I18n.t('Time_Transaction')}} options={{tabBarLabel: 'Thời gian GD'}}
/> />
<Tab.Screen <Tab.Screen
name="Escrow" name="Escrow"
component={Escrow} component={Escrow}
options={{tabBarLabel: I18n.t('Escrow')}} options={{tabBarLabel: 'Ký quỹ'}}
/> />
<Tab.Screen <Tab.Screen
name="DueDate" name="DueDate"
component={DueDate} component={DueDate}
options={{tabBarLabel: I18n.t('Due_Date')}} options={{tabBarLabel: 'Lịch đáo hạn'}}
/> />
</Tab.Navigator> </Tab.Navigator>
</View> </View>
......
...@@ -13,7 +13,7 @@ export const registorApi = async (body) => ...@@ -13,7 +13,7 @@ export const registorApi = async (body) =>
.catch((err) => err); .catch((err) => err);
export const logoutApi = async (body) => export const logoutApi = async (body) =>
PostData('http://api.dcvinvest.com/api/auth/logout', body) PostData(urlLogout, body)
.then((res) => res) .then((res) => res)
.catch((err) => err); .catch((err) => err);
......
export const root = 'http://api.dcvinvest.com/'; export const root = 'http://api.dcvinvest.com';
export default { export default {
urllogin: root + 'api/auth/customer-login', urllogin: root + 'api/auth/customer-login',
urlRegistor: root + 'api/auth/customer-register', urlRegistor: root + 'api/auth/customer-register',
......
...@@ -51,7 +51,6 @@ const HeaderHome = (props) => { ...@@ -51,7 +51,6 @@ const HeaderHome = (props) => {
end={{x: 0, y: 1}} end={{x: 0, y: 1}}
colors={['#0062E1', '#22AEFB']}> colors={['#0062E1', '#22AEFB']}>
<StatusBar barStyle="light-content" translucent={true} /> <StatusBar barStyle="light-content" translucent={true} />
<SnackBar />
<View style={styles.container}> <View style={styles.container}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Block center row> <Block center row>
......
...@@ -29,7 +29,6 @@ const HeaderHome = (props) => { ...@@ -29,7 +29,6 @@ const HeaderHome = (props) => {
imageStyle={{resizeMode: 'stretch'}} imageStyle={{resizeMode: 'stretch'}}
style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]} style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]}
source={R.images.bgHeader}> source={R.images.bgHeader}>
<SnackBar />
<StatusBar backgroundColor="transparent" translucent={true} /> <StatusBar backgroundColor="transparent" translucent={true} />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<TouchableOpacity <TouchableOpacity
......
...@@ -34,7 +34,6 @@ const HeaderDrawer = (props) => { ...@@ -34,7 +34,6 @@ const HeaderDrawer = (props) => {
imageStyle={{resizeMode: 'stretch'}} imageStyle={{resizeMode: 'stretch'}}
style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]} style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]}
source={R.images.bgHeader}> source={R.images.bgHeader}>
<SnackBar />
<StatusBar backgroundColor="transparent" translucent={true} /> <StatusBar backgroundColor="transparent" translucent={true} />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
......
...@@ -228,9 +228,7 @@ const HeaderHome = (props) => { ...@@ -228,9 +228,7 @@ const HeaderHome = (props) => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<SnackBar />
<StatusBar backgroundColor="transparent" translucent={true} /> <StatusBar backgroundColor="transparent" translucent={true} />
<View <View
style={{ style={{
justifyContent: 'center', justifyContent: 'center',
......
...@@ -41,7 +41,6 @@ const HeaderSearch = (props) => { ...@@ -41,7 +41,6 @@ const HeaderSearch = (props) => {
style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]} style={[styles.img, isWhite ? {backgroundColor: 'white'} : {}]}
source={R.images.bgHeader}> source={R.images.bgHeader}>
<StatusBar backgroundColor="transparent" translucent={true} /> <StatusBar backgroundColor="transparent" translucent={true} />
<SnackBar />
<View style={styles.headerContainer}> <View style={styles.headerContainer}>
<TouchableOpacity <TouchableOpacity
style={{width: 35, height: 30}} style={{width: 35, height: 30}}
......
...@@ -25,7 +25,6 @@ const HeaderHome = (props) => { ...@@ -25,7 +25,6 @@ const HeaderHome = (props) => {
end={{x: 0, y: 1}} end={{x: 0, y: 1}}
colors={['#0062E1', '#22AEFB']}> colors={['#0062E1', '#22AEFB']}>
<StatusBar barStyle="light-content" translucent={true} /> <StatusBar barStyle="light-content" translucent={true} />
<SnackBar />
<View style={styles.container}> <View style={styles.container}>
{back ? ( {back ? (
<TouchableOpacity onPress={() => navigate.goBack()}> <TouchableOpacity onPress={() => navigate.goBack()}>
......
import I18n from 'react-native-i18n'; import I18n from 'react-native-i18n';
import { I18nManager } from 'react-native'; import {I18nManager} from 'react-native';
import en from './locales/en'; import en from './locales/en';
import vi from './locales/vn'; import vi from './locales/vn';
I18n.translations = { I18n.translations = {
en,
vi, vi,
en,
}; };
I18n.fallbacks = true; I18n.fallbacks = true;
export default I18n; export default I18n;
export function setLocation(i18n, location) { export function setLocation(i18n, location) {
I18nManager.allowRTL(false); I18nManager.allowRTL(false);
const defaultLanguage = { languageTag: location, isRTL: false }; const defaultLanguage = {languageTag: location, isRTL: false};
const { languageTag, isRTL } = defaultLanguage; const {languageTag, isRTL} = defaultLanguage;
i18n.locale = languageTag; i18n.locale = languageTag;
return i18n return i18n;
} }
...@@ -282,4 +282,5 @@ export default { ...@@ -282,4 +282,5 @@ export default {
Count: 'Count', Count: 'Count',
Systemmaintenance: 'The system is maintenance', Systemmaintenance: 'The system is maintenance',
WaitUpdateCQG: 'Waiting Update CQG', WaitUpdateCQG: 'Waiting Update CQG',
}; };
...@@ -268,8 +268,10 @@ export default { ...@@ -268,8 +268,10 @@ 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',
YouCanNotTransaction: 'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại', YouCanNotTransaction:
YouCanTransaction: 'Bạn có thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại', 'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại',
YouCanTransaction:
'Bạn có thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại',
EnterContractInfo: 'Nhập thông tin hợp đồng', EnterContractInfo: 'Nhập thông tin hợp đồng',
EnterFirstEscrow: 'Nhập ký quỹ ban đầu', EnterFirstEscrow: 'Nhập ký quỹ ban đầu',
......
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