Commit 0b6c1cb8 by Giang Tran

reject verify

parent 282810a4
......@@ -62,6 +62,17 @@ export const renderStatus = (status) => {
}}
/>
);
case 4:
return (
<AppText
i18nKey={'RejectVerify'}
style={{
color: '#F99D1D',
fontSize: getFontXD(42),
fontWeight: 'bold',
}}
/>
);
case 3:
return (
<AppText
......
......@@ -33,12 +33,20 @@ const AccountVerificationView = (props) => {
}}>
<Tab.Screen
name="GeneralInfor"
component={props.user.status == 1 ? GeneralInfor : GeneralView}
component={
props.user.status == 1 || props.user.status == 4
? GeneralInfor
: GeneralView
}
options={{tabBarLabel: I18n.t('GeneralInformation')}}
/>
<Tab.Screen
name="Profile"
component={props.user.status == 1 ? Profile : ProfileView}
component={
props.user.status == 1 || props.user.status == 4
? Profile
: ProfileView
}
options={{tabBarLabel: I18n.t('Profile')}}
/>
</Tab.Navigator>
......
......@@ -13,7 +13,7 @@ import {
Keyboard,
} from 'react-native';
import R from '../../../assets/R';
import moment from 'moment';
import {connect} from 'react-redux';
import TextField from '../../../components/Input/TextField';
import TextMulti from '../../../components/Input/TextMulti';
......@@ -24,13 +24,21 @@ import I18n from '../../../helper/i18/i18n';
import {checkFormatArray, convertTime} from '../../../Config/Functions';
const GeneralInfor = (props) => {
const [lastName, setLastName] = useState('');
const [firstName, setFirstName] = useState('');
const [phone, setPhone] = useState('');
const [address, setAdress] = useState('');
const [birth, setBirth] = useState(new Date());
const [lastName, setLastName] = useState(props.user.l_name);
const [firstName, setFirstName] = useState(props.user.f_name);
const [phone, setPhone] = useState(props.user.phone);
const [address, setAdress] = useState(props.user.address);
const [birth, setBirth] = useState(new Date(props.user.birthday));
console.log('User', props.user);
const onNextPress = () => {
const titles = [I18n.t('FirstLastName').toLowerCase(), I18n.t('Name').toLowerCase(), I18n.t('PhoneNumber').toLowerCase(), I18n.t('Address').toLowerCase()];
const titles = [
I18n.t('FirstLastName').toLowerCase(),
I18n.t('Name').toLowerCase(),
I18n.t('PhoneNumber').toLowerCase(),
I18n.t('Address').toLowerCase(),
];
const index = checkFormatArray([lastName, firstName, phone, address]);
if (index === true) {
props.navigation.navigate('Profile', {
......@@ -59,6 +67,7 @@ const GeneralInfor = (props) => {
<View style={{flexDirection: 'row'}}>
<View style={{flex: 1}}>
<TextField
value={lastName}
title={I18n.t('FirstLastName')}
onChangeText={(val) => setLastName(val)}
/>
......@@ -66,12 +75,14 @@ const GeneralInfor = (props) => {
<View style={{width: 20}} />
<View style={{flex: 1}}>
<TextField
value={firstName}
title={I18n.t('Name')}
onChangeText={(val) => setFirstName(val)}
/>
</View>
</View>
<TextField
value={phone}
isNumber={true}
title={I18n.t('PhoneNumber')}
onChangeText={(val) => setPhone(val)}
......@@ -85,6 +96,7 @@ const GeneralInfor = (props) => {
/>
<TextMulti
value={address}
title={I18n.t('Address')}
onChangeText={(val) => setAdress(val)}
/>
......@@ -123,4 +135,9 @@ const styles = StyleSheet.create({
},
});
export default GeneralInfor;
const mapStateToProps = (state) => {
return {
user: state.userReducer,
};
};
export default connect(mapStateToProps, {})(GeneralInfor);
......@@ -48,11 +48,10 @@ const dataType = [
];
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 [urlFont, setUrlFont] = useState(props.user.identity_before);
const [urlBack, setUrlBack] = useState(props.user.identity_after);
const [urlSign, setUrlSign] = useState(props.user.sign_img);
const [type, setType] = useState();
const createFormData = (identity_after, identity_before, sign_img, body) => {
......@@ -172,14 +171,17 @@ const Profile = (props) => {
flex: 1,
}}>
<PickerImgUni
uriImage={urlFont}
onSelectImg={(path) => setUrlFont(path)}
title={I18n.t('IdentityCardFrontPhoto')}
/>
<PickerImgUni
uriImage={urlBack}
onSelectImg={(path) => setUrlBack(path)}
title={I18n.t('IdentityCardBackPhoto')}
/>
<PickerImgUni
uriImage={urlSign}
onSelectImg={(path) => setUrlSign(path)}
title={I18n.t('SignPhoto')}
/>
......
......@@ -36,6 +36,29 @@ import {
import PickerAvtart from '../../components/Picker/PickerAvatart';
const renderWallet = (status, current_money, current_cqg_money, contract) => {
const navigate = useNavigation();
if (status == 4)
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<TouchableOpacity
disabled={status == 2 ? true : false}
onPress={() => navigate.navigate(AccountVerification)}>
<ImageBackground
imageStyle={{borderRadius: 10}}
style={{
width: 320,
height: 60,
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
}}
source={R.images.iconBtnGreen}>
<AppText
i18nKey={'ReVerify'}
style={{fontSize: getFontXD(52), color: 'white'}}></AppText>
</ImageBackground>
</TouchableOpacity>
</View>
);
if (status == 6)
return (
<View style={{flex: 1, flexDirection: 'row'}}>
......@@ -185,7 +208,7 @@ const renderActions = (onClickDetail) => {
const HeaderHome = (props) => {
const navigate = useNavigation();
console.log('User--', props.user.status);
const [detail, setDetail] = useState(false);
const onClickDetail = () => {
......
......@@ -32,10 +32,10 @@ const options = {
};
const PickerImgUni = (props) => {
const {title, height, width, onSelectImg} = props;
const {title, height, width, onSelectImg, uriImage} = props;
const [isModalVisible, setModalVisible] = useState(false);
const [urlImg, setUrlImg] = useState('');
const [urlImg, setUrlImg] = useState(uriImage);
// const [imgPicker, setImgPicker] = useState('');
const checkPermissionAndroid = () => {
......
......@@ -227,4 +227,6 @@ export default {
WorkingTime: 'Working time:',
ContentRequire: 'Content require:',
FeedBackDCV: 'Feedback for DCV Invest',
ReVerify: 'Re-Verify',
RejectVerify: 'Reject verify',
};
......@@ -229,4 +229,6 @@ export default {
WorkingTime: 'Thời gian làm việc:',
ContentRequire: 'Nội dung yêu cầu:',
FeedBackDCV: 'Đánh giá dịch vụ của DCV Invest',
ReVerify: 'Xác minh lại',
RejectVerify: 'Từ chối xác minh',
};
......@@ -112,7 +112,10 @@ const TabNavigator = (props) => {
options={{
tabBarLabel: I18n.t('Tradding'),
tabBarIcon: ({color, size}) => (
<Image source={R.images.iconTransaction2} style={{width: size, height: size, tintColor: color}} />
<Image
source={R.images.iconTransaction2}
style={{width: size, height: size, tintColor: color}}
/>
),
}}
/>
......
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