Commit d29b6433 by Giang Tran

verify account

parent 1c89bb15
......@@ -902,7 +902,7 @@
);
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3;
MARKETING_VERSION = 1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......@@ -930,7 +930,7 @@
DEVELOPMENT_TEAM = MXZ24GRH48;
INFOPLIST_FILE = Invest/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.3;
MARKETING_VERSION = 1.4;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
......
......@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>dcv.investcustomer.vn</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
......@@ -38,7 +42,7 @@
</dict>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<string></string>
<key>NSPhotoLibraryUsageDescription</key>
<string>To upload images</string>
<key>UIAppFonts</key>
......@@ -71,10 +75,6 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>dcv.investcustomer.vn</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
......
......@@ -388,6 +388,8 @@ PODS:
- ReactCommon/callinvoker (= 0.62.2)
- RNCAsyncStorage (1.12.1):
- React-Core
- RNCClipboard (1.7.0):
- React-Core
- RNCMaskedView (0.1.10):
- React
- RNFirebase (5.6.0):
......@@ -475,6 +477,7 @@ DEPENDENCIES:
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNFirebase (from `../node_modules/react-native-firebase/ios`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
......@@ -574,6 +577,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCClipboard:
:path: "../node_modules/@react-native-clipboard/clipboard"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNFirebase:
......@@ -648,6 +653,7 @@ SPEC CHECKSUMS:
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCClipboard: 245417a78ab585e0d4d83926c28907e7b2bc24bd
RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f
RNFirebase: 37daa9a346d070f9f6ee1f3b4aaf4c8e3b1d5d1c
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
......@@ -659,6 +665,6 @@ SPEC CHECKSUMS:
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: 2aa97f909c94cc3768d9dc69401b7c62cac7d757
PODFILE CHECKSUM: 6c1aab2c5d54fffaeb8b43c847c486a421cbfebc
COCOAPODS: 1.10.1
......@@ -10,6 +10,7 @@
"lint": "eslint ."
},
"dependencies": {
"@react-native-clipboard/clipboard": "^1.7.0",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/bottom-tabs": "^5.11.7",
......
......@@ -234,8 +234,8 @@ export const convertDate = (date) => {
};
export const convertTime = (date) => {
const time = moment(date).format('DD/MM/YYYY HH:mm');
return time.substring(11, 16);
const time = moment(date).format('YYYY-MM-DD');
return time;
};
export const getTimeDDMM = (time) => {
......
......@@ -16,41 +16,34 @@ const Tab = createMaterialTopTabNavigator();
const AccountVerificationView = (props) => {
return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Xác minh tài khoản'} />
<Tab.Navigator
initialRouteName="GeneralInfor"
tabBarOptions={{
inactiveTintColor: '#929292',
activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36)},
style: {backgroundColor: 'white'},
scrollEnabled: true,
}}>
<Tab.Screen
name="GeneralInfor"
component={GeneralInfor}
options={{tabBarLabel: 'Thông tin chung'}}
/>
<Tab.Screen
name="Profile"
component={Profile}
options={{tabBarLabel: 'Hồ sơ'}}
/>
<Tab.Screen
name="BankInfor"
component={BankInfor}
options={{tabBarLabel: 'Ngân hàng'}}
/>
</Tab.Navigator>
</View>
</ScrollView>
</KeyboardAvoidingView>
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Xác minh tài khoản'} />
<Tab.Navigator
initialRouteName="GeneralInfor"
tabBarOptions={{
inactiveTintColor: '#929292',
activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36)},
style: {backgroundColor: 'white'},
scrollEnabled: true,
}}>
<Tab.Screen
name="GeneralInfor"
component={GeneralInfor}
options={{tabBarLabel: 'Thông tin chung'}}
/>
<Tab.Screen
name="Profile"
component={Profile}
options={{tabBarLabel: 'Hồ sơ'}}
/>
<Tab.Screen
name="BankInfor"
component={BankInfor}
options={{tabBarLabel: 'Ngân hàng'}}
/>
</Tab.Navigator>
</View>
);
};
......
import React from 'react';
import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
import React, {useState} from 'react';
import {
View,
Text,
TouchableOpacity,
Image,
StyleSheet,
KeyboardAvoidingView,
ScrollView,
Platform,
Dimensions,
Alert,
} from 'react-native';
import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti';
import {checkFormatArray, getFontXD} from '../../../Config/Functions';
import PickerDate from '../../../components/Picker/PickerDate';
import R from '../../../assets/R';
import Button from '../../../components/Button';
import PickerItem from '../../../components/Picker/PickerItem';
import {verifyAccountApi} from '../../../apis/Functions/users';
const {width} = Dimensions.get('window');
const dataType = [
{
value: '0',
name: 'Tài khoản ngân hàng',
},
{
value: '1',
name: 'Tài khoản thẻ',
},
];
const BankInfor = (props) => {
console.log(props.route.params);
const [type, setType] = useState();
const [acc_type, setAccType] = useState('');
const [account_no, setAccountNo] = useState('');
const createFormData = (identity_after, identity_before, sign_img, body) => {
const data = new FormData();
console.log(identity_after);
data.append('identity_after', {
name: 'identity_after.jpg',
type: 'image/jpg',
uri:
Platform.OS === 'android'
? identity_after
: identity_after.replace('file://', ''),
});
data.append('identity_before', {
name: 'identity_before.jpg',
type: 'image/jpg',
uri:
Platform.OS === 'android'
? identity_before
: identity_before.replace('file://', ''),
});
data.append('sign_image', {
name: 'sign_img.jpg',
type: 'image/jpg',
uri:
Platform.OS === 'android' ? sign_img : sign_img.replace('file://', ''),
});
Object.keys(body).forEach((key) => {
data.append(key, body[key]);
});
return data;
};
const onPress = async () => {
const titles = ['loại thẻ', 'mã ngân hàng', 'số thẻ/tài khoản'];
const index = checkFormatArray([type, acc_type, account_no]);
console.log(props.route.params.body);
if (index === true) {
const data = createFormData(
props.route.params.img.urlBack,
props.route.params.img.urlFont,
props.route.params.img.urlSign,
{
uid: 17,
acc_type: 0,
account_no: '123465789',
bank_no: '970423',
...props.route.params.body,
},
);
const res = await verifyAccountApi(data);
console.log('Response', res.data);
} else {
Alert.alert('Vui lòng điền ' + titles[index]);
}
};
return (
<View
style={{
flex: 1,
paddingHorizontal: 10,
paddingTop: 10,
}}>
<TextField title={'Loại thẻ'} onChangeText={(val) => console.log(val)} />
<TextField title={'Số thẻ'} onChangeText={(val) => console.log(val)} />
<PickerDate title={'Ngày cấp'} />
<View style={styles.btnSend}>
<Button title={'Xác minh'} />
</View>
</View>
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View
style={{
flex: 1,
paddingHorizontal: 10,
paddingTop: 10,
}}>
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
}}>
Loi th
</Text>
<PickerItem
width={width - 20}
data={dataType}
onValueChange={(value, items) => {
setType(items);
}}
/>
<TextField
isNumber={true}
title={'Mã ngân hàng'}
onChangeText={(val) => setAccType(val)}
/>
<TextField
title={'Số thẻ/tài khoản'}
isNumber={true}
onChangeText={(val) => setAccountNo(val)}
/>
<View style={styles.btnSend}>
<Button title={'Xác minh'} onClick={onPress} />
</View>
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
......
......@@ -6,6 +6,9 @@ import {
TouchableOpacity,
StyleSheet,
Alert,
KeyboardAvoidingView,
ScrollView,
Platform,
} from 'react-native';
import R from '../../../assets/R';
......@@ -14,30 +17,29 @@ import TextMulti from '../../../components/Input/TextMulti';
import PickerDate from '../../../components/Picker/PickerDate';
import PickerImg from '../../../components/Picker/PickerImg';
import {checkFormatArray} from '../../../Config/Functions';
import {checkFormatArray, convertTime} from '../../../Config/Functions';
const GeneralInfor = (props) => {
const [email, setEmail] = useState('');
const [sponsorID, setSponsorID] = useState('');
const [lastName, setLastName] = useState('');
const [firstName, setFirstName] = useState('');
const [email, setEmail] = useState('');
const [phone, setPhone] = useState('');
const [adress, setAdress] = useState('');
const [address, setAdress] = useState('');
const [birth, setBirth] = useState(new Date());
const onNextPress = () => {
const titles = ['email', 'tên', 'họ', 'số điện thoại', 'địa chỉ'];
const index = checkFormatArray([email, lastName, firstName, phone, adress]);
console.log(props);
const titles = ['tên', 'họ', 'số điện thoại', 'địa chỉ'];
const index = checkFormatArray([lastName, firstName, phone, address]);
if (index === true) {
props.navigation.navigate('Profile', {
l_name: lastName,
f_name: firstName,
mobile: phone,
birthday: convertTime(birth),
address,
email,
lastName,
firstName,
phone,
adress,
sponsorID,
birth,
});
} else {
Alert.alert('Vui lòng điền ' + titles[index]);
......@@ -45,37 +47,50 @@ const GeneralInfor = (props) => {
};
return (
<View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}>
<TextField title={'Email'} onChangeText={(val) => setEmail(val)} />
<TextField
title={'Sponsor ID'}
onChangeText={(val) => setSponsorID(val)}
/>
<View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}>
<TextField title={'Tên'} onChangeText={(val) => setLastName(val)} />
</View>
<View style={{width: 20}} />
<View style={{flex: 1}}>
<TextField title={'Họ'} onChangeText={(val) => setFirstName(val)} />
</View>
</View>
<TextField
title={'Số điện thoại'}
onChangeText={(val) => setPhone(val)}
/>
<PickerDate
value={birth}
onValueChange={(val) => setBirth(val)}
title={'Ngày sinh'}
/>
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}>
<TextField title={'Email'} onChangeText={(val) => setEmail(val)} />
<View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}>
<TextField
title={'Tên'}
onChangeText={(val) => setLastName(val)}
/>
</View>
<View style={{width: 20}} />
<View style={{flex: 1}}>
<TextField
title={'Họ'}
onChangeText={(val) => setFirstName(val)}
/>
</View>
</View>
<TextField
isNumber={true}
title={'Số điện thoại'}
onChangeText={(val) => setPhone(val)}
/>
<PickerDate
value={birth}
onValueChange={(val) => setBirth(val)}
title={'Ngày sinh'}
/>
<TextMulti title={'Địa chỉ'} onChangeText={(val) => setAdress(val)} />
<TouchableOpacity onPress={onNextPress} style={styles.btnNext}>
<Image style={{width: 30, height: 30}} source={R.images.iconRight1} />
</TouchableOpacity>
<View style={{height: 100}} />
</View>
<TextMulti title={'Địa chỉ'} onChangeText={(val) => setAdress(val)} />
<TouchableOpacity onPress={onNextPress} style={styles.btnNext}>
<Image
style={{width: 30, height: 30}}
source={R.images.iconRight1}
/>
</TouchableOpacity>
<View style={{height: 100}} />
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
......
......@@ -6,63 +6,140 @@ import {
Image,
StyleSheet,
Alert,
KeyboardAvoidingView,
ScrollView,
Platform,
Dimensions,
} from 'react-native';
import PickerImgUni from '../../../components/Picker/PickerImgUni';
import R from '../../../assets/R';
import TextField from '../../../components/Input/TextField';
import {
checkFormatArray,
getFontXD,
convertTime,
} from '../../../Config/Functions';
import PickerDate from '../../../components/Picker/PickerDate';
import PickerItem from '../../../components/Picker/PickerItem';
const {width} = Dimensions.get('window');
import {checkFormatArray} from '../../../Config/Functions';
const dataType = [
{
value: '1',
name: 'Chứng minh nhân dân',
},
{
value: '2',
name: 'Hộ chiếu',
},
{
value: '3',
name: 'Căn cước công dân',
},
];
const Profile = (props) => {
const [urlFont, setUrlFont] = useState('');
const [urlBack, setUrlBack] = useState('');
const [urlSign, setUrlSign] = useState('');
const [cmnd, setCMND] = useState('');
const [date_range, setDate_range] = useState(new Date());
const [type, setType] = useState();
const onNextPress = () => {
const titles = ['CNND mặt trước', 'CMND mặt sau', 'chữ ký'];
const index = checkFormatArray([urlFont, urlBack, urlSign]);
const titles = [
'loại thẻ',
'số thẻ',
'ảnh CNND mặt trước',
'ảnh CMND mặt sau',
'ảnh chữ ký',
];
const index = checkFormatArray([type, cmnd, urlFont, urlBack, urlSign]);
if (index === true) {
props.navigation.navigate('BankInfor', {
urlFont,
urlBack,
urlSign,
...props.route.params,
body: {
cmnd,
card_type: type.value,
date_range: convertTime(date_range),
...props.route.params,
},
img: {
urlFont,
urlBack,
urlSign,
},
});
} else {
Alert.alert('Vui lòng thêm ảnh ' + titles[index]);
Alert.alert('Vui lòng thêm ' + titles[index]);
}
};
return (
<View
style={{
flex: 1,
paddingHorizontal: 10,
paddingTop: 10,
}}>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
flexWrap: 'wrap',
}}>
<PickerImgUni
onSelectImg={(path) => setUrlFont(path)}
title={'Ảnh mặt trước CMND'}
/>
<PickerImgUni
onSelectImg={(path) => setUrlBack(path)}
title={'Ảnh mặt sau CMND'}
/>
<PickerImgUni
onSelectImg={(path) => setUrlSign(path)}
title={'Ảnh chữ ký'}
/>
</View>
<TouchableOpacity onPress={onNextPress} style={styles.btnNext}>
<Image style={{width: 30, height: 30}} source={R.images.iconRight1} />
</TouchableOpacity>
</View>
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View
style={{
flex: 1,
paddingHorizontal: 10,
paddingTop: 10,
}}>
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
}}>
Loi th
</Text>
<PickerItem
width={width - 20}
data={dataType}
onValueChange={(value, items) => {
setType(items);
}}
/>
<TextField
isNumber={true}
title={'Số thẻ'}
onChangeText={(val) => setCMND(val)}
/>
<PickerDate
value={date_range}
onValueChange={(val) => setDate_range(val)}
title={'Ngày cấp'}
/>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
flexWrap: 'wrap',
}}>
<PickerImgUni
onSelectImg={(path) => setUrlFont(path)}
title={'Ảnh mặt trước CMND'}
/>
<PickerImgUni
onSelectImg={(path) => setUrlBack(path)}
title={'Ảnh mặt sau CMND'}
/>
<PickerImgUni
onSelectImg={(path) => setUrlSign(path)}
title={'Ảnh chữ ký'}
/>
</View>
<TouchableOpacity onPress={onNextPress} style={styles.btnNext}>
<Image
style={{width: 30, height: 30}}
source={R.images.iconRight1}
/>
</TouchableOpacity>
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
......
......@@ -4,6 +4,7 @@ import R from '../../../assets/R';
import HeaderBack from '../../../components/Header/HeaderBack';
import Item from './Item';
import {getListMethod} from '../../../apis/Functions/Deposit';
import {connect} from 'react-redux';
const MethodPayView = (props) => {
const [data, setData] = useState([]);
......@@ -36,13 +37,16 @@ const MethodPayView = (props) => {
justifyContent: 'space-between',
}}
data={data}
renderItem={({item}) => <Item item={item} />}
renderItem={({item}) => <Item userId={props.user.uid} item={item} />}
/>
</View>
</View>
);
};
const styles = StyleSheet.create({});
export default MethodPayView;
const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(MethodPayView);
......@@ -4,9 +4,9 @@ import {Alert, NativeEventEmitter} from 'react-native';
import DepositView from './DepositView';
const Deposit = (props) => {
const {method} = props.route.params;
const {method, userId} = props.route.params;
return <DepositView urlCheckout={method.checkout_url} />;
return <DepositView urlCheckout={method.checkout_url + '/' + userId} />;
};
export default Deposit;
......@@ -13,13 +13,13 @@ import {DEPOSIT} from '../../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native';
const Item = (props) => {
const {item} = props;
const {item, userId} = props;
const navigate = useNavigation();
return (
<TouchableOpacity
onPress={() => navigate.navigate(DEPOSIT, {method: item})}
onPress={() => navigate.navigate(DEPOSIT, {method: item, userId})}
style={styles.containerItem}>
<Image source={{uri: item.logo_url}} style={styles.imgIcon} />
<Text>{item.agent}</Text>
......
import React from 'react';
import {View, Text, FlatList} from 'react-native';
import React, {useState} from 'react';
import {View, Text, FlatList, TouchableOpacity, StyleSheet} from 'react-native';
import HeaderSB from '../../../components/Header/HeaderSB';
import Item from './Item';
import {getFontXD} from '../../../Config/Functions';
const Fillters = [
{
id: '1',
name: 'Tất cả',
value: 'all',
},
{
id: '4',
name: 'Rút tiền',
value: 'withdraw',
},
{
id: '5',
name: 'Nạp tiền',
value: 'deposit',
},
{
id: '6',
name: 'Chuyển khoản',
value: 'exchange',
},
];
const data = [
{
......@@ -43,10 +67,35 @@ const data = [
];
const HistoryView = (props) => {
const [selected, setSelected] = useState('1');
return (
<View style={{flex: 1}}>
<HeaderSB title={'LỊCH SỬ'} />
<View style={{flex: 1}}>
<View style={styles.headerContainer}>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal
data={Fillters}
keyExtractor={(item) => item.id}
renderItem={({item}) => (
<TouchableOpacity
onPress={() => setSelected(item.id)}
style={[
styles.itemFillter,
selected == item.id ? {borderColor: '#1473E6'} : null,
]}>
<Text
style={[
styles.txtFillter,
selected == item.id ? {color: '#1473E6'} : {},
]}>
{item.name}
</Text>
</TouchableOpacity>
)}
/>
</View>
<FlatList
keyExtractor={(item) => item.id}
data={data}
......@@ -57,4 +106,24 @@ const HistoryView = (props) => {
);
};
const styles = StyleSheet.create({
headerContainer: {
paddingVertical: 10,
backgroundColor: 'white',
},
itemFillter: {
borderRadius: 10,
paddingVertical: 5,
paddingHorizontal: 10,
borderWidth: 1,
borderColor: '#929292',
marginLeft: 15,
minWidth: 70,
},
txtFillter: {
fontSize: getFontXD(36),
color: '#929292',
},
});
export default HistoryView;
......@@ -53,7 +53,7 @@ const Item = (props) => {
fontWeight: 'bold',
color: '#F99D1D',
}}>
{toPriceVnd(item.money)}
{toPriceVnd(item.money)} Đ
</Text>
) : (
<Text
......@@ -62,7 +62,7 @@ const Item = (props) => {
fontWeight: 'bold',
color: '#1473E6',
}}>
{toPriceVnd(item.money)}
{toPriceVnd(item.money)} Đ
</Text>
)}
<Text style={styles.txt}>Hoàn tt</Text>
......
......@@ -29,14 +29,17 @@ const ConfirmEmail = (props) => {
platform: Platform.OS,
otp_by: value,
});
console.log(res.data);
props.hideLoading();
if (res.data.code == 200) {
navigate.navigate(CONFIRMOTP, {email: value});
} else {
Alert.alert(res.data.message);
setTimeout(() => {
Alert.alert('Thông báo', res.data.message);
}, 500);
}
} else {
Alert.alert('Vui lòng nhập email!');
Alert.alert('Thông báo', 'Vui lòng nhập email!');
}
};
......@@ -50,6 +53,7 @@ const ConfirmEmail = (props) => {
<TextInput
placeholderTextColor={R.colors.placeHolder}
style={styles.txtInput}
autoCapitalize="none"
placeholder="Nhập email"
value={value}
onChangeText={(val) => setValue(val)}
......
......@@ -41,9 +41,9 @@ const ConfirmOTP = (propsa) => {
const confirm = async () => {
if (!value) {
Alert.alert('Vui long nhập mã OTP');
Alert.alert('Thông báo', 'Vui long nhập mã OTP');
} else if (value.length != 4) {
Alert.alert('Mã OTP không đúng định dạng');
Alert.alert('Thông báo', 'Mã OTP không đúng định dạng');
} else {
propsa.showLoading();
const res = await verifyOTPApi({
......@@ -60,14 +60,14 @@ const ConfirmOTP = (propsa) => {
email: propsa.route.params.email,
});
} else {
Alert(res.data.message);
Alert.alert('Thông báo', res.data.message);
}
}
};
return (
<View style={{flex: 1}}>
<HeaderBack title={'Xác thưc OTP'} />
<HeaderBack title={'Xác thc OTP'} />
<View style={styles.container}>
<View style={{height: 20}} />
......@@ -102,7 +102,10 @@ const ConfirmOTP = (propsa) => {
<TouchableOpacity onPress={confirm} style={styles.btn}>
<Text style={styles.txtBtn}>Tiếp tc</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => console.log('Hello')}>
<TouchableOpacity
style={styles.wrapFooter}
onPress={() => console.log('Hello')}>
<Text style={styles.txtNote}>Mã OTP có hiu lc trong 5 phút.</Text>
<Text style={styles.txtSend}>Gi li</Text>
</TouchableOpacity>
</View>
......@@ -178,10 +181,19 @@ const styles = StyleSheet.create({
textTransform: 'uppercase',
},
txtSend: {
marginTop: 30,
fontSize: getFontXD(42),
color: '#1C6AF6',
},
wrapFooter: {
marginTop: 30,
flexDirection: 'row',
alignItems: 'center',
},
txtNote: {
color: '#A2A2A2',
fontSize: getFontXD(42),
fontStyle: 'italic',
},
});
const mapStateToProps = (state) => {
......
......@@ -35,14 +35,12 @@ const Login = (props) => {
const navigate = useNavigation();
const onSubmitLogin = async () => {
props.showLoading();
const titles = ['tên đăng nhập', 'mật khẩu'];
const index = checkFormatArray([email, pass]);
if (index === true) {
console.log('OK');
props.showLoading();
const firebase = await AsyncStorage.getItem(KEY.FIREBASE);
const res = await loginApi({
email,
password: pass,
......@@ -51,7 +49,6 @@ const Login = (props) => {
account_type: 'CUSTOMER',
});
console.log(res.data);
props.hideLoading();
if (res.data.code == 200 && res.data.data) {
AsyncStorage.setItem(KEY.TOKEN, res.data.data.token);
......@@ -61,10 +58,12 @@ const Login = (props) => {
routes: [{name: TABNAVIGATOR}],
});
} else {
Alert.alert(res.data.message);
setTimeout(() => {
Alert.alert('Thông báo', res.data.message);
}, 500);
}
} else {
Alert.alert('Vui lòng điền ' + titles[index]);
Alert.alert('Thông báo', 'Vui lòng điền ' + titles[index]);
}
};
......@@ -94,7 +93,7 @@ const Login = (props) => {
<TouchableOpacity
onPress={() => navigate.navigate(CONFIRMEMAIL)}
style={styles.forgotView}>
<Text style={styles.txtTitle}>Quên mt khu ?</Text>
<Text style={styles.txtTitle}>Quên mt khu?</Text>
</TouchableOpacity>
<View
......
......@@ -40,15 +40,18 @@ const NewPassword = (props) => {
});
props.hideLoading();
console.log(res.data);
if (res.data.code == 200) {
navigate.reset({
index: 1,
routes: [{name: AUTHEN}],
});
await setTimeout(() => {
Alert.alert('Thông báo!', 'Đổi mật khẩu thành công');
navigate.reset({
index: 1,
routes: [{name: AUTHEN}],
});
}, 500);
} else {
Alert.alert(res.data.message);
setTimeout(() => {
Alert.alert('Thông báo!', res.data.message);
}, 500);
}
}
};
......@@ -63,8 +66,9 @@ const NewPassword = (props) => {
<Text style={styles.txtTitle}>Vui lòng nhp mt khu mi</Text>
<TextInput
style={styles.txtInput}
placeholder="Nhập Email hoặc số điện thoại"
placeholder="Nhập mật khẩu mới"
placeholderTextColor={R.colors.placeHolder}
autoCapitalize="none"
value={password}
secureTextEntry={true}
onChangeText={(val) => setPassword(val)}
......@@ -74,7 +78,8 @@ const NewPassword = (props) => {
<Text style={styles.txtTitle}>Nhp li mt khu</Text>
<TextInput
style={styles.txtInput}
placeholder="Nhập Email hoặc số điện thoại"
autoCapitalize="none"
placeholder="Xác nhận lại mật khẩu mới"
value={cfPassword}
secureTextEntry={true}
placeholderTextColor={R.colors.placeHolder}
......
......@@ -23,27 +23,31 @@ const Registor = (props) => {
const [password_confirmation, setPasswordConfirm] = useState('');
const registorClick = async () => {
props.showLoading();
const titles = ['email', 'mật khẩu', 'xác nhận mật khẩu'];
const index = checkFormatArray([email, password, password_confirmation]);
if (index === true) {
props.showLoading();
const res = await registorApi({
email,
password,
platform: Platform.OS,
password_confirmation,
});
props.hideLoading();
if (res.data.code == 200 && res.data.data) {
Alert.alert('Đăng ký tài khoản thành công!');
navigation.navigate('LOGIN');
setTimeout(() => {
Alert.alert('Thông báo', 'Đăng ký tài khoản thành công!');
navigation.navigate('LOGIN');
}, 500);
} else {
Alert.alert('Thông báo!', res.data.message);
setTimeout(() => {
Alert.alert('Thông báo!', res.data.message);
}, 500);
}
} else {
Alert.alert('Thông báo!', 'Vui lòng điền ' + titles[index]);
}
props.hideLoading();
};
return (
......
......@@ -13,7 +13,7 @@ const Footer = (props) => {
</View>
<View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Doanh thu ca đội</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} VNĐ</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} Đ</Text>
</View>
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<Icon name={'right'} size={20} color={'#707070'} />
......@@ -26,7 +26,7 @@ const Footer = (props) => {
</View>
<View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Doanh thu nhà tài tr</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} VNĐ</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} Đ</Text>
</View>
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<Icon name={'right'} size={20} color={'#707070'} />
......@@ -38,8 +38,8 @@ const Footer = (props) => {
<Image source={R.images.moneyinvest} style={styles.imgIcon} />
</View>
<View style={{flex: 1, paddingHorizontal: 15}}>
<Text style={styles.txt}>Đầu t</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} VNĐ</Text>
<Text style={styles.txt}>Đầu tư</Text>
<Text style={styles.txtMoney}>$ {toPriceVnd(1500000)} Đ</Text>
</View>
<View style={{justifyContent: 'center', alignItems: 'center'}}>
<Icon name={'right'} size={20} color={'#707070'} />
......
......@@ -23,21 +23,15 @@ const HomeView = (props) => {
<View style={styles.row}>
<View style={styles.row}>
<View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Rút tin</Text>
<Text style={styles.txtMoney}>
{' '}
{toPriceVnd(1000000)} VNĐ{' '}
</Text>
<Text style={styles.txtTitle}>Np tin</Text>
<Text style={styles.txtMoney}> {toPriceVnd(1000000)} Đ </Text>
</View>
<View
style={{width: 0.5, backgroundColor: R.colors.borderGray}}
/>
<View style={styles.itemMenu}>
<Text style={styles.txtTitle}>My Payout</Text>
<Text style={styles.txtMoney}>
{' '}
{toPriceVnd(1000000)} VNĐ{' '}
</Text>
<Text style={styles.txtTitle}>Rút tin</Text>
<Text style={styles.txtMoney}> {toPriceVnd(1000000)} Đ </Text>
</View>
</View>
</View>
......@@ -45,18 +39,16 @@ const HomeView = (props) => {
<View style={styles.row}>
<View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Hoa hng</Text>
<Text style={styles.txtMoney1}>
+ {toPriceVnd(1000000)} VNĐ{' '}
</Text>
<Text style={styles.txtMoney1}>+ {toPriceVnd(1000000)} Đ </Text>
</View>
<View
style={{width: 0.5, backgroundColor: R.colors.borderGray}}
/>
<View style={styles.itemMenu}>
<Text style={styles.txtTitle}>Thưởng</Text>
<Text style={styles.txtTitle}>Li nhun</Text>
<Text style={styles.txtMoney1}>
{' '}
+ {toPriceVnd(1000000)} VNĐ{' '}
+ {toPriceVnd(1000000)} Đ{' '}
</Text>
</View>
</View>
......@@ -111,13 +103,13 @@ const styles = StyleSheet.create({
textTransform: 'uppercase',
},
txtMoney: {
fontSize: getFontXD(46),
fontSize: getFontXD(42),
color: R.colors.black,
marginTop: 5,
},
txtMoney1: {
fontSize: getFontXD(46),
color: '#FF6A7C',
fontSize: getFontXD(42),
color: '#2fbd04',
marginTop: 5,
},
});
......@@ -15,37 +15,29 @@ const Tab = createMaterialTopTabNavigator();
const ProfileView = (props) => {
return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView style={{flex: 1}} showsVerticalScrollIndicator={false}>
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Thông tin cá nhân'} />
<View>
<Tab.Navigator
initialRouteName="GeneralInfor"
tabBarOptions={{
inactiveTintColor: '#929292',
activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36)},
style: {backgroundColor: 'white'},
}}>
<Tab.Screen
name="GeneralInfor"
component={GeneralInfor}
options={{tabBarLabel: 'Thông tin chung'}}
/>
<Tab.Screen
name="CQG"
component={CQG}
options={{tabBarLabel: 'Tài khoản CQG'}}
/>
</Tab.Navigator>
</View>
</View>
</ScrollView>
</KeyboardAvoidingView>
<View style={{flex: 1}}>
<HeaderBack isWhite={true} title={'Thông tin cá nhân'} />
<Tab.Navigator
initialRouteName="GeneralInfor"
tabBarOptions={{
inactiveTintColor: '#929292',
activeTintColor: '#1473E6',
labelStyle: {fontSize: getFontXD(36)},
style: {backgroundColor: 'white'},
}}>
<Tab.Screen
name="GeneralInfor"
component={GeneralInfor}
options={{tabBarLabel: 'Thông tin chung'}}
/>
<Tab.Screen
name="CQG"
component={CQG}
options={{tabBarLabel: 'Tài khoản CQG'}}
/>
</Tab.Navigator>
</View>
);
};
......
......@@ -8,6 +8,9 @@ import {
Touchable,
TouchableOpacityBase,
Dimensions,
KeyboardAvoidingView,
ScrollView,
Platform,
} from 'react-native';
import R from '../../../../assets/R';
......@@ -34,70 +37,82 @@ const GeneralInfor = (props) => {
const [bank, setBank] = useState();
return (
<View style={styles.container}>
<TextField title={'Họ và tên'} onChangeText={(val) => console.log(val)} />
<TextField
title={'Điện thoại'}
onChangeText={(val) => console.log(val)}
/>
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView style={{flex: 1}} showsVerticalScrollIndicator={false}>
<View style={styles.container}>
<TextField
title={'Họ và tên'}
onChangeText={(val) => console.log(val)}
/>
<TextField
title={'Điện thoại'}
onChangeText={(val) => console.log(val)}
/>
<TextField title={'Email'} onChangeText={(val) => console.log(val)} />
{/*
<TextField title={'Email'} onChangeText={(val) => console.log(val)} />
{/*
<TextInput
style={styles.customTxt}
onChangeText={(val) => console.log(val)}
placeholder="0000"
/> */}
<View style={styles.status}>
<View
style={{
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
}}>
<View style={styles.customAdd}>
<Text style={{fontSize: getFontXD(42), color: '#929292'}}>+</Text>
</View>
<Text style={styles.txtTitle}>Trng thái</Text>
</View>
<View style={styles.status}>
<View
style={{
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
}}>
<View style={styles.customAdd}>
<Text style={{fontSize: getFontXD(42), color: '#929292'}}>
+
</Text>
</View>
<Text style={styles.txtTitle}>Trng thái</Text>
</View>
<Text style={{color: '#4FCD8D', fontSize: getFontXD(42)}}>
Đã xác minh
</Text>
</View>
<Text style={{color: '#4FCD8D', fontSize: getFontXD(42)}}>
Đã xác minh
</Text>
</View>
<View
style={{
borderTopWidth: 1,
borderTopColor: '#DBDBDB',
marginTop: 20,
paddingTop: 10,
}}>
<TextField
title={'Số tài khoản ngân hàng'}
onChangeText={(val) => console.log(val)}
placeHolder="Nhập số tài khoản ngân hàng"
/>
<View
style={{
borderTopWidth: 1,
borderTopColor: '#DBDBDB',
marginTop: 20,
paddingTop: 10,
}}>
<TextField
title={'Số tài khoản ngân hàng'}
onChangeText={(val) => console.log(val)}
placeHolder="Nhập số tài khoản ngân hàng"
/>
<Text style={styles.txtTitle}>Tên ngân hàng</Text>
<PickerItem
width={width - 20}
data={dataTest}
onValueChange={(value, items) => {
setBank(items);
}}
/>
</View>
<Text style={styles.txtTitle}>Tên ngân hàng</Text>
<PickerItem
width={width - 20}
data={dataTest}
onValueChange={(value, items) => {
setBank(items);
}}
/>
</View>
<View style={styles.footer}>
<TouchableOpacity
onPress={() => console.log('Hello')}
style={styles.btn}>
<Text style={styles.txtBtn}>Cp nht</Text>
</TouchableOpacity>
</View>
</View>
<View style={styles.footer}>
<TouchableOpacity
onPress={() => console.log('Hello')}
style={styles.btn}>
<Text style={styles.txtBtn}>Cp nht</Text>
</TouchableOpacity>
</View>
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
......
......@@ -10,7 +10,7 @@ const Item = (props) => {
return (
<TouchableOpacity onPress={() => console.log('HEllo')}>
<View style={styles.container}>
<Block flex={1} row center padding={[10, 10]}>
<Block flex={1} row center padding={[10, 20]}>
<Image source={item.image} style={styles.imgIcon} />
<Block padding={[0, 10]}>
<Text style={styles.txtBig}>{item.title}</Text>
......
import React from 'react';
import {View, Text, StyleSheet, TouchableOpacity, Image} from 'react-native';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
Alert,
} from 'react-native';
import {getFontXD, HEIGHTXD, WIDTHXD, toPriceVnd} from '../../Config/Functions';
import R from '../../assets/R';
import Block from '../../components/Block';
......@@ -8,7 +15,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
const Item = (props) => {
const {item} = props;
return (
<TouchableOpacity onPress={() => console.log('HEllo')}>
<TouchableOpacity onPress={() => Alert.alert('Hello')}>
<View style={styles.container}>
<Block flex={1} row>
<View style={styles.wrapLeft} />
......
import React from 'react';
import {View, Text, FlatList} from 'react-native';
import React, {useState} from 'react';
import {View, Text, FlatList, StyleSheet, TouchableOpacity} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
import HeaderDrawer from '../../components/Header/HeaderDrawer';
import Item from './Item';
import {getFontXD} from '../../Config/Functions';
const Fillters = [
{
id: '1',
name: 'Tất cả',
value: 'all',
},
{
id: '2',
name: 'Chưa đọc',
value: 'disable',
},
{
id: '3',
name: 'Đã đọc',
value: 'enable',
},
{
id: '4',
name: 'Rút tiền',
value: 'withdraw',
},
{
id: '5',
name: 'Nạp tiền',
value: 'deposit',
},
{
id: '6',
name: 'Chuyển khoản',
value: 'exchange',
},
];
const data = [
{
......@@ -28,10 +62,35 @@ const data = [
];
const NotificaitonView = (props) => {
const [selected, setSelected] = useState('1');
return (
<View style={{flex: 1}}>
<HeaderBack isWhite={false} title={'Thông báo'} />
<HeaderDrawer isWhite={false} title={'Thông báo'} />
<View style={styles.headerContainer}>
<FlatList
showsHorizontalScrollIndicator={false}
horizontal
data={Fillters}
keyExtractor={(item) => item.id}
renderItem={({item}) => (
<TouchableOpacity
onPress={() => setSelected(item.id)}
style={[
styles.itemFillter,
selected == item.id ? {borderColor: '#1473E6'} : null,
]}>
<Text
style={[
styles.txtFillter,
selected == item.id ? {color: '#1473E6'} : {},
]}>
{item.name}
</Text>
</TouchableOpacity>
)}
/>
</View>
<FlatList
keyExtractor={(item) => item.id}
data={data}
......@@ -41,4 +100,24 @@ const NotificaitonView = (props) => {
);
};
const styles = StyleSheet.create({
headerContainer: {
paddingVertical: 10,
backgroundColor: 'white',
},
itemFillter: {
borderRadius: 10,
paddingVertical: 5,
paddingHorizontal: 10,
borderWidth: 1,
borderColor: '#929292',
marginLeft: 15,
minWidth: 70,
},
txtFillter: {
fontSize: getFontXD(36),
color: '#929292',
},
});
export default NotificaitonView;
import {PostLogin, PostData} from '../helpers';
import {PostLogin, PostData, PostFormData} from '../helpers';
import url from '../url';
......@@ -31,3 +31,8 @@ export const forgotPasswordApi = async (body) =>
PostLogin(url.urlForgotPassword, body)
.then((res) => res)
.catch((err) => err);
export const verifyAccountApi = async (body) =>
PostFormData(url.urlVerifyAccount, body)
.then((res) => res)
.catch((err) => err);
......@@ -84,6 +84,34 @@ export async function PostData(url, json, isAuth = true) {
});
}
export async function PostFormData(url, data) {
const token = await AsyncStorage.getItem(KEY.TOKEN);
console.log(token);
let myRequest = {
method: 'post',
url,
headers: {
Accept: 'application/json',
'Content-Type': 'multipart/form-data',
Authorization: 'Bearer ' + token,
},
timeout: 30 * 1000,
data: data,
};
console.log('post data mobile', myRequest.data);
return await axios(myRequest)
.then((response) => response)
.then((response) => response)
.catch((error) => {
console.log(error.request);
const err = {
message: 'error',
status: error.request.status,
};
return err;
});
}
/**
*
* @param {*} url is link api
......
......@@ -7,4 +7,5 @@ export default {
urlVerifyOTP: root + 'api/auth/customer-verify-otp',
urlForgotPassword: root + 'api/auth/customer-forgot-password',
urlGetListWithDraw: root + 'api/v1/payments/get-list-withdraw-method',
urlVerifyAccount: root + 'api/v1/customers/verify-account',
};
......@@ -13,7 +13,7 @@ import {getFontXD, HEIGHTXD, WIDTHXD} from '../Config/Functions';
const Button = (props) => {
const {title, onClick} = props;
return (
<TouchableOpacity style={styles.container} onPress={() => onClick()}>
<TouchableOpacity style={styles.container} onPress={onClick}>
<ImageBackground
imageStyle={{
borderRadius: 20,
......
......@@ -3,6 +3,7 @@ import {View, Text, StyleSheet, Image, TouchableOpacity} from 'react-native';
import R from '../../assets/R';
import {HEIGHTXD, getFontXD, WIDTHXD} from '../../Config/Functions';
import Icon from 'react-native-vector-icons/MaterialIcons';
import AsyncStorage from '@react-native-community/async-storage';
import {
AccountVerification,
METHODPAY,
......@@ -10,6 +11,7 @@ import {
FEEDBACK,
SETTING,
NOTIFICATION,
AUTHEN,
} from '../../routers/ScreenNames';
import {useNavigation} from '@react-navigation/native';
......@@ -20,32 +22,27 @@ const menus = [
icon: R.images.iconUserCheck,
screen: AccountVerification,
},
{
id: '2',
title: 'Thông báo',
icon: R.images.noti,
screen: NOTIFICATION,
},
{
id: '3',
title: 'Cài đặt phương thức thanh toán',
icon: R.images.iconMethodPay,
screen: METHODPAY,
},
{
id: '4',
id: '3',
title: 'Liên hệ với dịch vụ khách hàng',
icon: R.images.iconPhone,
screen: SERVICECUSTOMER,
},
{
id: '5',
id: '4',
title: 'Phản hồi',
icon: R.images.iconMess,
screen: FEEDBACK,
},
{
id: '6',
id: '5',
title: 'Cài đặt',
icon: R.images.iconSetting,
screen: SETTING,
......@@ -77,7 +74,14 @@ const Drawer = (props) => {
</View>
<TouchableOpacity
onPress={() => console.log('Hello')}
onPress={() => {
AsyncStorage.clear();
props.toggleModal();
navigate.reset({
index: 1,
routes: [{name: AUTHEN}],
});
}}
style={styles.footer}>
<Icon name={'logout'} size={25} color={'#F81515'} />
<Text style={styles.txtTitle}>Đăng xut</Text>
......
import React, {useEffect} from 'react';
import React, {useEffect, useState} from 'react';
import {
View,
Text,
......@@ -9,12 +9,14 @@ import {
ImageBackground,
TouchableOpacity,
Platform,
Alert,
} from 'react-native';
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, toPriceVnd} from '../../Config/Functions';
import Clipboard from '@react-native-clipboard/clipboard';
import {useNavigation} from '@react-navigation/native';
import {
......@@ -23,10 +25,18 @@ import {
CHOOSEMETHOD,
TRANSFER,
HISTORY,
PROFILE,
} from '../../routers/ScreenNames';
const HeaderHome = (props) => {
const navigate = useNavigation();
const [sponsorID, setSponsorID] = useState('sponsorIDlink');
const copyToClipboard = () => {
Alert.alert('Đã sao chép!');
Clipboard.setString(sponsorID);
};
return (
<View style={styles.container}>
<ImageBackground style={styles.img} source={R.images.headerHome}>
......@@ -37,10 +47,13 @@ const HeaderHome = (props) => {
<View style={styles.containerInfor}>
<Image source={R.images.avartar} style={styles.imgAvatar} />
<View style={styles.wrapRight}>
<Text style={styles.txtName}>Vu Khac Minh</Text>
<TouchableOpacity onPress={() => navigate.navigate(PROFILE)}>
<Text style={styles.txtName}>Vu Khac Minh</Text>
</TouchableOpacity>
<View style={styles.row1}>
<Text style={styles.txtlink}>sponsorIDlink</Text>
<TouchableOpacity onPress={() => console.log('Hello')}>
<Text style={styles.txtlink}>{sponsorID}</Text>
<TouchableOpacity onPress={copyToClipboard}>
<Image
source={R.images.iconCopy}
style={styles.imgIconCopy}
......@@ -50,7 +63,7 @@ const HeaderHome = (props) => {
<View style={styles.row}>
<Text style={styles.txtMoney}> {toPriceVnd(1000000)}</Text>
<Text style={styles.txtTitle}> VNĐ</Text>
<Text style={styles.txtTitle}> Đ</Text>
</View>
</View>
</View>
......@@ -160,7 +173,7 @@ const styles = StyleSheet.create({
borderRadius: WIDTHXD(120),
},
txtMoney: {
fontSize: getFontXD(72),
fontSize: getFontXD(62),
color: '#FFB721',
marginVertical: 5,
fontWeight: 'bold',
......
......@@ -19,6 +19,7 @@ const InputComponent = (props) => {
<TextInput
placeholderTextColor={R.colors.placeHolder}
maxLength={maxLength}
autoCapitalize="none"
onChangeText={(val) => onChangeText(val)}
style={{
height: HEIGHTXD(89),
......
......@@ -21,6 +21,7 @@ const InputIcon = (props) => {
<Text>{title}</Text>
<TextInput
maxLength={maxLength}
autoCapitalize="none"
onChangeText={(val) => onChangeText(val)}
style={txtInput}
placeholderTextColor={R.colors.placeHolder}
......
......@@ -19,6 +19,7 @@ const TextField = (props) => {
<TextInput
maxLength={maxLength ? maxLength : 256}
placeholderTextColor={R.colors.placeHolder}
autoCapitalize="none"
value={value}
keyboardType={isNumber ? 'number-pad' : 'default'}
onChangeText={(val) => onChangeText(val)}
......
......@@ -22,6 +22,7 @@ const TextField = (props) => {
multiline={true}
numberOfLines={3}
placeholderTextColor={R.colors.placeHolder}
autoCapitalize="none"
style={{
color: 'black',
maxHeight: HEIGHTXD(259),
......
......@@ -36,6 +36,7 @@ const PickerImgUni = (props) => {
}).then((image) => {
setModalVisible(false);
setUrlImg(image.path);
console.log(image);
onSelectImg(image.path);
});
};
......@@ -46,6 +47,7 @@ const PickerImgUni = (props) => {
width: 300,
height: 400,
}).then((image) => {
console.log(image);
setModalVisible(false);
setUrlImg(image.path);
onSelectImg(image.path);
......
......@@ -12,7 +12,7 @@ import PlussModal from './PlussModal';
import Account from '../Screens/Account/Account';
import Exchange from '../Screens/Exchange/Exchange';
import NewFeed from '../Screens/NewFeed/NewFeed';
import Notification from '../Screens/Notification/Notification';
const Tab = createBottomTabNavigator();
const PayScreenComponent = () => {
......@@ -57,11 +57,15 @@ const TabNavigator = (props) => {
<Tab.Screen
name="Screen3"
component={Exchange}
component={Notification}
options={{
tabBarLabel: 'Giao dịch',
tabBarLabel: 'Thông báo',
tabBarIcon: ({color, size}) => (
<Icon name="chart-line" size={size} color={color} />
<Ionicons
name="ios-notifications-outline"
size={size}
color={color}
/>
),
}}
/>
......
......@@ -1033,6 +1033,11 @@
"@types/yargs" "^15.0.0"
chalk "^4.0.0"
"@react-native-clipboard/clipboard@^1.7.0":
version "1.7.0"
resolved "https://registry.yarnpkg.com/@react-native-clipboard/clipboard/-/clipboard-1.7.0.tgz#43320841870b82b2f311f375dd5f178da46e244e"
integrity sha512-i5dJgR+wM8Om+hFEB/PqNb65/x5WxpaZG+UjEBX2/gmmIrmAWI72tI9rVL1gjPA9RWNpdpzvp+ioGjpdl7MyWQ==
"@react-native-community/async-storage@^1.12.1":
version "1.12.1"
resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.12.1.tgz"
......
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