Commit e9659596 by Giang Tran

update phone registor

parent 5bb75b8e
...@@ -24,10 +24,21 @@ const Registor = (props) => { ...@@ -24,10 +24,21 @@ const Registor = (props) => {
const [password, setPassword] = useState(''); const [password, setPassword] = useState('');
const [password_confirmation, setPasswordConfirm] = useState(''); const [password_confirmation, setPasswordConfirm] = useState('');
const [sponsor_id, setSponsor_id] = useState(''); const [sponsor_id, setSponsor_id] = useState('');
const [phone, setPhone] = useState('');
const registorClick = async () => { const registorClick = async () => {
const titles = ['email', I18n.t('Password').toLowerCase(), I18n.t('ConfirmPassword').toLowerCase()]; const titles = [
const index = checkFormatArray([email, password, password_confirmation]); 'email',
I18n.t('Password').toLowerCase(),
I18n.t('ConfirmPassword').toLowerCase(),
I18n.t('Phone').toLowerCase(),
];
const index = checkFormatArray([
email,
password,
password_confirmation,
phone,
]);
if (index === true) { if (index === true) {
let res; let res;
...@@ -39,6 +50,7 @@ const Registor = (props) => { ...@@ -39,6 +50,7 @@ const Registor = (props) => {
platform: Platform.OS, platform: Platform.OS,
password_confirmation, password_confirmation,
sponsor_id, sponsor_id,
phone,
}); });
} else { } else {
res = await registorApi({ res = await registorApi({
...@@ -46,6 +58,7 @@ const Registor = (props) => { ...@@ -46,6 +58,7 @@ const Registor = (props) => {
password, password,
platform: Platform.OS, platform: Platform.OS,
password_confirmation, password_confirmation,
phone,
}); });
} }
...@@ -99,11 +112,17 @@ const Registor = (props) => { ...@@ -99,11 +112,17 @@ const Registor = (props) => {
isPassWord={true} isPassWord={true}
/> />
<InputIcon <InputIcon
icon={R.images.iconPhone3}
title={'Phone'}
placeholder={I18n.t('Enter_Phone')}
onChangeText={(val) => setPhone(val)}
isNumber={true}
/>
<InputIcon
icon={R.images.iconIntroduct} icon={R.images.iconIntroduct}
title={'Code_introduce'} title={'Code_introduce'}
placeholder={I18n.t('EnterReferralCode')} placeholder={I18n.t('EnterReferralCode')}
onChangeText={(val) => setSponsor_id(val)} onChangeText={(val) => setSponsor_id(val)}
isPassWord={true}
/> />
<View <View
......
...@@ -84,9 +84,12 @@ const EscrowView = (props) => { ...@@ -84,9 +84,12 @@ const EscrowView = (props) => {
onEndReached={(info) => { onEndReached={(info) => {
onLoadMore(); onLoadMore();
}} }}
renderItem={({item}) => <Item item={item} renderItem={({item}) => (
onPress={(item) => navigate.navigate(PRODUCTDETAIL)}/>} <Item
item={item}
onPress={(item) => navigate.navigate(PRODUCTDETAIL)}
/>
)}
/> />
)} )}
</View> </View>
......
...@@ -13,6 +13,7 @@ const InputIcon = (props) => { ...@@ -13,6 +13,7 @@ const InputIcon = (props) => {
maxLength, maxLength,
isPassWord, isPassWord,
value, value,
isNumber,
} = props; } = props;
const {wrapLeft, wrapRight, container, iconImg, txtInput} = styles; const {wrapLeft, wrapRight, container, iconImg, txtInput} = styles;
return ( return (
...@@ -29,6 +30,7 @@ const InputIcon = (props) => { ...@@ -29,6 +30,7 @@ const InputIcon = (props) => {
placeholder={placeholder} placeholder={placeholder}
secureTextEntry={isPassWord} secureTextEntry={isPassWord}
value={value} value={value}
isNumber={isNumber}
/> />
</View> </View>
</View> </View>
......
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
Male: 'Male', Male: 'Male',
Status: 'Status', Status: 'Status',
Phone: 'Phone', Phone: 'Phone',
Enter_Phone: 'Enter phone',
Address: 'Address', Address: 'Address',
Update: 'Update', Update: 'Update',
ContactCode: 'Contact code', ContactCode: 'Contact code',
......
...@@ -219,4 +219,5 @@ export default { ...@@ -219,4 +219,5 @@ export default {
Price_List: 'Bảng phí', Price_List: 'Bảng phí',
Time_Transaction: 'Thời gian GD', Time_Transaction: 'Thời gian GD',
Due_Date: 'Lịch đáo hạn', Due_Date: 'Lịch đáo hạn',
Enter_Phone: 'Nhập số điện thoại',
}; };
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