Commit c0a504d5 by Giang Tran

Merge branch '05_May' into dev_phase2

parents 8608d3d4 b1275134
......@@ -32,6 +32,14 @@
android:exported="true"
android:launchMode="singleTask"
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
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
......@@ -43,12 +51,7 @@
</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>
......
<resources>
<color name="bootsplash_background">#1C6AF6</color>
<color name="white">#1C6AF6</color>
<color name="white">#fff</color>
</resources>
......@@ -912,7 +912,7 @@
);
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6;
MARKETING_VERSION = 1.7;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -940,7 +940,7 @@
DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.6;
MARKETING_VERSION = 1.7;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......
......@@ -5,7 +5,7 @@
#import <React/RCTRootView.h>
@import Firebase;
#import <React/RCTLinkingManager.h>
#import <AVFoundation/AVFoundation.h>
#import "RNBootSplash.h"
#if DEBUG
......@@ -17,6 +17,7 @@
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
//#import <CallAppSDK/CallAppInterface.h>
static void InitializeFlipper(UIApplication *application) {
FlipperClient *client = [FlipperClient sharedClient];
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
......@@ -55,6 +56,33 @@ static void InitializeFlipper(UIApplication *application) {
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
{
#if DEBUG
......
......@@ -33,7 +33,7 @@
<string>dcv.investcustomer.vn. linking</string>
<key>CFBundleURLSchemes</key>
<array>
<string>dcvinvest</string>
<string>appdcvinvest</string>
</array>
</dict>
</array>
......
......@@ -37,6 +37,7 @@ const PacketCQG = (props) => {
props.showLoading();
const res = await openCQG({packages: newList});
props.hideLoading();
console.log(res);
if (res.data.code == 200) {
props.saveUserToRedux(res.data.data);
setTimeout(() => {
......
......@@ -91,7 +91,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txt: {
fontSize: getFontXD(36),
......
......@@ -81,7 +81,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -6,6 +6,11 @@ import {
Dimensions,
TouchableOpacity,
Alert,
TouchableWithoutFeedback,
Keyboard,
KeyboardAvoidingView,
Platform,
ScrollView,
} from 'react-native';
import R from '../../../assets/R';
import HeaderBack from '../../../components/Header/HeaderBack';
......@@ -32,7 +37,10 @@ const WalletDeposit = (props) => {
const navigate = useNavigation();
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]);
if (index === true) {
......@@ -63,8 +71,14 @@ const WalletDeposit = (props) => {
}
};
return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1, backgroundColor: 'white'}}
keyboardVerticalOffset={-50}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}>
<HeaderBack title={'InvestmentDeposit'} />
<ScrollView showsVerticalScrollIndicator={false}>
<View style={styles.container}>
<View style={styles.wrapTop}>
<View style={styles.itemTop}>
......@@ -95,13 +109,26 @@ const WalletDeposit = (props) => {
title={I18n.t('AmountOfMoney')}
value={amount}
/>
<TextMulti onChangeText={(val) => setNotes(val)} title={I18n.t('Note')} />
<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>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>
);
};
......@@ -147,9 +174,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
},
btnSend: {
position: 'absolute',
bottom: 30,
right: width / 2 - 70,
width: 140,
height: 40,
backgroundColor: R.colors.main,
......
......@@ -10,6 +10,7 @@ import {
TouchableWithoutFeedback,
Keyboard,
KeyboardAvoidingView,
ScrollView,
} from 'react-native';
import R from '../../../assets/R';
import HeaderBack from '../../../components/Header/HeaderBack';
......@@ -61,9 +62,8 @@ const WalletWithdraw = (props) => {
});
if (res.data.code == 200 && res.data.data) {
if (res.data.data.length == 0) {
confirmAlert(
I18n.t('SettingPaymentMethodConfirm'),
() => navigate.navigate(ADDMETHODPAY),
confirmAlert(I18n.t('SettingPaymentMethodConfirm'), () =>
navigate.navigate(ADDMETHODPAY),
);
} else {
const newList = res.data.data.map((e) => {
......@@ -77,7 +77,10 @@ const WalletWithdraw = (props) => {
};
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]);
......@@ -120,6 +123,7 @@ const WalletWithdraw = (props) => {
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View style={{flex: 1}}>
<HeaderBack title={'Withdraw'} />
<ScrollView showsVerticalScrollIndicator={false}>
<View style={styles.container}>
<View style={styles.wrapTop}>
<View style={styles.itemTop}>
......@@ -189,10 +193,18 @@ const WalletWithdraw = (props) => {
/>
</View>
</View>
</ScrollView>
<View
style={{
paddingVertical: 10,
justifyContent: 'center',
alignItems: 'center',
}}>
<TouchableOpacity onPress={onPressWithdraw} style={styles.btnSend}>
<Text style={styles.txtSend}>{I18n.t('Withdraw')}</Text>
</TouchableOpacity>
</View>
</View>
</TouchableWithoutFeedback>
</KeyboardAvoidingView>
);
......@@ -240,9 +252,6 @@ const styles = StyleSheet.create({
fontWeight: 'bold',
},
btnSend: {
position: 'absolute',
bottom: 30,
right: width / 2 - 70,
width: 140,
height: 40,
backgroundColor: R.colors.main,
......
......@@ -62,7 +62,10 @@ const Login = (props) => {
};
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]);
if (index === true) {
......@@ -110,14 +113,12 @@ const Login = (props) => {
<InputIcon
icon={R.images.iconUser3}
title={'Email'}
placeholder={I18n.t('EnterEmail')}
onChangeText={(val) => setEmail(val)}
value={email}
/>
<InputIcon
icon={R.images.iconLock}
title={'Password'}
placeholder={I18n.t('EnterPassword')}
isPassWord={true}
onChangeText={(val) => setPass(val)}
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';
import {checkFormatArray} from '../../Config/Functions';
import {showLoading, hideLoading} from '../../actions/loadingAction';
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 AppText from '../../components/AppText';
import {REGISTEROTP} from '../../routers/ScreenNames';
const Registor = (props) => {
const {navigation} = props;
......@@ -41,34 +42,21 @@ const Registor = (props) => {
]);
if (index === true) {
let res;
props.showLoading();
if (sponsor_id) {
res = await registorApi({
email,
password,
const res = await getOTPApi({
platform: Platform.OS,
password_confirmation,
sponsor_id,
phone,
otp_by: email,
});
} else {
res = await registorApi({
props.hideLoading();
console.log(res);
if (res.data.code == 200) {
navigation.navigate(REGISTEROTP, {
email,
password,
platform: Platform.OS,
password_confirmation,
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 {
setTimeout(() => {
Alert.alert(I18n.t('Notification'), res.data.message);
......@@ -93,35 +81,30 @@ const Registor = (props) => {
<InputIcon
icon={R.images.iconEmail}
title={'Email'}
placeholder={I18n.t('EnterEmail')}
onChangeText={(val) => setEmail(val)}
/>
<InputIcon
icon={R.images.iconLock}
title={'Password'}
placeholder={I18n.t('EnterPassword')}
onChangeText={(val) => setPassword(val)}
isPassWord={true}
/>
<InputIcon
icon={R.images.iconLock}
title={'Confirm_pass'}
placeholder={I18n.t('EnterPassword')}
onChangeText={(val) => setPasswordConfirm(val)}
isPassWord={true}
/>
<InputIcon
icon={R.images.iconPhone3}
title={'Phone'}
placeholder={I18n.t('Enter_Phone')}
onChangeText={(val) => setPhone(val)}
isNumber={true}
/>
<InputIcon
icon={R.images.iconIntroduct}
title={'Code_introduce'}
placeholder={I18n.t('EnterReferralCode')}
onChangeText={(val) => setSponsor_id(val)}
/>
......
......@@ -38,7 +38,9 @@ const Item = (props) => {
<Text numberOfLines={1} style={styles.txtTitle}>
{item.note}
</Text>
<Text style={styles.txtDate}>`${I18n.t('Date')} ${item.date}`</Text>
<Text style={styles.txtDate}>
`${I18n.t('Date')} ${item.date}`
</Text>
</Block>
</Block>
</View>
......@@ -76,7 +78,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(48),
......
......@@ -89,7 +89,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txt: {
fontSize: getFontXD(36),
......
......@@ -9,6 +9,9 @@ import I18n from '../../../../helper/i18/i18n';
const Profile = (props) => {
return (
<View style={styles.container}>
{props.user.status == 3 ? (
<View>
{' '}
<View style={styles.item}>
<AppText i18nKey={'ContactCode'} style={styles.txtTitle}></AppText>
<Text style={styles.txtBig}>{props.user.cqg_id}</Text>
......@@ -26,6 +29,12 @@ const Profile = (props) => {
<Text style={styles.txtBig}>{props.user.account}</Text>
</View>
</View>
) : (
<View>
<Text>Hello</Text>
</View>
)}
</View>
);
};
......
......@@ -37,7 +37,9 @@ const Item = (props) => {
{item.note}
</Text>
</View>
<Text style={styles.txtDate}>`${I18n.t('Date')} ${item.date}`</Text>
<Text style={styles.txtDate}>
`${I18n.t('Date')} ${item.date}`
</Text>
</View>
<View>
<Text
......@@ -86,7 +88,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -13,12 +13,6 @@ const Rose = (props) => {
return (
<View style={{flex: 1}}>
<HeaderSB title={'Rose'} />
<TouchableOpacity onPress={() => props.changeLanguage('en')}>
<Text>Change</Text>
</TouchableOpacity>
<AppText i18nKey={'SetLanguage'}></AppText>
<View style={{justifyContent: 'center', alignItems: 'center', flex: 1}}>
<AppText
i18nKey={'Features_develop'}
......
......@@ -20,9 +20,9 @@ const Item = (props) => {
<Text style={styles.txtBig}>{item.title}</Text>
<Block space={'between'} row flex={1}>
<Block>
<AppText style={styles.txtLeft} i18nKey={('OwnerAccount')}/>
<AppText style={styles.txtLeft} i18nKey={'OwnerAccount'} />
<Text style={styles.txtLeft}>STK</Text>
<AppText style={styles.txtLeft} i18nKey={('Branch')}/>
<AppText style={styles.txtLeft} i18nKey={'Branch'} />
</Block>
<Block>
<Text style={styles.txtRight}>{item.account_name}</Text>
......@@ -64,7 +64,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
import React from 'react';
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 Block from '../../components/Block';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
......@@ -10,7 +16,11 @@ const Item = (props) => {
const {item} = props;
return (
<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)]}>
<Image source={{uri: item.logo}} style={styles.imgIcon} />
<Block padding={[0, 10]}>
......@@ -55,7 +65,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -59,7 +59,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -22,7 +22,6 @@ const Item = (props) => {
<View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row>
<View style={styles.wrapLeft} />
<View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
......@@ -74,7 +73,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -72,7 +72,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -72,7 +72,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -22,7 +22,6 @@ const Item = (props) => {
<View style={styles.container}>
<TouchableOpacity onPress={() => props.onPress(item)}>
<Block flex={1} row>
<View style={styles.wrapLeft} />
<View style={styles.wrapDate}>
<Image source={R.images.iconRecharge} style={styles.imgIcon} />
</View>
......@@ -74,7 +73,7 @@ const styles = StyleSheet.create({
},
wrapDate: {
justifyContent: 'center',
paddingHorizontal: 10,
paddingLeft: 10,
},
txtTitle: {
fontSize: getFontXD(42),
......
......@@ -106,6 +106,14 @@ const menus = [
icon: R.images.iconHistoryMenu,
screen: HISTORY,
},
{
id: '65',
title: 'PaymentSetting',
icon: R.images.iconMethodPay,
screen: METHODPAY,
active: false,
children: null,
},
],
},
{
......@@ -137,14 +145,6 @@ const menus = [
},
{
id: '2',
title: 'PaymentSetting',
icon: R.images.iconMethodPay,
screen: METHODPAY,
active: false,
children: null,
},
{
id: '5',
title: 'Setting',
icon: R.images.iconSetting,
......@@ -289,7 +289,7 @@ const styles = StyleSheet.create({
color: '#0C0D2C',
},
txtTop: {
fontSize: getFontXD(42),
fontSize: getFontXD(38),
color: '#1E2F70',
},
txtLink: {
......
......@@ -16,7 +16,6 @@ import R from '../../assets/R';
import {getFontXD, HEIGHT, WIDTHXD} from '../../Config/Functions';
import LinearGradient from 'react-native-linear-gradient';
import {connect} from 'react-redux';
import {HEIGHTXD} from '../../Config/Functions';
import Modal from 'react-native-modal';
import Drawer from './Drawer';
import SnackBar from '../SnackBar';
......@@ -108,7 +107,7 @@ const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
height: '100%',
width: 300,
width: WIDTHXD(780),
borderRadius: 20,
},
});
......@@ -196,7 +196,6 @@ const HeaderHome = (props) => {
/>
</TouchableOpacity>
</View>
{renderLabel(props.user.status)}
</View>
</View>
......@@ -252,7 +251,7 @@ export default connect(mapStateToProps, {})(HeaderHome);
const styles = StyleSheet.create({
container: {},
wrapWallet: {
height: 80,
height: 70,
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#EDEDF1',
......@@ -266,7 +265,6 @@ const styles = StyleSheet.create({
},
containerTop: {
backgroundColor: 'white',
height: 290,
width: '90%',
borderRadius: 10,
shadowColor: '#000',
......@@ -296,8 +294,8 @@ const styles = StyleSheet.create({
resizeMode: 'contain',
},
imgIconCopy: {
width: WIDTHXD(134),
height: HEIGHTXD(134),
width: WIDTHXD(100),
height: HEIGHTXD(100),
resizeMode: 'contain',
},
......@@ -319,9 +317,9 @@ const styles = StyleSheet.create({
color: '#A2A2A2',
},
imgAvatar: {
width: WIDTHXD(240),
height: WIDTHXD(240),
borderRadius: WIDTHXD(120),
width: WIDTHXD(180),
height: WIDTHXD(180),
borderRadius: WIDTHXD(90),
},
txtMoney: {
fontSize: getFontXD(62),
......@@ -338,7 +336,7 @@ const styles = StyleSheet.create({
},
wrapRight: {
flex: 1,
paddingHorizontal: 20,
paddingLeft: 10,
},
containerInfor: {
flex: 1,
......@@ -348,6 +346,8 @@ const styles = StyleSheet.create({
borderBottomColor: '#EDEDF1',
flexDirection: 'row',
paddingHorizontal: 20,
paddingVertical: 10,
},
row: {
flexDirection: 'row',
......@@ -358,6 +358,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
marginTop: 5,
},
containerWallet: {
justifyContent: 'center',
......
......@@ -31,7 +31,7 @@ export default {
RevenueDonors: 'Revenue donors',
Invset: 'Invest',
Contract: 'Contract',
PaymentSetting: 'Payment method setting',
PaymentSetting: 'Method setting',
CustomerCare: 'Customer care',
Feedback: 'Feedback',
LegalDocument: 'Legal document',
......@@ -74,7 +74,7 @@ export default {
Waiting: 'Waiting',
Success: 'Success',
Ok: 'Ok',
Can_not_get_data: 'Can\'t get data',
Can_not_get_data: "Can't get data",
Search: 'Search',
NullDataSearch: 'Data not found',
......@@ -216,5 +216,6 @@ export default {
Time_Transaction: 'Time transaction',
Due_Date: 'Due date',
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 {
RevenueDonors: 'Doanh thu nhà tài trợ',
Invset: 'Đầu tư',
Contract: 'Hợp đồng',
PaymentSetting: 'Cài đặt phương thức thanh toán',
CustomerCare: 'Chăm sóc khách hàng',
PaymentSetting: 'Phương thức thanh toán',
CustomerCare: 'Tư vấn khách hàng',
Feedback: 'Phản hồi',
LegalDocument: 'Giấy tờ pháp lý',
Setting: 'Cài đặt',
......
......@@ -66,3 +66,4 @@ export const LEGALPARTNER = 'LEGALPARTNER';
export const HISTORYDETAIL = 'HISTORYDETAIL';
export const PRODUCTDETAIL = 'PRODUCTDETAIL';
export const REGISTEROTP = 'REGISTEROTP';
......@@ -46,6 +46,7 @@ import Partner from '../Screens/LegalDocument/Partner';
import SnackBar from '../components/SnackBar';
import DetailHistory from '../Screens/Action/History/DetailHistory';
import ProductDetail from '../Screens/Transaction/ProductDetail/ProductDetail';
import RegisterOTP from '../Screens/Authen/RegisterOTP';
import * as ScreenName from './ScreenNames';
......@@ -67,6 +68,7 @@ function MyStack(props) {
<Stack.Screen name={ScreenName.HISTORYDETAIL} component={DetailHistory} />
<Stack.Screen name={ScreenName.LEGALDOCUMENT} component={LegaDocument} />
<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.LEGALCUSTOMER} component={Customer} />
......
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 Icon from 'react-native-vector-icons/FontAwesome5';
import Ionicons from 'react-native-vector-icons/Ionicons';
......@@ -22,6 +22,7 @@ import I18n from '../helper/i18/i18n';
import {changeLanguage} from '../actions/language';
import KEY from '../assets/AsynStorage';
import AsyncStorage from '@react-native-community/async-storage';
import {DETAILNEW} from '../routers/ScreenNames';
const Tab = createBottomTabNavigator();
......@@ -33,11 +34,35 @@ const TabNavigator = (props) => {
const navigate = useNavigation();
useEffect(() => {
setInitLanguage();
checkDeepking();
setTimeout(() => {
showPopUp();
}, 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(() => {
checkScreenInit();
}, [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