Commit c0a504d5 by Giang Tran

Merge branch '05_May' into dev_phase2

parents 8608d3d4 b1275134
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
android:exported="true" android:exported="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="appdcvinvest" android:host="screen" android:pathPrefix="/"
/>
</intent-filter>
</activity> </activity>
<activity <activity
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity" android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
...@@ -43,12 +51,7 @@ ...@@ -43,12 +51,7 @@
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="dcvinvest" />
</intent-filter>
</activity> </activity>
......
<resources> <resources>
<color name="bootsplash_background">#1C6AF6</color> <color name="bootsplash_background">#1C6AF6</color>
<color name="white">#1C6AF6</color> <color name="white">#fff</color>
</resources> </resources>
...@@ -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.6; MARKETING_VERSION = 1.7;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,7 @@
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.6; MARKETING_VERSION = 1.7;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"$(inherited)", "$(inherited)",
"-ObjC", "-ObjC",
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#import <React/RCTRootView.h> #import <React/RCTRootView.h>
@import Firebase; @import Firebase;
#import <React/RCTLinkingManager.h>
#import <AVFoundation/AVFoundation.h> #import <AVFoundation/AVFoundation.h>
#import "RNBootSplash.h" #import "RNBootSplash.h"
#if DEBUG #if DEBUG
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h> #import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
//#import <CallAppSDK/CallAppInterface.h> //#import <CallAppSDK/CallAppInterface.h>
static void InitializeFlipper(UIApplication *application) { static void InitializeFlipper(UIApplication *application) {
FlipperClient *client = [FlipperClient sharedClient]; FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
...@@ -55,6 +56,33 @@ static void InitializeFlipper(UIApplication *application) { ...@@ -55,6 +56,33 @@ static void InitializeFlipper(UIApplication *application) {
return YES; return YES;
} }
#import <React/RCTLinkingManager.h>
// - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
// sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
// {
// return [RCTLinkingManager application:application openURL:url
// sourceApplication:sourceApplication annotation:annotation];
// }
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{ {
#if DEBUG #if DEBUG
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<string>dcv.investcustomer.vn. linking</string> <string>dcv.investcustomer.vn. linking</string>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>dcvinvest</string> <string>appdcvinvest</string>
</array> </array>
</dict> </dict>
</array> </array>
......
...@@ -37,6 +37,7 @@ const PacketCQG = (props) => { ...@@ -37,6 +37,7 @@ const PacketCQG = (props) => {
props.showLoading(); props.showLoading();
const res = await openCQG({packages: newList}); const res = await openCQG({packages: newList});
props.hideLoading(); props.hideLoading();
console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
props.saveUserToRedux(res.data.data); props.saveUserToRedux(res.data.data);
setTimeout(() => { setTimeout(() => {
......
...@@ -91,7 +91,7 @@ const styles = StyleSheet.create({ ...@@ -91,7 +91,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txt: { txt: {
fontSize: getFontXD(36), fontSize: getFontXD(36),
......
...@@ -81,7 +81,7 @@ const styles = StyleSheet.create({ ...@@ -81,7 +81,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -6,6 +6,11 @@ import { ...@@ -6,6 +6,11 @@ import {
Dimensions, Dimensions,
TouchableOpacity, TouchableOpacity,
Alert, Alert,
TouchableWithoutFeedback,
Keyboard,
KeyboardAvoidingView,
Platform,
ScrollView,
} from 'react-native'; } from 'react-native';
import R from '../../../assets/R'; import R from '../../../assets/R';
import HeaderBack from '../../../components/Header/HeaderBack'; import HeaderBack from '../../../components/Header/HeaderBack';
...@@ -32,7 +37,10 @@ const WalletDeposit = (props) => { ...@@ -32,7 +37,10 @@ const WalletDeposit = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
const onClick = async () => { const onClick = async () => {
const titles = [I18n.t('AmountOfMoney').toLowerCase(), I18n.t('Note').toLowerCase()]; const titles = [
I18n.t('AmountOfMoney').toLowerCase(),
I18n.t('Note').toLowerCase(),
];
const index = checkFormatArray([amount, notes]); const index = checkFormatArray([amount, notes]);
if (index === true) { if (index === true) {
...@@ -63,45 +71,64 @@ const WalletDeposit = (props) => { ...@@ -63,45 +71,64 @@ const WalletDeposit = (props) => {
} }
}; };
return ( return (
<View style={{flex: 1}}> <KeyboardAvoidingView
<HeaderBack title={'InvestmentDeposit'} /> behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
<View style={styles.container}> style={{flex: 1, backgroundColor: 'white'}}
<View style={styles.wrapTop}> keyboardVerticalOffset={-50}>
<View style={styles.itemTop}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<Text style={styles.txtTitle}>{I18n.t('Wallet')}</Text> <View style={{flex: 1}}>
<Text style={styles.txtMoney}> <HeaderBack title={'InvestmentDeposit'} />
{' '} <ScrollView showsVerticalScrollIndicator={false}>
{props.user.current_money != 0 <View style={styles.container}>
? toPriceVnd(props.user.current_money) <View style={styles.wrapTop}>
: 0}{' '} <View style={styles.itemTop}>
</Text> <Text style={styles.txtTitle}>{I18n.t('Wallet')}</Text>
<Text style={styles.txtMoney}>
{' '}
{props.user.current_money != 0
? toPriceVnd(props.user.current_money)
: 0}{' '}
</Text>
</View>
<View style={{width: 1, backgroundColor: '#DBDBDB'}} />
<View style={styles.itemTop}>
<Text style={styles.txtTitle}>CQG</Text>
<Text style={styles.txtMoney}>
{' '}
{props.user.current_cqg_money != 0
? toPriceVnd(props.user.current_cqg_money)
: 0}{' '}
đ
</Text>
</View>
</View>
<View style={styles.wrapBody}>
{/* <TextDisable value={'10010101'} title={'Số tài khoản CQG'} /> */}
<TextMoney
onChangeText={(val) => setAmount(val)}
title={I18n.t('AmountOfMoney')}
value={amount}
/>
<TextMulti
onChangeText={(val) => setNotes(val)}
title={I18n.t('Note')}
/>
</View>
</View>
</ScrollView>
<View
style={{
paddingVertical: 10,
justifyContent: 'center',
alignItems: 'center',
}}>
<TouchableOpacity onPress={onClick} style={styles.btnSend}>
<Text style={styles.txtSend}>{I18n.t('Deposit')}</Text>
</TouchableOpacity>
</View> </View>
<View style={{width: 1, backgroundColor: '#DBDBDB'}} />
<View style={styles.itemTop}>
<Text style={styles.txtTitle}>CQG</Text>
<Text style={styles.txtMoney}>
{' '}
{props.user.current_cqg_money != 0
? toPriceVnd(props.user.current_cqg_money)
: 0}{' '}
đ
</Text>
</View>
</View>
<View style={styles.wrapBody}>
{/* <TextDisable value={'10010101'} title={'Số tài khoản CQG'} /> */}
<TextMoney
onChangeText={(val) => setAmount(val)}
title={I18n.t('AmountOfMoney')}
value={amount}
/>
<TextMulti onChangeText={(val) => setNotes(val)} title={I18n.t('Note')} />
</View> </View>
</View> </TouchableWithoutFeedback>
<TouchableOpacity onPress={onClick} style={styles.btnSend}> </KeyboardAvoidingView>
<Text style={styles.txtSend}>{I18n.t('Deposit')}</Text>
</TouchableOpacity>
</View>
); );
}; };
...@@ -147,9 +174,6 @@ const styles = StyleSheet.create({ ...@@ -147,9 +174,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold', fontWeight: 'bold',
}, },
btnSend: { btnSend: {
position: 'absolute',
bottom: 30,
right: width / 2 - 70,
width: 140, width: 140,
height: 40, height: 40,
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
......
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
TouchableWithoutFeedback, TouchableWithoutFeedback,
Keyboard, Keyboard,
KeyboardAvoidingView, KeyboardAvoidingView,
ScrollView,
} from 'react-native'; } from 'react-native';
import R from '../../../assets/R'; import R from '../../../assets/R';
import HeaderBack from '../../../components/Header/HeaderBack'; import HeaderBack from '../../../components/Header/HeaderBack';
...@@ -61,9 +62,8 @@ const WalletWithdraw = (props) => { ...@@ -61,9 +62,8 @@ const WalletWithdraw = (props) => {
}); });
if (res.data.code == 200 && res.data.data) { if (res.data.code == 200 && res.data.data) {
if (res.data.data.length == 0) { if (res.data.data.length == 0) {
confirmAlert( confirmAlert(I18n.t('SettingPaymentMethodConfirm'), () =>
I18n.t('SettingPaymentMethodConfirm'), navigate.navigate(ADDMETHODPAY),
() => navigate.navigate(ADDMETHODPAY),
); );
} else { } else {
const newList = res.data.data.map((e) => { const newList = res.data.data.map((e) => {
...@@ -77,7 +77,10 @@ const WalletWithdraw = (props) => { ...@@ -77,7 +77,10 @@ const WalletWithdraw = (props) => {
}; };
const onPressWithdraw = async () => { const onPressWithdraw = async () => {
const titles = [I18n.t('BeneficiaryAccount'), I18n.t('AmountOfMoney').toLowerCase()]; const titles = [
I18n.t('BeneficiaryAccount'),
I18n.t('AmountOfMoney').toLowerCase(),
];
const index = checkFormatArray([type, amount]); const index = checkFormatArray([type, amount]);
...@@ -120,78 +123,87 @@ const WalletWithdraw = (props) => { ...@@ -120,78 +123,87 @@ const WalletWithdraw = (props) => {
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> <TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Withdraw'} /> <HeaderBack title={'Withdraw'} />
<View style={styles.container}> <ScrollView showsVerticalScrollIndicator={false}>
<View style={styles.wrapTop}> <View style={styles.container}>
<View style={styles.itemTop}> <View style={styles.wrapTop}>
<Text style={styles.txtTitle}>{I18n.t('Wallet')}</Text> <View style={styles.itemTop}>
<Text style={styles.txtMoney}> <Text style={styles.txtTitle}>{I18n.t('Wallet')}</Text>
{' '} <Text style={styles.txtMoney}>
{props.user.current_money != 0 {' '}
? toPriceVnd(props.user.current_money) {props.user.current_money != 0
: 0}{' '} ? toPriceVnd(props.user.current_money)
</Text> : 0}{' '}
</View> </Text>
</View>
<View style={{width: 1, backgroundColor: '#DBDBDB'}} /> <View style={{width: 1, backgroundColor: '#DBDBDB'}} />
<View style={styles.itemTop}> <View style={styles.itemTop}>
<Text style={styles.txtTitle}>CQG</Text> <Text style={styles.txtTitle}>CQG</Text>
<Text style={styles.txtMoney}> <Text style={styles.txtMoney}>
{props.user.current_cqg_money != 0 {props.user.current_cqg_money != 0
? toPriceVnd(props.user.current_cqg_money) ? toPriceVnd(props.user.current_cqg_money)
: 0}{' '} : 0}{' '}
đ đ
</Text>
</View>
</View>
<View style={styles.wrapBody}>
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
}}>
{I18n.t('SourceAccount')}
</Text> </Text>
{/* <View style={styles.row}> */}
<RadioForm
radio_props={radio_props}
labelStyle={{fontSize: getFontXD(42)}}
formHorizontal={true}
style={styles.row}
initial={0}
onPress={(value) => {
setSrc(value);
}}
/>
{/* </View> */}
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
}}>
{I18n.t('ChooseBeneficiaryAccount')}
</Text>
<PickerItem
width={width - 20}
data={data}
onValueChange={(value, items) => {
setType(items);
}}
/>
<TextMoney
onChangeText={(val) => setAmount(val)}
title={I18n.t('AmountOfMoney')}
value={amount}
/>
<TextMulti
onChangeText={(val) => setNotes(val)}
title={I18n.t('Note')}
/>
</View> </View>
</View> </View>
<View style={styles.wrapBody}> </ScrollView>
<Text <View
style={{ style={{
fontSize: getFontXD(42), paddingVertical: 10,
color: R.colors.color777, justifyContent: 'center',
}}> alignItems: 'center',
{I18n.t('SourceAccount')} }}>
</Text> <TouchableOpacity onPress={onPressWithdraw} style={styles.btnSend}>
{/* <View style={styles.row}> */} <Text style={styles.txtSend}>{I18n.t('Withdraw')}</Text>
<RadioForm </TouchableOpacity>
radio_props={radio_props}
labelStyle={{fontSize: getFontXD(42)}}
formHorizontal={true}
style={styles.row}
initial={0}
onPress={(value) => {
setSrc(value);
}}
/>
{/* </View> */}
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
}}>
{I18n.t('ChooseBeneficiaryAccount')}
</Text>
<PickerItem
width={width - 20}
data={data}
onValueChange={(value, items) => {
setType(items);
}}
/>
<TextMoney
onChangeText={(val) => setAmount(val)}
title={I18n.t('AmountOfMoney')}
value={amount}
/>
<TextMulti
onChangeText={(val) => setNotes(val)}
title={I18n.t('Note')}
/>
</View>
</View> </View>
<TouchableOpacity onPress={onPressWithdraw} style={styles.btnSend}>
<Text style={styles.txtSend}>{I18n.t('Withdraw')}</Text>
</TouchableOpacity>
</View> </View>
</TouchableWithoutFeedback> </TouchableWithoutFeedback>
</KeyboardAvoidingView> </KeyboardAvoidingView>
...@@ -240,9 +252,6 @@ const styles = StyleSheet.create({ ...@@ -240,9 +252,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold', fontWeight: 'bold',
}, },
btnSend: { btnSend: {
position: 'absolute',
bottom: 30,
right: width / 2 - 70,
width: 140, width: 140,
height: 40, height: 40,
backgroundColor: R.colors.main, backgroundColor: R.colors.main,
......
...@@ -62,7 +62,10 @@ const Login = (props) => { ...@@ -62,7 +62,10 @@ const Login = (props) => {
}; };
const onSubmitLogin = async (email, pass) => { const onSubmitLogin = async (email, pass) => {
const titles = [I18n.t('Username').toLowerCase(), I18n.t('Password').toLowerCase()]; const titles = [
I18n.t('Username').toLowerCase(),
I18n.t('Password').toLowerCase(),
];
const index = checkFormatArray([email, pass]); const index = checkFormatArray([email, pass]);
if (index === true) { if (index === true) {
...@@ -110,14 +113,12 @@ const Login = (props) => { ...@@ -110,14 +113,12 @@ const Login = (props) => {
<InputIcon <InputIcon
icon={R.images.iconUser3} icon={R.images.iconUser3}
title={'Email'} title={'Email'}
placeholder={I18n.t('EnterEmail')}
onChangeText={(val) => setEmail(val)} onChangeText={(val) => setEmail(val)}
value={email} value={email}
/> />
<InputIcon <InputIcon
icon={R.images.iconLock} icon={R.images.iconLock}
title={'Password'} title={'Password'}
placeholder={I18n.t('EnterPassword')}
isPassWord={true} isPassWord={true}
onChangeText={(val) => setPass(val)} onChangeText={(val) => setPass(val)}
value={pass} value={pass}
......
import React, {Component, useEffect, useState} from 'react';
import {
View,
Text,
TextInput,
StyleSheet,
TouchableOpacity,
Platform,
Alert,
} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
import {
CodeField,
Cursor,
useBlurOnFulfill,
useClearByFocusCell,
} from 'react-native-confirmation-code-field';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../Config/Functions';
import R from '../../assets/R';
import {NEWPASSWORD} from '../../routers/ScreenNames';
import {verifyOTPApi, registorApi} from '../../apis/Functions/users';
import {useNavigation} from '@react-navigation/native';
import I18n from '../../helper/i18/i18n';
import AppText from '../../components/AppText';
import {showLoading, hideLoading} from '../../actions/loadingAction';
import {connect} from 'react-redux';
const CELL_COUNT = 4;
const ConfirmOTP = (propsa) => {
const [value, setValue] = useState('');
const navigate = useNavigation();
const ref = useBlurOnFulfill({value, cellCount: CELL_COUNT});
const [props, getCellOnLayoutHandler] = useClearByFocusCell({
value,
setValue,
});
const confirm = async () => {
if (!value) {
Alert.alert(I18n.t('Notification'), I18n.t('EnterOTPRequest'));
} else if (value.length != 4) {
Alert.alert(I18n.t('Notification'), I18n.t('OTPInvalid'));
} else {
propsa.showLoading();
const res = await verifyOTPApi({
platform: Platform.OS,
receiver_name: propsa.route.params.email,
otp: value,
});
if (res.data.code == 200) {
const {
email,
password,
password_confirmation,
phone,
sponsor_id,
} = propsa.route.params;
let res;
if (sponsor_id) {
res = await registorApi({
email,
password,
platform: Platform.OS,
password_confirmation,
sponsor_id,
phone,
});
} else {
res = await registorApi({
email,
password,
platform: Platform.OS,
password_confirmation,
phone,
});
}
propsa.hideLoading();
if (res.data.code == 200 && res.data.data) {
setTimeout(() => {
Alert.alert(
I18n.t('Notification'),
I18n.t('RegisterAccountSuccess'),
);
navigate.navigate('LOGIN');
}, 500);
} else {
setTimeout(() => {
Alert.alert(I18n.t('Notification'), res.data.message);
}, 500);
}
} else {
setTimeout(() => {
Alert.alert(I18n.t('Notification'), res.data.message);
}, 500);
}
propsa.hideLoading();
}
};
return (
<View style={{flex: 1}}>
<HeaderBack title={'VerifyOTP'} />
<View style={styles.container}>
<View style={{height: 20}} />
<View style={styles.wrap}>
<AppText i18nKey={'Verify_code'} style={styles.txtTitle} />
<View style={styles.containerCode}>
<CodeField
ref={ref}
{...props}
value={value}
onChangeText={setValue}
cellCount={CELL_COUNT}
rootStyle={styles.codeFieldRoot}
keyboardType="number-pad"
textContentType="oneTimeCode"
renderCell={({index, symbol, isFocused}) => (
<View
onLayout={getCellOnLayoutHandler(index)}
key={index}
style={[styles.cellRoot, isFocused && styles.focusCell]}>
<Text style={styles.cellText}>
{symbol || (isFocused ? <Cursor /> : null)}
</Text>
</View>
)}
/>
</View>
</View>
</View>
<View style={styles.footer}>
<TouchableOpacity onPress={confirm} style={styles.btn}>
<AppText i18nKey={'Continue'} style={styles.txtBtn} />
</TouchableOpacity>
<TouchableOpacity
style={styles.wrapFooter}
onPress={() => navigate.goBack()}>
<Text style={styles.txtNote}>{I18n.t('OTPValidFiveMinute')}</Text>
<AppText i18nKey={'Re_send'} style={styles.txtSend} />
</TouchableOpacity>
</View>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
paddingVertical: 20,
},
footer: {
height: 200,
justifyContent: 'center',
alignItems: 'center',
},
wrap: {
flex: 1,
paddingTop: 30,
alignItems: 'center',
width: '100%',
paddingHorizontal: 50,
},
containerCode: {
height: 50,
width: '100%',
marginTop: 30,
},
codeFieldRoot: {
marginTop: 20,
},
focusCell: {
borderColor: '#000',
},
cellRoot: {
width: 40,
height: 40,
justifyContent: 'center',
alignItems: 'center',
borderBottomColor: '#ccc',
borderBottomWidth: 1,
},
cellText: {
color: '#000',
fontSize: 36,
textAlign: 'center',
},
focusCell: {
borderBottomColor: '#007AFF',
borderBottomWidth: 2,
},
txtTitle: {
fontSize: getFontXD(52),
color: '#979797',
},
btn: {
width: WIDTHXD(521),
height: HEIGHTXD(120),
borderRadius: 15,
backgroundColor: '#1C6AF6',
justifyContent: 'center',
alignItems: 'center',
},
txtBtn: {
color: R.colors.white,
fontSize: getFontXD(52),
textTransform: 'uppercase',
},
txtSend: {
fontSize: getFontXD(42),
color: '#1C6AF6',
},
wrapFooter: {
marginTop: 30,
flexDirection: 'row',
alignItems: 'center',
},
txtNote: {
color: '#A2A2A2',
fontSize: getFontXD(42),
fontStyle: 'italic',
},
});
const mapStateToProps = (state) => {
return {};
};
export default connect(mapStateToProps, {showLoading, hideLoading})(ConfirmOTP);
...@@ -13,9 +13,10 @@ import R from '../../assets/R'; ...@@ -13,9 +13,10 @@ import R from '../../assets/R';
import {checkFormatArray} from '../../Config/Functions'; import {checkFormatArray} from '../../Config/Functions';
import {showLoading, hideLoading} from '../../actions/loadingAction'; import {showLoading, hideLoading} from '../../actions/loadingAction';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {registorApi} from '../../apis/Functions/users'; import {registorApi, getOTPApi} from '../../apis/Functions/users';
import I18n from '../../helper/i18/i18n'; import I18n from '../../helper/i18/i18n';
import AppText from '../../components/AppText'; import AppText from '../../components/AppText';
import {REGISTEROTP} from '../../routers/ScreenNames';
const Registor = (props) => { const Registor = (props) => {
const {navigation} = props; const {navigation} = props;
...@@ -41,34 +42,21 @@ const Registor = (props) => { ...@@ -41,34 +42,21 @@ const Registor = (props) => {
]); ]);
if (index === true) { if (index === true) {
let res;
props.showLoading(); props.showLoading();
if (sponsor_id) { const res = await getOTPApi({
res = await registorApi({ platform: Platform.OS,
email, otp_by: email,
password, });
platform: Platform.OS, props.hideLoading();
password_confirmation, console.log(res);
sponsor_id, if (res.data.code == 200) {
phone, navigation.navigate(REGISTEROTP, {
});
} else {
res = await registorApi({
email, email,
password, password,
platform: Platform.OS,
password_confirmation, password_confirmation,
phone, phone,
sponsor_id,
}); });
}
props.hideLoading();
if (res.data.code == 200 && res.data.data) {
setTimeout(() => {
Alert.alert(I18n.t('Notification'), I18n.t('RegisterAccountSuccess'));
navigation.navigate('LOGIN');
}, 500);
} else { } else {
setTimeout(() => { setTimeout(() => {
Alert.alert(I18n.t('Notification'), res.data.message); Alert.alert(I18n.t('Notification'), res.data.message);
...@@ -93,35 +81,30 @@ const Registor = (props) => { ...@@ -93,35 +81,30 @@ const Registor = (props) => {
<InputIcon <InputIcon
icon={R.images.iconEmail} icon={R.images.iconEmail}
title={'Email'} title={'Email'}
placeholder={I18n.t('EnterEmail')}
onChangeText={(val) => setEmail(val)} onChangeText={(val) => setEmail(val)}
/> />
<InputIcon <InputIcon
icon={R.images.iconLock} icon={R.images.iconLock}
title={'Password'} title={'Password'}
placeholder={I18n.t('EnterPassword')}
onChangeText={(val) => setPassword(val)} onChangeText={(val) => setPassword(val)}
isPassWord={true} isPassWord={true}
/> />
<InputIcon <InputIcon
icon={R.images.iconLock} icon={R.images.iconLock}
title={'Confirm_pass'} title={'Confirm_pass'}
placeholder={I18n.t('EnterPassword')}
onChangeText={(val) => setPasswordConfirm(val)} onChangeText={(val) => setPasswordConfirm(val)}
isPassWord={true} isPassWord={true}
/> />
<InputIcon <InputIcon
icon={R.images.iconPhone3} icon={R.images.iconPhone3}
title={'Phone'} title={'Phone'}
placeholder={I18n.t('Enter_Phone')}
onChangeText={(val) => setPhone(val)} onChangeText={(val) => setPhone(val)}
isNumber={true} isNumber={true}
/> />
<InputIcon <InputIcon
icon={R.images.iconIntroduct} icon={R.images.iconIntroduct}
title={'Code_introduce'} title={'Code_introduce'}
placeholder={I18n.t('EnterReferralCode')}
onChangeText={(val) => setSponsor_id(val)} onChangeText={(val) => setSponsor_id(val)}
/> />
......
...@@ -38,7 +38,9 @@ const Item = (props) => { ...@@ -38,7 +38,9 @@ const Item = (props) => {
<Text numberOfLines={1} style={styles.txtTitle}> <Text numberOfLines={1} style={styles.txtTitle}>
{item.note} {item.note}
</Text> </Text>
<Text style={styles.txtDate}>`${I18n.t('Date')} ${item.date}`</Text> <Text style={styles.txtDate}>
`${I18n.t('Date')} ${item.date}`
</Text>
</Block> </Block>
</Block> </Block>
</View> </View>
...@@ -76,7 +78,7 @@ const styles = StyleSheet.create({ ...@@ -76,7 +78,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(48), fontSize: getFontXD(48),
......
...@@ -89,7 +89,7 @@ const styles = StyleSheet.create({ ...@@ -89,7 +89,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txt: { txt: {
fontSize: getFontXD(36), fontSize: getFontXD(36),
......
...@@ -9,22 +9,31 @@ import I18n from '../../../../helper/i18/i18n'; ...@@ -9,22 +9,31 @@ import I18n from '../../../../helper/i18/i18n';
const Profile = (props) => { const Profile = (props) => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.item}> {props.user.status == 3 ? (
<AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText> <View>
<Text style={styles.txtBig}>{props.user.cqg_id}</Text> {' '}
</View> <View style={styles.item}>
<View style={styles.item}> <AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText>
<AppText <Text style={styles.txtBig}>{props.user.cqg_id}</Text>
i18nKey={'TraddingAccountName'} </View>
style={styles.txtTitle}></AppText> <View style={styles.item}>
<Text style={styles.txtBig}>{props.user.cqg_name}</Text> <AppText
</View> i18nKey={'TraddingAccountName'}
<View style={styles.item}> style={styles.txtTitle}></AppText>
<AppText <Text style={styles.txtBig}>{props.user.cqg_name}</Text>
i18nKey={'TraddingAccountNumber'} </View>
style={styles.txtTitle}></AppText> <View style={styles.item}>
<Text style={styles.txtBig}>{props.user.account}</Text> <AppText
</View> i18nKey={'TraddingAccountNumber'}
style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.account}</Text>
</View>
</View>
) : (
<View>
<Text>Hello</Text>
</View>
)}
</View> </View>
); );
}; };
......
...@@ -37,7 +37,9 @@ const Item = (props) => { ...@@ -37,7 +37,9 @@ const Item = (props) => {
{item.note} {item.note}
</Text> </Text>
</View> </View>
<Text style={styles.txtDate}>`${I18n.t('Date')} ${item.date}`</Text> <Text style={styles.txtDate}>
`${I18n.t('Date')} ${item.date}`
</Text>
</View> </View>
<View> <View>
<Text <Text
...@@ -86,7 +88,7 @@ const styles = StyleSheet.create({ ...@@ -86,7 +88,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -13,12 +13,6 @@ const Rose = (props) => { ...@@ -13,12 +13,6 @@ const Rose = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderSB title={'Rose'} /> <HeaderSB title={'Rose'} />
<TouchableOpacity onPress={() => props.changeLanguage('en')}>
<Text>Change</Text>
</TouchableOpacity>
<AppText i18nKey={'SetLanguage'}></AppText>
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}> <View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<AppText <AppText
i18nKey={'Features_develop'} i18nKey={'Features_develop'}
......
...@@ -20,9 +20,9 @@ const Item = (props) => { ...@@ -20,9 +20,9 @@ const Item = (props) => {
<Text style={styles.txtBig}>{item.title}</Text> <Text style={styles.txtBig}>{item.title}</Text>
<Block space={'between'} row flex={1}> <Block space={'between'} row flex={1}>
<Block> <Block>
<AppText style={styles.txtLeft} i18nKey={('OwnerAccount')}/> <AppText style={styles.txtLeft} i18nKey={'OwnerAccount'} />
<Text style={styles.txtLeft}>STK</Text> <Text style={styles.txtLeft}>STK</Text>
<AppText style={styles.txtLeft} i18nKey={('Branch')}/> <AppText style={styles.txtLeft} i18nKey={'Branch'} />
</Block> </Block>
<Block> <Block>
<Text style={styles.txtRight}>{item.account_name}</Text> <Text style={styles.txtRight}>{item.account_name}</Text>
...@@ -64,7 +64,7 @@ const styles = StyleSheet.create({ ...@@ -64,7 +64,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
import React from 'react'; import React from 'react';
import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native'; import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native';
import {getFontXD, HEIGHTXD, WIDTHXD, toPriceVnd, getWidth} from '../../Config/Functions'; import {
getFontXD,
HEIGHTXD,
WIDTHXD,
toPriceVnd,
getWidth,
} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
import Block from '../../components/Block'; import Block from '../../components/Block';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
...@@ -10,7 +16,11 @@ const Item = (props) => { ...@@ -10,7 +16,11 @@ const Item = (props) => {
const {item} = props; const {item} = props;
return ( return (
<TouchableOpacity onPress={() => props.onPress(item)}> <TouchableOpacity onPress={() => props.onPress(item)}>
<View style={[styles.container, {marginBottom: props.isEndItem ? HEIGHTXD(100) : HEIGHTXD(15)}]}> <View
style={[
styles.container,
{marginBottom: props.isEndItem ? HEIGHTXD(100) : HEIGHTXD(15)},
]}>
<Block flex={1} row center padding={[HEIGHTXD(10), WIDTHXD(10)]}> <Block flex={1} row center padding={[HEIGHTXD(10), WIDTHXD(10)]}>
<Image source={{uri: item.logo}} style={styles.imgIcon} /> <Image source={{uri: item.logo}} style={styles.imgIcon} />
<Block padding={[0, 10]}> <Block padding={[0, 10]}>
...@@ -55,7 +65,7 @@ const styles = StyleSheet.create({ ...@@ -55,7 +65,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -59,7 +59,7 @@ const styles = StyleSheet.create({ ...@@ -59,7 +59,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -22,7 +22,6 @@ const Item = (props) => { ...@@ -22,7 +22,6 @@ const Item = (props) => {
<View style={styles.container}> <View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}> <TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row> <Block flex={1} row>
<View style={styles.wrapLeft} />
<View style={styles.wrapDate}> <View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} /> <Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View> </View>
...@@ -74,7 +73,7 @@ const styles = StyleSheet.create({ ...@@ -74,7 +73,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -72,7 +72,7 @@ const styles = StyleSheet.create({ ...@@ -72,7 +72,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -72,7 +72,7 @@ const styles = StyleSheet.create({ ...@@ -72,7 +72,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -22,7 +22,6 @@ const Item = (props) => { ...@@ -22,7 +22,6 @@ const Item = (props) => {
<View style={styles.container}> <View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}> <TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row> <Block flex={1} row>
<View style={styles.wrapLeft} />
<View style={styles.wrapDate}> <View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} /> <Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View> </View>
...@@ -74,7 +73,7 @@ const styles = StyleSheet.create({ ...@@ -74,7 +73,7 @@ const styles = StyleSheet.create({
}, },
wrapDate: { wrapDate: {
justifyContent: 'center', justifyContent: 'center',
paddingHorizontal: 10, paddingLeft: 10,
}, },
txtTitle: { txtTitle: {
fontSize: getFontXD(42), fontSize: getFontXD(42),
......
...@@ -106,6 +106,14 @@ const menus = [ ...@@ -106,6 +106,14 @@ const menus = [
icon: R.images.iconHistoryMenu, icon: R.images.iconHistoryMenu,
screen: HISTORY, screen: HISTORY,
}, },
{
id: '65',
title: 'PaymentSetting',
icon: R.images.iconMethodPay,
screen: METHODPAY,
active: false,
children: null,
},
], ],
}, },
{ {
...@@ -137,14 +145,6 @@ const menus = [ ...@@ -137,14 +145,6 @@ const menus = [
}, },
{ {
id: '2',
title: 'PaymentSetting',
icon: R.images.iconMethodPay,
screen: METHODPAY,
active: false,
children: null,
},
{
id: '5', id: '5',
title: 'Setting', title: 'Setting',
icon: R.images.iconSetting, icon: R.images.iconSetting,
...@@ -289,7 +289,7 @@ const styles = StyleSheet.create({ ...@@ -289,7 +289,7 @@ const styles = StyleSheet.create({
color: '#0C0D2C', color: '#0C0D2C',
}, },
txtTop: { txtTop: {
fontSize: getFontXD(42), fontSize: getFontXD(38),
color: '#1E2F70', color: '#1E2F70',
}, },
txtLink: { txtLink: {
......
...@@ -16,7 +16,6 @@ import R from '../../assets/R'; ...@@ -16,7 +16,6 @@ import R from '../../assets/R';
import {getFontXD, HEIGHT, WIDTHXD} from '../../Config/Functions'; import {getFontXD, HEIGHT, WIDTHXD} from '../../Config/Functions';
import LinearGradient from 'react-native-linear-gradient'; import LinearGradient from 'react-native-linear-gradient';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {HEIGHTXD} from '../../Config/Functions';
import Modal from 'react-native-modal'; import Modal from 'react-native-modal';
import Drawer from './Drawer'; import Drawer from './Drawer';
import SnackBar from '../SnackBar'; import SnackBar from '../SnackBar';
...@@ -108,7 +107,7 @@ const styles = StyleSheet.create({ ...@@ -108,7 +107,7 @@ const styles = StyleSheet.create({
container: { container: {
backgroundColor: 'white', backgroundColor: 'white',
height: '100%', height: '100%',
width: 300, width: WIDTHXD(780),
borderRadius: 20, borderRadius: 20,
}, },
}); });
...@@ -196,7 +196,6 @@ const HeaderHome = (props) => { ...@@ -196,7 +196,6 @@ const HeaderHome = (props) => {
/> />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
{renderLabel(props.user.status)}
</View> </View>
</View> </View>
...@@ -252,7 +251,7 @@ export default connect(mapStateToProps, {})(HeaderHome); ...@@ -252,7 +251,7 @@ export default connect(mapStateToProps, {})(HeaderHome);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: {}, container: {},
wrapWallet: { wrapWallet: {
height: 80, height: 70,
width: '100%', width: '100%',
borderBottomWidth: 1, borderBottomWidth: 1,
borderBottomColor: '#EDEDF1', borderBottomColor: '#EDEDF1',
...@@ -266,7 +265,6 @@ const styles = StyleSheet.create({ ...@@ -266,7 +265,6 @@ const styles = StyleSheet.create({
}, },
containerTop: { containerTop: {
backgroundColor: 'white', backgroundColor: 'white',
height: 290,
width: '90%', width: '90%',
borderRadius: 10, borderRadius: 10,
shadowColor: '#000', shadowColor: '#000',
...@@ -296,8 +294,8 @@ const styles = StyleSheet.create({ ...@@ -296,8 +294,8 @@ const styles = StyleSheet.create({
resizeMode: 'contain', resizeMode: 'contain',
}, },
imgIconCopy: { imgIconCopy: {
width: WIDTHXD(134), width: WIDTHXD(100),
height: HEIGHTXD(134), height: HEIGHTXD(100),
resizeMode: 'contain', resizeMode: 'contain',
}, },
...@@ -319,9 +317,9 @@ const styles = StyleSheet.create({ ...@@ -319,9 +317,9 @@ const styles = StyleSheet.create({
color: '#A2A2A2', color: '#A2A2A2',
}, },
imgAvatar: { imgAvatar: {
width: WIDTHXD(240), width: WIDTHXD(180),
height: WIDTHXD(240), height: WIDTHXD(180),
borderRadius: WIDTHXD(120), borderRadius: WIDTHXD(90),
}, },
txtMoney: { txtMoney: {
fontSize: getFontXD(62), fontSize: getFontXD(62),
...@@ -338,7 +336,7 @@ const styles = StyleSheet.create({ ...@@ -338,7 +336,7 @@ const styles = StyleSheet.create({
}, },
wrapRight: { wrapRight: {
flex: 1, flex: 1,
paddingHorizontal: 20, paddingLeft: 10,
}, },
containerInfor: { containerInfor: {
flex: 1, flex: 1,
...@@ -348,6 +346,8 @@ const styles = StyleSheet.create({ ...@@ -348,6 +346,8 @@ const styles = StyleSheet.create({
borderBottomColor: '#EDEDF1', borderBottomColor: '#EDEDF1',
flexDirection: 'row', flexDirection: 'row',
paddingHorizontal: 20, paddingHorizontal: 20,
paddingVertical: 10,
}, },
row: { row: {
flexDirection: 'row', flexDirection: 'row',
...@@ -358,6 +358,7 @@ const styles = StyleSheet.create({ ...@@ -358,6 +358,7 @@ const styles = StyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
marginTop: 5,
}, },
containerWallet: { containerWallet: {
justifyContent: 'center', justifyContent: 'center',
......
export default { export default {
greeting: 'Hi!', greeting: 'Hi!',
home: 'Home', home: 'Home',
contact: 'Contact', contact: 'Contact',
setting: 'Setting', setting: 'Setting',
SetLanguage: ' Set language', SetLanguage: ' Set language',
MyProfile: 'My Profile', MyProfile: 'My Profile',
VerifyAccount: 'Verify account', VerifyAccount: 'Verify account',
Payments: 'Payments', Payments: 'Payments',
Rose: 'Rose', Rose: 'Rose',
TeamBonus: 'Team bonus', TeamBonus: 'Team bonus',
MyPartner: 'My partner', MyPartner: 'My partner',
Account: 'Account', Account: 'Account',
Notification: 'Notification', Notification: 'Notification',
News: 'News', News: 'News',
Deposit: 'Deposit', Deposit: 'Deposit',
Withdraw: 'Withdraw', Withdraw: 'Withdraw',
Transfer: 'Transfer', Transfer: 'Transfer',
History: 'History', History: 'History',
NotVerified: 'Not verified', NotVerified: 'Not verified',
Verified: 'Verified', Verified: 'Verified',
WaitVerification: 'Waiting verification', WaitVerification: 'Waiting verification',
AccountWallet: 'Account wallet', AccountWallet: 'Account wallet',
Wallet: 'Wallet', Wallet: 'Wallet',
AccountCQG: 'Account CQG', AccountCQG: 'Account CQG',
WaitOpenCQG: 'Wait open CQG', WaitOpenCQG: 'Wait open CQG',
OpenAccountCQG: 'Open account CQG', OpenAccountCQG: 'Open account CQG',
AccountVerify: 'Account verify', AccountVerify: 'Account verify',
Profit: 'Profit', Profit: 'Profit',
RevenueTeam: 'Revenue team', RevenueTeam: 'Revenue team',
RevenueDonors: 'Revenue donors', RevenueDonors: 'Revenue donors',
Invset: 'Invest', Invset: 'Invest',
Contract: 'Contract', Contract: 'Contract',
PaymentSetting: 'Payment method setting', PaymentSetting: 'Method setting',
CustomerCare: 'Customer care', CustomerCare: 'Customer care',
Feedback: 'Feedback', Feedback: 'Feedback',
LegalDocument: 'Legal document', LegalDocument: 'Legal document',
Setting: 'Setting', Setting: 'Setting',
Logout: 'Logout', Logout: 'Logout',
SelectPaymentMethod: 'Select Payment Method', SelectPaymentMethod: 'Select Payment Method',
InvestmentDeposit: 'Investment deposit', InvestmentDeposit: 'Investment deposit',
ForgotPassword: 'Forgot password', ForgotPassword: 'Forgot password',
VerifyOTP: 'Verify OTP', VerifyOTP: 'Verify OTP',
ChangeNewPassword: 'Change new password', ChangeNewPassword: 'Change new password',
SendFeedback: 'Send feedback', SendFeedback: 'Send feedback',
GeneralBusiness: 'General business', GeneralBusiness: 'General business',
Customer: 'Customer', Customer: 'Customer',
Partnership: 'Partnership', Partnership: 'Partnership',
AddPaymentMethod: 'Add payment method', AddPaymentMethod: 'Add payment method',
DetailMethod: 'Detail method', DetailMethod: 'Detail method',
Detail: 'Detail', Detail: 'Detail',
DetailVideo: 'Detail video', DetailVideo: 'Detail video',
NoData: 'No data!', NoData: 'No data!',
All: 'All', All: 'All',
PriceTable: 'Price table', PriceTable: 'Price table',
Chart: 'Chart', Chart: 'Chart',
Calendar: 'Calendar', Calendar: 'Calendar',
Fullname: 'Full name', Fullname: 'Full name',
Birth: 'Birth', Birth: 'Birth',
Male: 'Male', Male: 'Male',
Status: 'Status', Status: 'Status',
Phone: 'Phone', Phone: 'Phone',
Enter_Phone: 'Enter phone', Enter_Phone: 'Enter phone',
Address: 'Address', Address: 'Address',
Update: 'Update', Update: 'Update',
ContactCode: 'Contact code', ContactCode: 'Contact code',
TraddingAccountName: 'Tradding account name', TraddingAccountName: 'Tradding account name',
TraddingAccountNumber: 'Tradding account number', TraddingAccountNumber: 'Tradding account number',
GeneralInformation: 'General information', GeneralInformation: 'General information',
Profile: 'Profile', Profile: 'Profile',
CustomerAgreement: 'Customer agreement', CustomerAgreement: 'Customer agreement',
BusinessAgreement: 'Business agreement', BusinessAgreement: 'Business agreement',
PartnershipAgreement: 'Partnership agreement', PartnershipAgreement: 'Partnership agreement',
Waiting: 'Waiting', Waiting: 'Waiting',
Success: 'Success', Success: 'Success',
Ok: 'Ok', Ok: 'Ok',
Can_not_get_data: 'Can\'t get data', Can_not_get_data: "Can't get data",
Search: 'Search', Search: 'Search',
NullDataSearch: 'Data not found', NullDataSearch: 'Data not found',
Cancel: 'Cancel', Cancel: 'Cancel',
Close: 'Close', Close: 'Close',
No_Internet: 'No internet', No_Internet: 'No internet',
Check_Internet_Connect: 'Check internet connect', Check_Internet_Connect: 'Check internet connect',
Retry: 'Retry', Retry: 'Retry',
Select_source_image: 'Select the source of the image', Select_source_image: 'Select the source of the image',
Photo_library: 'Photo library', Photo_library: 'Photo library',
Take_photo: 'Take a photo', Take_photo: 'Take a photo',
EnableCQG: 'Enable CQG', EnableCQG: 'Enable CQG',
Request_Open_Account_CQG: 'Request open account CQG', Request_Open_Account_CQG: 'Request open account CQG',
Waiting_for_Progress: 'Waiting for progress', Waiting_for_Progress: 'Waiting for progress',
PopupVerifyAccount: PopupVerifyAccount:
'Your account is not verified. Go to account verification?', 'Your account is not verified. Go to account verification?',
PopupOpenCQG: 'Would you like to open a CQG account to make investments?', PopupOpenCQG: 'Would you like to open a CQG account to make investments?',
Free: 'Free', Free: 'Free',
Open_account: 'Open account', Open_account: 'Open account',
Provisional: 'Provisional', Provisional: 'Provisional',
Here: 'Here', Here: 'Here',
Open_account_demo: 'You can open a demo account', Open_account_demo: 'You can open a demo account',
Features_develop: 'No data!', Features_develop: 'No data!',
Language: 'Language', Language: 'Language',
Email: 'Email', Email: 'Email',
Password: 'Password', Password: 'Password',
Login: 'Login', Login: 'Login',
Register: 'Register', Register: 'Register',
Confirm_pass: 'Confirm password', Confirm_pass: 'Confirm password',
Code_introduce: 'Code introduce', Code_introduce: 'Code introduce',
Account_already: 'Do you already have an account?', Account_already: 'Do you already have an account?',
Have_account: 'Do not have an account?', Have_account: 'Do not have an account?',
Verify_code: 'Verification codes:', Verify_code: 'Verification codes:',
Continue: 'Continue', Continue: 'Continue',
Re_send: 'Re send', Re_send: 'Re send',
Copied: 'Copied!', Copied: 'Copied!',
Please_fill_in: 'Please fill in ', Please_fill_in: 'Please fill in ',
RequestFilter: 'Request filter', RequestFilter: 'Request filter',
FromDate: 'From date:', FromDate: 'From date:',
ToDate: 'To date:', ToDate: 'To date:',
Failed: 'Failed', Failed: 'Failed',
SelectRequestStatus: 'Select request status', SelectRequestStatus: 'Select request status',
TopVideo: 'Video watching a lot', TopVideo: 'Video watching a lot',
Delete: 'Delete', Delete: 'Delete',
SelectBank: 'Select Bank', SelectBank: 'Select Bank',
Branch: 'Branch', Branch: 'Branch',
OwnerAccountName: 'Owner account name', OwnerAccountName: 'Owner account name',
AccountNumber: 'Account Number', AccountNumber: 'Account Number',
DeletePaymentMethodConfirm: 'Do you went delete this payment method?', DeletePaymentMethodConfirm: 'Do you went delete this payment method?',
Forbidden: 'Forbidden', Forbidden: 'Forbidden',
OwnerAccount: 'Owner Account', OwnerAccount: 'Owner Account',
Add: 'Add', Add: 'Add',
Note_cqg: Note_cqg:
'Note: The fee is calculated on a monthly basis and is applied until the end of the day 30/12/2021', 'Note: The fee is calculated on a monthly basis and is applied until the end of the day 30/12/2021',
CardType: 'Card type', CardType: 'Card type',
BankCode: 'Bank code', BankCode: 'Bank code',
CardNumberOrAccount: 'Card number/Account', CardNumberOrAccount: 'Card number/Account',
Confirm: 'Confirm', Confirm: 'Confirm',
AmountOfMoney: 'Amount of money', AmountOfMoney: 'Amount of money',
Note: 'Note', Note: 'Note',
SourceAccount: 'Source account', SourceAccount: 'Source account',
ChooseBeneficiaryAccount: 'Choose the beneficiary account', ChooseBeneficiaryAccount: 'Choose the beneficiary account',
BeneficiaryAccount: 'the beneficiary account', BeneficiaryAccount: 'the beneficiary account',
FromWallet: 'From wallet', FromWallet: 'From wallet',
FromCQGAccount: 'From CQG account', FromCQGAccount: 'From CQG account',
SettingPaymentMethodConfirm: SettingPaymentMethodConfirm:
'You have not the payment method. Go to payment method setting?', 'You have not the payment method. Go to payment method setting?',
EnterEmailRequest: 'Please enter email', EnterEmailRequest: 'Please enter email',
EnterEmail: 'Enter email', EnterEmail: 'Enter email',
GetVerificationCode: 'Get the verification code', GetVerificationCode: 'Get the verification code',
BackToLogin: 'Back to login', BackToLogin: 'Back to login',
OTPValidFiveMinute: 'The OTP code is valid for 5 minutes', OTPValidFiveMinute: 'The OTP code is valid for 5 minutes',
EnterNewPassword: 'Please enter a new password', EnterNewPassword: 'Please enter a new password',
EnterNewPasswordHint: 'Enter a new password', EnterNewPasswordHint: 'Enter a new password',
ReEnterPassword: 'Reenter password', ReEnterPassword: 'Reenter password',
ConfirmNewPassword: 'Confirm new password', ConfirmNewPassword: 'Confirm new password',
ChangePasswordSuccess: 'Change password success', ChangePasswordSuccess: 'Change password success',
EnterAllInfo: 'Please complete all information ', EnterAllInfo: 'Please complete all information ',
Date: 'Date', Date: 'Date',
ReviewService: 'Review service of DCV Invest', ReviewService: 'Review service of DCV Invest',
VeryBad: 'Very bad', VeryBad: 'Very bad',
Bad: 'Bad', Bad: 'Bad',
Normal: 'Normal', Normal: 'Normal',
Good: 'Good', Good: 'Good',
VeryGood: 'Very good', VeryGood: 'Very good',
ShareYourFeel: 'Share your feel about service', ShareYourFeel: 'Share your feel about service',
UploadImage: 'Upload image', UploadImage: 'Upload image',
BonusMoney: 'Bonus money', BonusMoney: 'Bonus money',
Content: 'Content', Content: 'Content',
CopyLink: 'Copied referral link ', CopyLink: 'Copied referral link ',
CardAccount: 'Card account', CardAccount: 'Card account',
FirstLastName: 'First and last name', FirstLastName: 'First and last name',
Name: 'Name', Name: 'Name',
PhoneNumber: 'Phone number', PhoneNumber: 'Phone number',
IdentityCard: 'Identity card', IdentityCard: 'Identity card',
Passport: 'Passport', Passport: 'Passport',
CitizenIdentification: 'Citizen identification', CitizenIdentification: 'Citizen identification',
IdentityCardFrontPhoto: 'Photo on front of ID card', IdentityCardFrontPhoto: 'Photo on front of ID card',
IdentityCitizenCardFrontPhoto: 'Photo on front of ID/Citizen card', IdentityCitizenCardFrontPhoto: 'Photo on front of ID/Citizen card',
IdentityCardBackPhoto: 'Photo on the back of ID card', IdentityCardBackPhoto: 'Photo on the back of ID card',
IdentityCitizenCardBackPhoto: 'Photo on the back of ID/Citizen card', IdentityCitizenCardBackPhoto: 'Photo on the back of ID/Citizen card',
SignPhoto: 'Sign photo', SignPhoto: 'Sign photo',
EnterOTPRequest: 'Please enter OTP code', EnterOTPRequest: 'Please enter OTP code',
OTPInvalid: 'OTP code invalid', OTPInvalid: 'OTP code invalid',
Username: 'Username', Username: 'Username',
EnterPassword: 'Enter password', EnterPassword: 'Enter password',
ConfirmPassword: 'Confirm password', ConfirmPassword: 'Confirm password',
RegisterAccountSuccess: 'Register account success!', RegisterAccountSuccess: 'Register account success!',
EnterReferralCode: 'Enter a referral code if available', EnterReferralCode: 'Enter a referral code if available',
Male2: 'Male', Male2: 'Male',
Female: 'Female', Female: 'Female',
Bank: 'Bank', Bank: 'Bank',
OwnerAccount2: 'Owner account', OwnerAccount2: 'Owner account',
NothingChange: 'Nothing change', NothingChange: 'Nothing change',
Tradding: 'Tradding', Tradding: 'Tradding',
ContractDescription: 'Contract description', ContractDescription: 'Contract description',
QualityStandard: 'Quality Standard', QualityStandard: 'Quality Standard',
CommodityTransactions: 'Commodity transactions', CommodityTransactions: 'Commodity transactions',
CommodityCode: 'Commodity code', CommodityCode: 'Commodity code',
Escrow: 'Escrow', Escrow: 'Escrow',
PositionLimit: 'Position limit', PositionLimit: 'Position limit',
PaymentMethod: 'Payment method', PaymentMethod: 'Payment method',
TimeTransaction: 'Time transaction', TimeTransaction: 'Time transaction',
Time: 'Time', Time: 'Time',
TransactionSession: 'Transaction session', TransactionSession: 'Transaction session',
MaturityMonth: 'Maturity month', MaturityMonth: 'Maturity month',
RegisteredDeliveryDate: 'Registered delivery date', RegisteredDeliveryDate: 'Registered delivery date',
PriceInfo: 'Price Information', PriceInfo: 'Price Information',
ListedUnit: 'Listed unit', ListedUnit: 'Listed unit',
PriceStep: 'Price step', PriceStep: 'Price step',
ContactSize: 'Contact size', ContactSize: 'Contact size',
PriceRange: 'Price range', PriceRange: 'Price range',
FirstNotifyDate: 'First notify date', FirstNotifyDate: 'First notify date',
EndlessTransactionDate: 'Endless transaction date', EndlessTransactionDate: 'Endless transaction date',
Finance: 'Finance', Finance: 'Finance',
Support: 'Hỗ trợ', Support: 'Hỗ trợ',
Support_Customer: 'Support Customer', Support_Customer: 'Support Customer',
Price_List: 'Price list', Price_List: 'Price list',
Time_Transaction: 'Time transaction', Time_Transaction: 'Time transaction',
Due_Date: 'Due date', Due_Date: 'Due date',
Version: 'Version', Version: 'Version',
UpdateDescription: 'A new version of DCVInvest is available. Update now to continue using and experiencing the latest system features!', UpdateDescription:
'A new version of DCVInvest is available. Update now to continue using and experiencing the latest system features!',
}; };
...@@ -34,8 +34,8 @@ export default { ...@@ -34,8 +34,8 @@ export default {
RevenueDonors: 'Doanh thu nhà tài trợ', RevenueDonors: 'Doanh thu nhà tài trợ',
Invset: 'Đầu tư', Invset: 'Đầu tư',
Contract: 'Hợp đồng', Contract: 'Hợp đồng',
PaymentSetting: 'Cài đặt phương thức thanh toán', PaymentSetting: 'Phương thức thanh toán',
CustomerCare: 'Chăm sóc khách hàng', CustomerCare: 'Tư vấn khách hàng',
Feedback: 'Phản hồi', Feedback: 'Phản hồi',
LegalDocument: 'Giấy tờ pháp lý', LegalDocument: 'Giấy tờ pháp lý',
Setting: 'Cài đặt', Setting: 'Cài đặt',
......
...@@ -66,3 +66,4 @@ export const LEGALPARTNER = 'LEGALPARTNER'; ...@@ -66,3 +66,4 @@ export const LEGALPARTNER = 'LEGALPARTNER';
export const HISTORYDETAIL = 'HISTORYDETAIL'; export const HISTORYDETAIL = 'HISTORYDETAIL';
export const PRODUCTDETAIL = 'PRODUCTDETAIL'; export const PRODUCTDETAIL = 'PRODUCTDETAIL';
export const REGISTEROTP = 'REGISTEROTP';
...@@ -46,6 +46,7 @@ import Partner from '../Screens/LegalDocument/Partner'; ...@@ -46,6 +46,7 @@ import Partner from '../Screens/LegalDocument/Partner';
import SnackBar from '../components/SnackBar'; import SnackBar from '../components/SnackBar';
import DetailHistory from '../Screens/Action/History/DetailHistory'; import DetailHistory from '../Screens/Action/History/DetailHistory';
import ProductDetail from '../Screens/Transaction/ProductDetail/ProductDetail'; import ProductDetail from '../Screens/Transaction/ProductDetail/ProductDetail';
import RegisterOTP from '../Screens/Authen/RegisterOTP';
import * as ScreenName from './ScreenNames'; import * as ScreenName from './ScreenNames';
...@@ -67,6 +68,7 @@ function MyStack(props) { ...@@ -67,6 +68,7 @@ function MyStack(props) {
<Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} /> <Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} />
<Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} /> <Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} />
<Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} /> <Stack.Screen name={ScreenName.NOTIFICATION} component={Notification} />
<Stack.Screen name={ScreenName.REGISTEROTP} component={RegisterOTP} />
<Stack.Screen name={ScreenName.LEGALBUSINESS} component={Business} /> <Stack.Screen name={ScreenName.LEGALBUSINESS} component={Business} />
<Stack.Screen name={ScreenName.LEGALCUSTOMER} component={Customer} /> <Stack.Screen name={ScreenName.LEGALCUSTOMER} component={Customer} />
......
import React, {useEffect} from 'react'; import React, {useEffect} from 'react';
import {View, Text} from 'react-native'; import {View, Text, Linking} from 'react-native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import Ionicons from 'react-native-vector-icons/Ionicons'; import Ionicons from 'react-native-vector-icons/Ionicons';
...@@ -22,6 +22,7 @@ import I18n from '../helper/i18/i18n'; ...@@ -22,6 +22,7 @@ import I18n from '../helper/i18/i18n';
import {changeLanguage} from '../actions/language'; import {changeLanguage} from '../actions/language';
import KEY from '../assets/AsynStorage'; import KEY from '../assets/AsynStorage';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import {DETAILNEW} from '../routers/ScreenNames';
const Tab = createBottomTabNavigator(); const Tab = createBottomTabNavigator();
...@@ -33,11 +34,35 @@ const TabNavigator = (props) => { ...@@ -33,11 +34,35 @@ const TabNavigator = (props) => {
const navigate = useNavigation(); const navigate = useNavigation();
useEffect(() => { useEffect(() => {
setInitLanguage(); setInitLanguage();
checkDeepking();
setTimeout(() => { setTimeout(() => {
showPopUp(); showPopUp();
}, 3000); }, 3000);
}, []); }, []);
const checkDeepking = () => {
Linking.getInitialURL().then((url) => {
if (url) deeplinkScreen(url);
});
Linking.addEventListener('url', (url) => {
if (url) handleOpenURL(url);
});
};
const handleOpenURL = (event) => {
deeplinkScreen(event.url);
};
const deeplinkScreen = (url) => {
const route = url.replace(/.*?:\/\//g, '');
const id = route.match(/\/([^\/]+)\/?$/)[1];
const root = route.split('/')[0];
// const routeName = route.split('/')[1];
if (root == 'screen') {
navigate.navigate(DETAILNEW, {id});
}
};
useEffect(() => { useEffect(() => {
checkScreenInit(); checkScreenInit();
}, [props.screenInit]); }, [props.screenInit]);
......
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