Commit a583e366 by Giang Tran

update code

parent 20961e98
...@@ -5,6 +5,5 @@ ...@@ -5,6 +5,5 @@
import {AppRegistry} from 'react-native'; import {AppRegistry} from 'react-native';
import App from './App'; import App from './App';
import {name as appName} from './app.json'; import {name as appName} from './app.json';
import Login from './src/Screens/NewFeed/Media/Login';
AppRegistry.registerComponent(appName, () => App); AppRegistry.registerComponent(appName, () => App);
import {Dimensions, Platform, Alert} from 'react-native'; import React from 'react';
import {Dimensions, Platform, Alert, Text} from 'react-native';
import moment from 'moment'; import moment from 'moment';
import _ from 'lodash'; import _ from 'lodash';
export const renderStatus = (status) => {
switch (status) {
case 2:
return (
<Text
style={{
color: '#F99D1D',
fontSize: getFontXD(42),
fontWeight: 'bold',
}}>
Ch xác minh
</Text>
);
case 3:
return (
<Text
style={{
color: '#17B217',
fontWeight: 'bold',
fontSize: getFontXD(42),
}}>
Đã xác minh
</Text>
);
default:
return (
<Text
style={{
color: '#929292',
fontWeight: 'bold',
fontSize: getFontXD(42),
}}>
Chưa xác minh
</Text>
);
}
};
export const NotificationAlert = (string) => { export const NotificationAlert = (string) => {
Alert.alert('Thông báo', string); Alert.alert('Thông báo', string);
}; };
...@@ -234,7 +273,7 @@ export const convertDate = (date) => { ...@@ -234,7 +273,7 @@ export const convertDate = (date) => {
}; };
export const convertTime = (date) => { export const convertTime = (date) => {
const temp = new Date(moment(date, 'DD/MM/YYYY')); const temp = new Date(moment(date));
const time = moment(temp).format('YYYY-MM-DD'); const time = moment(temp).format('YYYY-MM-DD');
return time; return time;
}; };
......
...@@ -6,7 +6,22 @@ const Contract = (props) => { ...@@ -6,7 +6,22 @@ const Contract = (props) => {
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Hợp đồng'} /> <HeaderBack title={'Hợp đồng'} />
<Text>Contract screen</Text> <View
style={{
flex: 1,
paddingHorizontal: 20,
justifyContent: 'center',
alignItems: 'center',
}}>
<Text
style={{
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
}}>
Tính năng đang được phát trin, vui lòng quay li sau!
</Text>
</View>
</View> </View>
); );
}; };
......
...@@ -10,9 +10,12 @@ import HeaderBack from '../../components/Header/HeaderBack'; ...@@ -10,9 +10,12 @@ import HeaderBack from '../../components/Header/HeaderBack';
import BankInfor from './Tab/BankInfor'; import BankInfor from './Tab/BankInfor';
import GeneralInfor from './Tab/GeneralInfor'; import GeneralInfor from './Tab/GeneralInfor';
import Profile from './Tab/Profile'; import Profile from './Tab/Profile';
import GeneralView from './TabView/GeneralView';
import ProfileView from './TabView/ProfileView';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs'; import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import {getFontXD} from '../../Config/Functions'; import {getFontXD} from '../../Config/Functions';
const Tab = createMaterialTopTabNavigator(); const Tab = createMaterialTopTabNavigator();
import {connect} from 'react-redux';
const AccountVerificationView = (props) => { const AccountVerificationView = (props) => {
return ( return (
...@@ -28,22 +31,22 @@ const AccountVerificationView = (props) => { ...@@ -28,22 +31,22 @@ const AccountVerificationView = (props) => {
}}> }}>
<Tab.Screen <Tab.Screen
name="GeneralInfor" name="GeneralInfor"
component={GeneralInfor} component={props.user.status == 2 ? GeneralInfor : GeneralView}
options={{tabBarLabel: 'Thông tin chung'}} options={{tabBarLabel: 'Thông tin chung'}}
/> />
<Tab.Screen <Tab.Screen
name="Profile" name="Profile"
component={Profile} component={props.user.status == 2 ? Profile : ProfileView}
options={{tabBarLabel: 'Hồ sơ'}} options={{tabBarLabel: 'Hồ sơ'}}
/> />
{/* <Tab.Screen
name="BankInfor"
component={BankInfor}
options={{tabBarLabel: 'Ngân hàng'}}
/> */}
</Tab.Navigator> </Tab.Navigator>
</View> </View>
); );
}; };
export default AccountVerificationView; const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(AccountVerificationView);
...@@ -23,16 +23,12 @@ import {checkFormatArray, convertTime} from '../../../Config/Functions'; ...@@ -23,16 +23,12 @@ import {checkFormatArray, convertTime} from '../../../Config/Functions';
const GeneralInfor = (props) => { const GeneralInfor = (props) => {
const [lastName, setLastName] = useState(''); const [lastName, setLastName] = useState('');
const [firstName, setFirstName] = useState(''); const [firstName, setFirstName] = useState('');
const [email, setEmail] = useState('');
const [phone, setPhone] = useState(''); const [phone, setPhone] = useState('');
const [address, setAdress] = useState(''); const [address, setAdress] = useState('');
const [birth, setBirth] = useState(new Date()); const [birth, setBirth] = useState(new Date());
const onNextPress = () => { const onNextPress = () => {
const titles = ['tên', 'họ', 'số điện thoại', 'địa chỉ']; const titles = ['họ và tên đệm', 'tên', 'số điện thoại', 'địa chỉ'];
const index = checkFormatArray([lastName, firstName, phone, address]); const index = checkFormatArray([lastName, firstName, phone, address]);
if (index === true) { if (index === true) {
props.navigation.navigate('Profile', { props.navigation.navigate('Profile', {
l_name: lastName, l_name: lastName,
...@@ -40,7 +36,6 @@ const GeneralInfor = (props) => { ...@@ -40,7 +36,6 @@ const GeneralInfor = (props) => {
mobile: phone, mobile: phone,
birthday: convertTime(birth), birthday: convertTime(birth),
address, address,
email,
}); });
} else { } else {
Alert.alert('Vui lòng điền ' + titles[index]); Alert.alert('Vui lòng điền ' + titles[index]);
...@@ -54,7 +49,6 @@ const GeneralInfor = (props) => { ...@@ -54,7 +49,6 @@ const GeneralInfor = (props) => {
keyboardVerticalOffset={-50}> keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}> <ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}> <View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}>
<TextField title={'Email'} onChangeText={(val) => setEmail(val)} />
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<TextField <TextField
...@@ -78,10 +72,7 @@ const GeneralInfor = (props) => { ...@@ -78,10 +72,7 @@ const GeneralInfor = (props) => {
<PickerDate <PickerDate
value={birth} value={birth}
onValueChange={(val) => { onValueChange={(val) => {
console.log(val); setBirth(val);
console.log('Value', convertTime(val));
// setBirth(new Date(moment(val).format('MM/DD/YYYY')).getTime());
}} }}
title={'Ngày sinh'} title={'Ngày sinh'}
/> />
......
...@@ -25,6 +25,8 @@ import { ...@@ -25,6 +25,8 @@ import {
import {verifyAccountApi} from '../../../apis/Functions/users'; import {verifyAccountApi} from '../../../apis/Functions/users';
import PickerDate from '../../../components/Picker/PickerDate'; import PickerDate from '../../../components/Picker/PickerDate';
import PickerItem from '../../../components/Picker/PickerItem'; import PickerItem from '../../../components/Picker/PickerItem';
import {saveUserToRedux} from '../../../actions/users';
const {width} = Dimensions.get('window'); const {width} = Dimensions.get('window');
const dataType = [ const dataType = [
...@@ -104,7 +106,9 @@ const Profile = (props) => { ...@@ -104,7 +106,9 @@ const Profile = (props) => {
props.hideLoading(); props.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
setTimeout(() => { setTimeout(() => {
props.saveUserToRedux(res.data.data);
Alert.alert('Thông báo!', res.data.message); Alert.alert('Thông báo!', res.data.message);
props.navigation.popToTop();
}, 500); }, 500);
} else { } else {
setTimeout(() => { setTimeout(() => {
...@@ -241,4 +245,8 @@ const mapStateToProps = (state) => { ...@@ -241,4 +245,8 @@ const mapStateToProps = (state) => {
user: state.userReducer, user: state.userReducer,
}; };
}; };
export default connect(mapStateToProps, {showLoading, hideLoading})(Profile); export default connect(mapStateToProps, {
showLoading,
hideLoading,
saveUserToRedux,
})(Profile);
import React, {useState} from 'react';
import {
View,
Text,
Image,
TouchableOpacity,
StyleSheet,
Alert,
KeyboardAvoidingView,
ScrollView,
Platform,
} from 'react-native';
import R from '../../../assets/R';
import moment from 'moment';
import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti';
import PickerDate from '../../../components/Picker/PickerDate';
import PickerImg from '../../../components/Picker/PickerImg';
import {
checkFormatArray,
convertTime,
convertDate,
renderStatus,
getFontXD,
} from '../../../Config/Functions';
import {connect} from 'react-redux';
const GeneralInfor = (props) => {
return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView showsVerticalScrollIndicator={false}>
<View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}>
<View
style={{
width: '100%',
paddingVertical: 10,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
}}>
<View style={{flex: 1}}>
<Text
style={{
fontSize: getFontXD(42),
color: R.colors.color777,
marginBottom: 5,
}}>
Trng thái
</Text>
</View>
<View style={{flex: 1}}>{renderStatus(props.user.status)}</View>
</View>
<View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}>
<TextField
editable={false}
value={props.user.l_name}
title={'Họ và tên đệm'}
/>
</View>
<View style={{width: 20}} />
<View style={{flex: 1}}>
<TextField
value={props.user.f_name}
editable={false}
title={'Tên'}
/>
</View>
</View>
<TextField
value={props.user.phone}
isNumber={true}
editable={false}
title={'Số điện thoại'}
/>
<PickerDate
valueString={convertDate(props.user.birthday)}
disabled={true}
title={'Ngày sinh'}
/>
<TextMulti
value={props.user.address}
editable={false}
title={'Địa chỉ'}
/>
<View style={{height: 100}} />
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
const styles = StyleSheet.create({
btnNext: {
borderRadius: 30,
backgroundColor: '#1473E6',
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
marginTop: 20,
alignSelf: 'flex-end',
elevation: 2,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 1,
},
shadowOpacity: 0.15,
shadowRadius: 1.84,
},
});
const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(GeneralInfor);
import React, {useState} from 'react';
import {
View,
Text,
TouchableOpacity,
Image,
StyleSheet,
Alert,
KeyboardAvoidingView,
ScrollView,
Platform,
Dimensions,
} from 'react-native';
import Button from '../../../components/Button';
import PickerImgUni from '../../../components/Picker/PickerImgUni';
import R from '../../../assets/R';
import TextField from '../../../components/Input/TextField';
import {connect} from 'react-redux';
import {showLoading, hideLoading} from '../../../actions/loadingAction';
import {
checkFormatArray,
getFontXD,
convertTime,
HEIGHTXD,
WIDTHXD,
} from '../../../Config/Functions';
import PickerDate from '../../../components/Picker/PickerDate';
const {width} = Dimensions.get('window');
const Item = (props) => {
return (
<View style={styles.container}>
<View style={{width: WIDTHXD(480), marginBottom: 5}}>
<Text style={styles.txtTitle}>{props.title}:</Text>
</View>
<View style={{justifycontent: 'center', alignItems: 'center'}}>
<Image style={styles.containerImg} source={{uri: props.linkImg}} />
</View>
</View>
);
};
const Profile = (props) => {
const renderType = (type) => {
switch (type) {
case 1:
return 'Chứng minh nhân dân';
case 2:
return 'Hộ chiếu';
default:
return 'Căn cước công dân';
}
};
return (
<KeyboardAvoidingView
behavior={Platform.Os === 'ios' ? 'padding' : 'height'}
style={{flex: 1}}
keyboardVerticalOffset={-50}>
<ScrollView style={{flex: 1}} showsVerticalScrollIndicator={false}>
<View
style={{
flex: 1,
paddingHorizontal: 10,
paddingTop: 10,
}}>
<TextField
value={renderType(props.user.card_type)}
editable={false}
title={'Loại thẻ'}
/>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
flexWrap: 'wrap',
flex: 1,
}}>
<Item
linkImg={props.user.identity_before}
title={'Ảnh mặt trước CMND/CCCD'}
/>
<Item
linkImg={props.user.identity_after}
title={'Ảnh mặt sau CMND/CCCD'}
/>
<Item linkImg={props.user.sign_img} title={'Ảnh mặt chữ ký'} />
</View>
</View>
</ScrollView>
</KeyboardAvoidingView>
);
};
const styles = StyleSheet.create({
container: {
marginTop: 10,
width: WIDTHXD(480),
alignItems: 'center',
},
btnSend: {
width: '100%',
marginBottom: 10,
},
txtTitle: {
fontSize: getFontXD(42),
color: R.colors.color777,
marginBottom: 5,
},
containerImg: {width: WIDTHXD(350), height: HEIGHTXD(320), borderRadius: 5},
});
const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {showLoading, hideLoading})(Profile);
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {View, Text} from 'react-native';
import {getFontXD} from '../../../Config/Functions';
import HeaderBack from '../../../components/Header/HeaderBack';
const BonusTeam = (props) => { const BonusTeam = (props) => {
return ( return (
<View> <View style={{flex: 1}}>
<Text>BonusTeam screen</Text> <HeaderBack title={'Tiền thưởng đội nhóm'} />
<View
style={{
flex: 1,
paddingHorizontal: 20,
justifyContent: 'center',
alignItems: 'center',
}}>
<Text
style={{
fontSize: getFontXD(52),
fontWeight: 'bold',
textAlign: 'center',
}}>
Tính năng đang được phát trin, vui lòng quay li sau!
</Text>
</View>
</View> </View>
); );
}; };
......
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {View, Text} from 'react-native';
import {getFontXD} from '../../../Config/Functions';
import HeaderBack from '../../../components/Header/HeaderBack';
const MyGroup = (props) => { const MyGroup = (props) => {
return ( return (
<View> <View style={{flex: 1}}>
<Text>MyGroup screen</Text> <HeaderBack title={'Tiền thưởng đội nhóm'} />
<View
style={{
flex: 1,
paddingHorizontal: 20,
justifyContent: 'center',
alignItems: 'center',
}}>
<Text
style={{
fontSize: getFontXD(52),
fontWeight: 'bold',
textAlign: 'center',
}}>
Tính năng đang được phát trin, vui lòng quay li sau!
</Text>
</View>
</View> </View>
); );
}; };
......
...@@ -31,7 +31,12 @@ const {width} = Dimensions.get('window'); ...@@ -31,7 +31,12 @@ const {width} = Dimensions.get('window');
import TextField from '../../../../components/Input/TextField'; import TextField from '../../../../components/Input/TextField';
import PickerItem from '../../../../components/Picker/PickerItem'; import PickerItem from '../../../../components/Picker/PickerItem';
import {getFontXD, HEIGHTXD, WIDTHXD} from '../../../../Config/Functions'; import {
getFontXD,
HEIGHTXD,
WIDTHXD,
renderStatus,
} from '../../../../Config/Functions';
import Icon from 'react-native-vector-icons/Ionicons'; import Icon from 'react-native-vector-icons/Ionicons';
const GeneralInfor = (props) => { const GeneralInfor = (props) => {
...@@ -84,9 +89,7 @@ const GeneralInfor = (props) => { ...@@ -84,9 +89,7 @@ const GeneralInfor = (props) => {
<View style={styles.status}> <View style={styles.status}>
<Text style={styles.txtTitle}>Trng thái</Text> <Text style={styles.txtTitle}>Trng thái</Text>
<Text style={{color: '#4FCD8D', fontSize: getFontXD(42)}}> {renderStatus(props.user.status)}
Đã xác minh
</Text>
</View> </View>
<PickerDate <PickerDate
......
import React, {Component} from 'react';
import {
View,
Text,
StyleSheet,
ImageBackground,
TouchableOpacity,
Image,
} from 'react-native';
import R from '../../../assets/R';
import LinearGradient from 'react-native-linear-gradient';
import {getFontXD} from '../../../Config/Functions';
import Block from '../../../components/Block';
import Icon from 'react-native-vector-icons/AntDesign';
const MediaView = (props) => {
return (
<ImageBackground
resizeMode={'center'}
style={styles.containerTop}
source={R.images.login_bg}>
<Text>Hello</Text>
</ImageBackground>
);
};
const styles = StyleSheet.create({
containerTop: {
height: '100%',
width: '100%',
backgroundColor: 'white',
},
contentTop: {
padding: 10,
flex: 1,
},
txtBig: {
fontSize: getFontXD(52),
color: R.colors.white,
fontWeight: 'bold',
},
containerBtn: {
paddingHorizontal: 15,
paddingVertical: 5,
backgroundColor: '#1C6AF6',
borderRadius: 5,
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 1.84,
elevation: 2,
},
txtPlay: {
color: R.colors.white,
fontSize: getFontXD(42),
fontWeight: 'bold',
marginLeft: 5,
},
txtDate: {
color: R.colors.white,
fontSize: getFontXD(42),
marginLeft: 5,
},
});
export default MediaView;
...@@ -55,7 +55,7 @@ const MediaDetail = (props) => { ...@@ -55,7 +55,7 @@ const MediaDetail = (props) => {
useEffect(() => { useEffect(() => {
getData(); getData();
}, [id]); }, [id]);
onChangeID = (item) => setID(item); const onChangeID = (item) => setID(item);
const getData = async () => { const getData = async () => {
const res = await getDetailMedia(id); const res = await getDetailMedia(id);
...@@ -65,7 +65,6 @@ const MediaDetail = (props) => { ...@@ -65,7 +65,6 @@ const MediaDetail = (props) => {
Alert.alert('Thông báo', 'Không lấy được dữ liệu!'); Alert.alert('Thông báo', 'Không lấy được dữ liệu!');
} }
}; };
return ( return (
<View style={{flex: 1}}> <View style={{flex: 1}}>
<HeaderBack title={'Chi tiết video'} /> <HeaderBack title={'Chi tiết video'} />
......
...@@ -37,9 +37,15 @@ const MediaView = (props) => { ...@@ -37,9 +37,15 @@ const MediaView = (props) => {
style={{flex: 1}}> style={{flex: 1}}>
<View style={{flex: 2}} /> <View style={{flex: 2}} />
<View style={styles.contentTop}> <View style={styles.contentTop}>
<Text numberOfLines={2} style={styles.txtBig}> <TouchableOpacity
{title} onPress={() =>
</Text> navigate.navigate(MEDIADETAIL, {id, video_id, title})
}>
<Text numberOfLines={2} style={styles.txtBig}>
{title}
</Text>
</TouchableOpacity>
<Block row space={'between'} padding={[10, 10]}> <Block row space={'between'} padding={[10, 10]}>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Icon <Icon
...@@ -88,6 +94,7 @@ const styles = StyleSheet.create({ ...@@ -88,6 +94,7 @@ const styles = StyleSheet.create({
fontSize: getFontXD(52), fontSize: getFontXD(52),
color: R.colors.white, color: R.colors.white,
fontWeight: 'bold', fontWeight: 'bold',
textDecorationLine: 'underline',
}, },
containerBtn: { containerBtn: {
paddingHorizontal: 15, paddingHorizontal: 15,
......
import React, {Component} from 'react'; import React, {Component} from 'react';
import {View, Text, FlatList} from 'react-native'; import {View, Text, FlatList} from 'react-native';
import {WebView} from 'react-native-webview';
import Item from './item'; import Item from './item';
const data = [
{
id: '1',
title:
'Vương quốc 1 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '2',
title:
'Vương quốc 2 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '3',
title:
'Vương quốc 3 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '4',
title:
'Vương quốc 4 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '5',
title:
'Vương quốc 5 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '6',
title:
'Vương quốc 6 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '7',
title:
'Vương quốc 7 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '8',
title:
'Vương quốc 8 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '9',
title:
'Vương quốc 9 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
{
id: '10',
title:
'Vương quốc 10 anh niềm tin tiêu dùng do Gfk công bố đạt -16,vượt mức dự đoán (-20) trong tháng ba',
time: '07:06',
date: '19 Mar 2021',
},
];
const NewFeed = (props) => { const NewFeed = (props) => {
return ( return (
...@@ -83,15 +9,12 @@ const NewFeed = (props) => { ...@@ -83,15 +9,12 @@ const NewFeed = (props) => {
style={{ style={{
flex: 1, flex: 1,
backgroundColor: 'white', backgroundColor: 'white',
paddingLeft: 10,
paddingRight: 20,
paddingTop: 10,
}}> }}>
<FlatList <WebView
data={data} style={{height: '100%', width: '100%'}}
showsVerticalScrollIndicator={false} source={{
keyExtractor={(item) => item.id} uri: 'http://api.dcvinvest.com/webview/tradingview/price',
renderItem={({item, index}) => <Item item={item} index={index} />} }}
/> />
</View> </View>
); );
......
...@@ -7,7 +7,7 @@ const Trading = (props) => { ...@@ -7,7 +7,7 @@ const Trading = (props) => {
<WebView <WebView
style={{height: '100%', width: '100%'}} style={{height: '100%', width: '100%'}}
source={{ source={{
uri: 'http://api.dcvinvest.com/webview/tradingview/chart', uri: 'http://api.dcvinvest.com/webview/tradingview/chart?height=400',
}} }}
/> />
</View> </View>
......
import React from 'react'; import React from 'react';
import {View, Text} from 'react-native'; import {View, Text} from 'react-native';
import HeaderBack from '../../components/Header/HeaderBack';
const ServiceCustomerView = (props) => { const ServiceCustomerView = (props) => {
return ( return (
<View> <View style={{flex: 1}}>
<Text>ServiceCustomerView screen</Text> <HeaderBack title={'Liên hệ vơi chúng tôi'} />
<View
style={{
flex: 1,
paddingHorizontal: 20,
justifyContent: 'center',
alignItems: 'center',
}}>
<Text
style={{
fontSize: 18,
fontWeight: 'bold',
textAlign: 'center',
}}>
Tính năng đang được phát trin, vui lòng quay li sau!
</Text>
</View>
</View> </View>
); );
}; };
......
...@@ -80,7 +80,6 @@ const Drawer = (props) => { ...@@ -80,7 +80,6 @@ const Drawer = (props) => {
<Image source={R.images.iconRight2} style={styles.imgIcon} /> <Image source={R.images.iconRight2} style={styles.imgIcon} />
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.body}> <View style={styles.body}>
{menus.map((e) => ( {menus.map((e) => (
<TouchableOpacity <TouchableOpacity
......
...@@ -49,7 +49,7 @@ const styles = StyleSheet.create({ ...@@ -49,7 +49,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -56,7 +56,7 @@ const styles = StyleSheet.create({ ...@@ -56,7 +56,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -45,6 +45,7 @@ export default connect(mapStateToProps, {})(HeaderHome); ...@@ -45,6 +45,7 @@ export default connect(mapStateToProps, {})(HeaderHome);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
headerContainer: { headerContainer: {
paddingTop: 10,
height: 55, height: 55,
backgroundColor: '#0047CC', backgroundColor: '#0047CC',
width: '100%', width: '100%',
......
...@@ -85,7 +85,7 @@ const styles = StyleSheet.create({ ...@@ -85,7 +85,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -82,7 +82,7 @@ const styles = StyleSheet.create({ ...@@ -82,7 +82,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -83,6 +83,7 @@ const styles = StyleSheet.create({ ...@@ -83,6 +83,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -108,6 +108,7 @@ const styles = StyleSheet.create({ ...@@ -108,6 +108,7 @@ const styles = StyleSheet.create({
}, },
headerContainer: { headerContainer: {
height: 55, height: 55,
paddingTop: 10,
width: '100%', width: '100%',
alignItems: 'center', alignItems: 'center',
flexDirection: 'row', flexDirection: 'row',
......
...@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions'; ...@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
const TextField = (props) => { const TextField = (props) => {
const {title, onChangeText, maxLength, isNumber, value} = props; const {title, onChangeText, maxLength, isNumber, value, editable} = props;
return ( return (
<View style={{marginVertical: 5}}> <View style={{marginVertical: 5}}>
...@@ -19,6 +19,7 @@ const TextField = (props) => { ...@@ -19,6 +19,7 @@ const TextField = (props) => {
<TextInput <TextInput
maxLength={maxLength ? maxLength : 256} maxLength={maxLength ? maxLength : 256}
placeholderTextColor={R.colors.placeHolder} placeholderTextColor={R.colors.placeHolder}
editable={editable != null ? editable : true}
autoCapitalize="none" autoCapitalize="none"
value={value} value={value}
keyboardType={isNumber ? 'number-pad' : 'default'} keyboardType={isNumber ? 'number-pad' : 'default'}
......
...@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions'; ...@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import R from '../../assets/R'; import R from '../../assets/R';
const TextField = (props) => { const TextField = (props) => {
const {title, onChangeText, maxLength, value} = props; const {title, onChangeText, maxLength, value, editable} = props;
return ( return (
<View style={{marginVertical: 5}}> <View style={{marginVertical: 5}}>
...@@ -19,6 +19,7 @@ const TextField = (props) => { ...@@ -19,6 +19,7 @@ const TextField = (props) => {
<TextInput <TextInput
maxLength={maxLength} maxLength={maxLength}
textAlign={'left'} textAlign={'left'}
editable={editable != null ? editable : true}
value={value} value={value}
onChangeText={(val) => onChangeText(val)} onChangeText={(val) => onChangeText(val)}
multiline={true} multiline={true}
......
...@@ -37,6 +37,7 @@ class PickerDate extends Component { ...@@ -37,6 +37,7 @@ class PickerDate extends Component {
render() { render() {
const { const {
valueString,
onValueChange, onValueChange,
value, value,
containerStyle, containerStyle,
...@@ -66,8 +67,10 @@ class PickerDate extends Component { ...@@ -66,8 +67,10 @@ class PickerDate extends Component {
<View <View
style={{ style={{
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'center', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
flex: 1,
paddingHorizontal: 10,
}}> }}>
<Text <Text
style={{ style={{
...@@ -76,9 +79,9 @@ class PickerDate extends Component { ...@@ -76,9 +79,9 @@ class PickerDate extends Component {
paddingVertical: 0, paddingVertical: 0,
marginRight: WIDTHXD(15), marginRight: WIDTHXD(15),
}}> }}>
{value !== null && value} {valueString}
</Text> </Text>
<Text>Hello</Text>
<Icon name={'calendar'} size={22} color={'#929292'} /> <Icon name={'calendar'} size={22} color={'#929292'} />
</View> </View>
) : ( ) : (
......
...@@ -36,7 +36,6 @@ const PickerImgUni = (props) => { ...@@ -36,7 +36,6 @@ const PickerImgUni = (props) => {
}).then((image) => { }).then((image) => {
setModalVisible(false); setModalVisible(false);
setUrlImg(image.path); setUrlImg(image.path);
console.log(image);
onSelectImg(image.path); onSelectImg(image.path);
}); });
}; };
...@@ -47,7 +46,6 @@ const PickerImgUni = (props) => { ...@@ -47,7 +46,6 @@ const PickerImgUni = (props) => {
width: 300, width: 300,
height: 400, height: 400,
}).then((image) => { }).then((image) => {
console.log(image);
setModalVisible(false); setModalVisible(false);
setUrlImg(image.path); setUrlImg(image.path);
onSelectImg(image.path); onSelectImg(image.path);
......
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