Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
cebec552
Commit
cebec552
authored
Apr 26, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update laguage
parent
456d9095
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
315 additions
and
555 deletions
+315
-555
Info.plist
ios/Invest/Info.plist
+2
-0
Functions.js
src/Config/Functions.js
+28
-27
ContainerTop.js
src/Screens/Account/PacrtCQG/ContainerTop.js
+5
-3
Footer.js
src/Screens/Account/PacrtCQG/Footer.js
+8
-4
PacketCQG.js
src/Screens/Account/PacrtCQG/PacketCQG.js
+3
-24
BankInfor.js
src/Screens/AccountVerification/Tab/BankInfor.js
+4
-2
GeneralInfor.js
src/Screens/AccountVerification/Tab/GeneralInfor.js
+4
-1
Profile.js
src/Screens/AccountVerification/Tab/Profile.js
+4
-30
GeneralView.js
src/Screens/AccountVerification/TabView/GeneralView.js
+5
-4
TransferView.js
src/Screens/Action/Transfer/TransferView.js
+4
-21
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+4
-1
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+5
-5
WithdrawView.js
src/Screens/Action/Withdraw/WithdrawView.js
+2
-1
Authen.js
src/Screens/Authen/Authen.js
+3
-2
ConfirmOTP.js
src/Screens/Authen/ConfirmOTP.js
+5
-4
Login.js
src/Screens/Authen/Login.js
+12
-8
Registor.js
src/Screens/Authen/Registor.js
+12
-8
Home.js
src/Screens/Home/Home.js
+1
-2
HomeView.js
src/Screens/Home/HomeView.js
+4
-12
Menu.js
src/Screens/Home/Menu.js
+0
-201
Business.js
src/Screens/LegalDocument/Business.js
+5
-4
Customer.js
src/Screens/LegalDocument/Customer.js
+5
-4
Partner.js
src/Screens/LegalDocument/Partner.js
+5
-4
BonusTeam.js
src/Screens/Menu/BonusTeam/BonusTeam.js
+6
-6
Payments.js
src/Screens/Menu/Payments/Payments.js
+5
-20
GeneralInfor.js
src/Screens/Menu/Profile/Tab/GeneralInfor.js
+4
-1
Rose.js
src/Screens/Menu/Rose/Rose.js
+4
-57
AddMethod.js
src/Screens/MethodPay/AddMethod.js
+5
-5
MethodPay.js
src/Screens/MethodPay/MethodPay.js
+2
-1
MethodPayDetail.js
src/Screens/MethodPay/MethodPayDetail.js
+4
-1
Item.js
src/Screens/Notification/Item.js
+2
-5
Payment.js
src/Screens/Payment/Payment.js
+0
-34
ServiceCustomerView.js
src/Screens/ServiceCustomer/ServiceCustomerView.js
+5
-4
SettingView.js
src/Screens/Setting/SettingView.js
+34
-15
AsynStorage.js
src/assets/AsynStorage.js
+1
-0
InputIcon.js
src/components/Input/InputIcon.js
+1
-1
NoInternet.js
src/components/NoInternet.js
+7
-4
PickerImg.js
src/components/Picker/PickerImg.js
+7
-6
PickerImgUni.js
src/components/Picker/PickerImgUni.js
+8
-6
SnackBar.js
src/components/SnackBar.js
+3
-3
en.js
src/helper/i18/locales/en.js
+36
-1
vn.js
src/helper/i18/locales/vn.js
+36
-1
TabNavigation.js
src/routers/TabNavigation.js
+15
-12
No files found.
ios/Invest/Info.plist
View file @
cebec552
...
@@ -41,6 +41,8 @@
...
@@ -41,6 +41,8 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
NSCameraUsageDescription
<
/k
e
y
>
<
string
>
Accect
connect
camera
<
/string
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
string
><
/string
>
<
string
><
/string
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
...
...
src/Config/Functions.js
View file @
cebec552
...
@@ -9,6 +9,7 @@ import {
...
@@ -9,6 +9,7 @@ import {
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
I18n
from
'../helper/i18/i18n'
;
import
I18n
from
'../helper/i18/i18n'
;
import
AppText
from
'../components/AppText'
;
import
{
DETAILNEW
,
NOTIFICATION
}
from
'../routers/ScreenNames'
;
import
{
DETAILNEW
,
NOTIFICATION
}
from
'../routers/ScreenNames'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
...
@@ -50,58 +51,58 @@ export const renderStatus = (status) => {
...
@@ -50,58 +51,58 @@ export const renderStatus = (status) => {
switch
(
status
)
{
switch
(
status
)
{
case
2
:
case
2
:
return
(
return
(
<
Text
<
AppText
i18nKey
=
{
'WaitVerification'
}
style
=
{{
style
=
{{
color
:
'#F99D1D'
,
color
:
'#F99D1D'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
}}
>
}}
Ch
ờ
x
á
c
minh
/
>
<
/Text
>
);
);
case
3
:
case
3
:
return
(
return
(
<
Text
<
AppText
i18nKey
=
{
'Verified'
}
style
=
{{
style
=
{{
color
:
'#17B217'
,
color
:
'#17B217'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
}}
>
}}
Đã
x
á
c
minh
/
>
<
/Text
>
);
);
case
5
:
case
5
:
return
(
return
(
<
Text
<
AppText
i18nKey
=
{
'Request_Open_Account_CQG'
}
style
=
{{
style
=
{{
color
:
'#F99D1D'
,
color
:
'#F99D1D'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
}}
>
}}
Y
ê
u
c
ầ
u
m
ở
TK
CQG
/
>
<
/Text
>
);
);
case
6
:
case
6
:
return
(
return
(
<
Text
<
AppText
i18nKey
=
{
'EnableCQG'
}
style
=
{{
style
=
{{
color
:
R
.
colors
.
main
,
color
:
R
.
colors
.
main
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
}}
>
}}
C
ó
t
à
i
kho
ả
n
CQG
/
>
<
/Text
>
);
);
default
:
default
:
return
(
return
(
<
Text
<
AppText
i18nKey
=
{
'NotVerified'
}
style
=
{{
style
=
{{
color
:
'#929292'
,
color
:
'#929292'
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
}}
>
}}
Ch
ư
a
x
á
c
minh
/
>
<
/Text
>
);
);
}
}
};
};
...
@@ -116,11 +117,11 @@ export const confirmAlert = (title, callback) => {
...
@@ -116,11 +117,11 @@ export const confirmAlert = (title, callback) => {
title
,
title
,
[
[
{
{
text
:
'Hủy'
,
text
:
I18n
.
t
(
'Cancel'
)
,
style
:
'cancel'
,
style
:
'cancel'
,
},
},
{
{
text
:
'Đồng ý'
,
text
:
I18n
.
t
(
Ok
)
,
onPress
:
()
=>
{
onPress
:
()
=>
{
callback
();
callback
();
},
},
...
@@ -164,17 +165,17 @@ export const Gender = {
...
@@ -164,17 +165,17 @@ export const Gender = {
female
:
1
,
female
:
1
,
};
};
export
const
converType
=
(
type
)
=>
{
export
const
converType
=
(
type
)
=>
{
if
(
type
==
'DEPOSIT'
)
return
'Nạp tiền'
;
if
(
type
==
'DEPOSIT'
)
return
I18n
.
t
(
'Deposit'
)
;
return
'Rút tiền'
;
return
I18n
.
t
(
'Withdraw'
)
;
};
};
export
const
converStatus
=
(
status
)
=>
{
export
const
converStatus
=
(
status
)
=>
{
switch
(
status
)
{
switch
(
status
)
{
case
0
:
case
0
:
return
'Chờ xử lý'
;
return
I18n
.
t
(
'Waiting_for_Progress'
)
;
case
1
:
case
1
:
return
'Thành công'
;
return
I18n
.
t
(
'Success'
)
;
case
2
:
case
2
:
return
'Huỷ'
;
return
I18n
.
t
(
'Cancel'
)
;
}
}
};
};
...
...
src/Screens/Account/PacrtCQG/ContainerTop.js
View file @
cebec552
...
@@ -4,6 +4,7 @@ import HeaderBack from '../../../components/Header/HeaderBack';
...
@@ -4,6 +4,7 @@ import HeaderBack from '../../../components/Header/HeaderBack';
import
CheckBox
from
'@react-native-community/checkbox'
;
import
CheckBox
from
'@react-native-community/checkbox'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
{
getFontXD
,
toPriceVnd
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
toPriceVnd
}
from
'../../../Config/Functions'
;
import
AppText
from
'../../../components/AppText'
;
const
ContainerTop
=
(
props
)
=>
{
const
ContainerTop
=
(
props
)
=>
{
const
{
fee
}
=
props
;
const
{
fee
}
=
props
;
...
@@ -23,9 +24,10 @@ const ContainerTop = (props) => {
...
@@ -23,9 +24,10 @@ const ContainerTop = (props) => {
alignItems
:
'flex-end'
,
alignItems
:
'flex-end'
,
}}
>
}}
>
{
e
.
price_package
.
price
==
0
?
(
{
e
.
price_package
.
price
==
0
?
(
<
Text
style
=
{[
styles
.
txtMoney
,
{
color
:
'#18B918'
}]}
>
<
AppText
Mi
ễ
n
ph
í
i18nKey
=
{
'Free'
}
<
/Text
>
style
=
{[
styles
.
txtMoney
,
{
color
:
'#18B918'
}]}
/
>
)
:
(
)
:
(
<
Text
style
=
{
styles
.
txtMoney
}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
e
.
price_package
.
price
)}
{
toPriceVnd
(
e
.
price_package
.
price
)}
...
...
src/Screens/Account/PacrtCQG/Footer.js
View file @
cebec552
...
@@ -2,20 +2,24 @@ import React, {Component} from 'react';
...
@@ -2,20 +2,24 @@ import React, {Component} from 'react';
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Linking
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
TouchableOpacity
,
Linking
}
from
'react-native'
;
import
{
getFontXD
,
toPriceVnd
}
from
'../../../Config/Functions'
;
import
{
getFontXD
,
toPriceVnd
}
from
'../../../Config/Functions'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
AppText
from
'../../../components/AppText'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
Footer
=
(
props
)
=>
{
const
Footer
=
(
props
)
=>
{
return
(
return
(
<
View
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
,
marginTop
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
,
marginTop
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginVertical
:
5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginVertical
:
5
}}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
B
ạ
n
c
ó
th
ể
m
ở
t
à
i
kho
ả
n
th
ử
<
/Text
>
<
AppText
i18nKey
=
{
'Open_account_demo'
}
style
=
{
styles
.
txtTitle
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
onPress
=
{()
=>
Linking
.
openURL
(
'https://mdemo.cqg.com/cqg/desktop/demorequest'
)
Linking
.
openURL
(
'https://mdemo.cqg.com/cqg/desktop/demorequest'
)
}
>
}
>
<
Text
style
=
{
styles
.
txtLink
}
>
T
ạ
i
đâ
y
.
<
/Text
>
<
AppText
i18nKey
=
{
'Here'
}
style
=
{
styles
.
txtLink
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txtTitle
}
>
T
ạ
m
t
í
nh
:{
toPriceVnd
(
props
.
price
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtTitle
}
>
{
I18n
.
t
(
'Provisional'
)}:{
toPriceVnd
(
props
.
price
)}
<
/Text
>
<
View
<
View
style
=
{{
style
=
{{
justifyContent
:
'center'
,
justifyContent
:
'center'
,
...
@@ -26,7 +30,7 @@ const Footer = (props) => {
...
@@ -26,7 +30,7 @@ const Footer = (props) => {
onPress
=
{
props
.
onClick
}
onPress
=
{
props
.
onClick
}
onClick
onClick
style
=
{
styles
.
btnSend
}
>
style
=
{
styles
.
btnSend
}
>
<
Text
style
=
{
styles
.
txtSend
}
>
M
ở
t
à
i
kho
ả
n
<
/Text
>
<
AppText
i18nKey
=
{
'Open_account'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Account/PacrtCQG/PacketCQG.js
View file @
cebec552
...
@@ -12,30 +12,7 @@ import {getListPacketCQG, openCQG} from '../../../apis/Functions/packetCQG';
...
@@ -12,30 +12,7 @@ import {getListPacketCQG, openCQG} from '../../../apis/Functions/packetCQG';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
const
Item
=
()
=>
{
const
[
isSelected
,
setSelection
]
=
useState
(
false
);
return
(
<
View
style
=
{
styles
.
item
}
>
<
View
style
=
{{
flex
:
1
}}
>
<
Text
>
M
ở
t
à
i
kho
ả
n
giao
d
ị
ch
CQG
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
120
,
marginRight
:
30
,
alignItems
:
'flex-end'
,
}}
>
<
Text
style
=
{[
styles
.
txtMoney
,
{
color
:
'#18B918'
}]}
>
Mi
ễ
n
ph
í
<
/Text
>
<
/View
>
<
CheckBox
value
=
{
isSelected
}
onValueChange
=
{
setSelection
}
boxType
=
{
'square'
}
/
>
<
/View
>
);
};
const
PacketCQG
=
(
props
)
=>
{
const
PacketCQG
=
(
props
)
=>
{
const
[
listData
,
setListData
]
=
useState
([]);
const
[
listData
,
setListData
]
=
useState
([]);
...
@@ -60,6 +37,7 @@ const PacketCQG = (props) => {
...
@@ -60,6 +37,7 @@ const PacketCQG = (props) => {
props
.
hideLoading
();
props
.
hideLoading
();
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
...
@@ -236,4 +214,5 @@ const mapStateToProps = (state) => {
...
@@ -236,4 +214,5 @@ const mapStateToProps = (state) => {
export
default
connect
(
mapStateToProps
,
{
export
default
connect
(
mapStateToProps
,
{
showLoading
,
showLoading
,
hideLoading
,
hideLoading
,
saveUserToRedux
,
})(
PacketCQG
);
})(
PacketCQG
);
src/Screens/AccountVerification/Tab/BankInfor.js
View file @
cebec552
...
@@ -82,7 +82,6 @@ const BankInfor = (props) => {
...
@@ -82,7 +82,6 @@ const BankInfor = (props) => {
const
onPress
=
async
()
=>
{
const
onPress
=
async
()
=>
{
const
titles
=
[
'loại thẻ'
,
'mã ngân hàng'
,
'số thẻ/tài khoản'
];
const
titles
=
[
'loại thẻ'
,
'mã ngân hàng'
,
'số thẻ/tài khoản'
];
const
index
=
checkFormatArray
([
acc_type
,
bank_no
,
account_no
]);
const
index
=
checkFormatArray
([
acc_type
,
bank_no
,
account_no
]);
console
.
log
(
'Data'
,
props
.
route
.
params
.
body
);
if
(
index
===
true
)
{
if
(
index
===
true
)
{
const
data
=
createFormData
(
const
data
=
createFormData
(
...
@@ -114,7 +113,10 @@ const BankInfor = (props) => {
...
@@ -114,7 +113,10 @@ const BankInfor = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
...
src/Screens/AccountVerification/Tab/GeneralInfor.js
View file @
cebec552
...
@@ -41,7 +41,10 @@ const GeneralInfor = (props) => {
...
@@ -41,7 +41,10 @@ const GeneralInfor = (props) => {
address
,
address
,
});
});
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
...
src/Screens/AccountVerification/Tab/Profile.js
View file @
cebec552
...
@@ -119,39 +119,13 @@ const Profile = (props) => {
...
@@ -119,39 +119,13 @@ const Profile = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
// const onNextPress = () => {
// const titles = [
// 'loại thẻ',
// 'số thẻ',
// 'ảnh CNND mặt trước',
// 'ảnh CMND mặt sau',
// 'ảnh chữ ký',
// ];
// const index = checkFormatArray([urlFont, urlBack, urlSign]);
// if (index === true) {
// props.navigation.navigate('BankInfor', {
// 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 ' + titles[index]);
// }
// };
return
(
return
(
<
KeyboardAvoidingView
<
KeyboardAvoidingView
behavior
=
{
Platform
.
Os
===
'ios'
?
'padding'
:
'height'
}
behavior
=
{
Platform
.
Os
===
'ios'
?
'padding'
:
'height'
}
...
...
src/Screens/AccountVerification/TabView/GeneralView.js
View file @
cebec552
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
}
from
'react-native'
;
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
R
from
'../../../assets/R'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
AppText
from
'../../../components/AppText'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextField
from
'../../../components/Input/TextField'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
...
@@ -47,14 +48,14 @@ const GeneralInfor = (props) => {
...
@@ -47,14 +48,14 @@ const GeneralInfor = (props) => {
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
Text
<
AppText
i18nKey
=
{
'Status'
}
style
=
{{
style
=
{{
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
marginBottom
:
5
,
}}
>
}}
Tr
ạ
ng
th
á
i
/
>
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
}}
>
{
renderStatus
(
props
.
user
.
status
)}
<
/View
>
<
View
style
=
{{
flex
:
1
}}
>
{
renderStatus
(
props
.
user
.
status
)}
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Action/Transfer/TransferView.js
View file @
cebec552
...
@@ -5,6 +5,7 @@ import TextField from '../../../components/Input/TextField';
...
@@ -5,6 +5,7 @@ import TextField from '../../../components/Input/TextField';
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
Button
from
'../../../components/Button'
;
import
Button
from
'../../../components/Button'
;
import
{
HEIGHTXD
}
from
'../../../Config/Functions'
;
import
{
HEIGHTXD
}
from
'../../../Config/Functions'
;
import
AppText
from
'../../../components/AppText'
;
const
TransferView
=
(
props
)
=>
{
const
TransferView
=
(
props
)
=>
{
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
...
@@ -16,33 +17,15 @@ const TransferView = (props) => {
...
@@ -16,33 +17,15 @@ const TransferView = (props) => {
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
<
/Text
>
<
/View
>
{
/* <View style={{flex: 1, paddingHorizontal: 10, paddingTop: 10}}>
<TextField
onChangeText={(val) => consoele.log(val)}
title={'Số tiền'}
/>
<TextField
onChangeText={(val) => consoele.log(val)}
title={'Phương thức nạp'}
/>
<TextMulti
onChangeText={(val) => consoele.log(val)}
numberLines={3}
title={'Ghi chú'}
/
>
/
>
<
/View
>
<
/View
>
<View style={styles.containerBtn}>
<Button title={'Chuyển tiền'} />
</View> */
}
<
/View
>
<
/View
>
);
);
};
};
...
...
src/Screens/Action/Wallet/WalletDeposit.js
View file @
cebec552
...
@@ -56,7 +56,10 @@ const WalletDeposit = (props) => {
...
@@ -56,7 +56,10 @@ const WalletDeposit = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
return
(
return
(
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
cebec552
...
@@ -72,10 +72,7 @@ const WalletWithdraw = (props) => {
...
@@ -72,10 +72,7 @@ const WalletWithdraw = (props) => {
setData
(
newList
);
setData
(
newList
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
));
I18n
.
t
(
'Notification'
),
'Không lấy được danh sách phương thức!'
,
);
}
}
};
};
...
@@ -108,7 +105,10 @@ const WalletWithdraw = (props) => {
...
@@ -108,7 +105,10 @@ const WalletWithdraw = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
...
src/Screens/Action/Withdraw/WithdrawView.js
View file @
cebec552
...
@@ -5,6 +5,7 @@ import HeaderBack from '../../../components/Header/HeaderBack';
...
@@ -5,6 +5,7 @@ import HeaderBack from '../../../components/Header/HeaderBack';
import
Item
from
'./Item'
;
import
Item
from
'./Item'
;
import
{
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
WithdrawView
=
(
props
)
=>
{
const
WithdrawView
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
([]);
const
[
data
,
setData
]
=
useState
([]);
...
@@ -20,7 +21,7 @@ const WithdrawView = (props) => {
...
@@ -20,7 +21,7 @@ const WithdrawView = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
alert
(
'Không lấy được danh sách phương thức!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
...
...
src/Screens/Authen/Authen.js
View file @
cebec552
...
@@ -18,6 +18,7 @@ import Login from './Login';
...
@@ -18,6 +18,7 @@ import Login from './Login';
import
Registor
from
'./Registor'
;
import
Registor
from
'./Registor'
;
import
{
ScrollView
}
from
'react-native-gesture-handler'
;
import
{
ScrollView
}
from
'react-native-gesture-handler'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
{
width
,
height
}
=
Dimensions
.
get
(
'window'
);
const
{
width
,
height
}
=
Dimensions
.
get
(
'window'
);
...
@@ -51,12 +52,12 @@ const Authen = (props) => {
...
@@ -51,12 +52,12 @@ const Authen = (props) => {
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"LOGIN"
name
=
"LOGIN"
component
=
{
Login
}
component
=
{
Login
}
options
=
{{
tabBarLabel
:
'Đăng nhập'
}}
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Login'
)
}}
/
>
/
>
<
Tab
.
Screen
<
Tab
.
Screen
name
=
"REGISTOR"
name
=
"REGISTOR"
component
=
{
Registor
}
component
=
{
Registor
}
options
=
{{
tabBarLabel
:
'Đăng ký'
}}
options
=
{{
tabBarLabel
:
I18n
.
t
(
'Register'
)
}}
/
>
/
>
<
/Tab.Navigator
>
<
/Tab.Navigator
>
<
/ImageBackground
>
<
/ImageBackground
>
...
...
src/Screens/Authen/ConfirmOTP.js
View file @
cebec552
...
@@ -22,6 +22,7 @@ import {NEWPASSWORD} from '../../routers/ScreenNames';
...
@@ -22,6 +22,7 @@ import {NEWPASSWORD} from '../../routers/ScreenNames';
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
...
@@ -73,7 +74,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -73,7 +74,7 @@ const ConfirmOTP = (propsa) => {
<
View
style
=
{{
height
:
20
}}
/
>
<
View
style
=
{{
height
:
20
}}
/
>
<
View
style
=
{
styles
.
wrap
}
>
<
View
style
=
{
styles
.
wrap
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
M
ã
x
á
c
th
ự
c
:
<
/Text
>
<
AppText
i18nKey
=
{
'Verify_code'
}
style
=
{
styles
.
txtTitle
}
/
>
<
View
style
=
{
styles
.
containerCode
}
>
<
View
style
=
{
styles
.
containerCode
}
>
<
CodeField
<
CodeField
ref
=
{
ref
}
ref
=
{
ref
}
...
@@ -100,13 +101,13 @@ const ConfirmOTP = (propsa) => {
...
@@ -100,13 +101,13 @@ const ConfirmOTP = (propsa) => {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
footer
}
>
<
View
style
=
{
styles
.
footer
}
>
<
TouchableOpacity
onPress
=
{
confirm
}
style
=
{
styles
.
btn
}
>
<
TouchableOpacity
onPress
=
{
confirm
}
style
=
{
styles
.
btn
}
>
<
Text
style
=
{
styles
.
txtBtn
}
>
Ti
ế
p
t
ụ
c
<
/Text
>
<
AppText
i18nKey
=
{
'Continue'
}
style
=
{
styles
.
txtBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
wrapFooter
}
style
=
{
styles
.
wrapFooter
}
onPress
=
{()
=>
console
.
log
(
'Hello'
)}
>
onPress
=
{()
=>
navigate
.
goBack
(
)}
>
<
Text
style
=
{
styles
.
txtNote
}
>
M
ã
OTP
c
ó
hi
ệ
u
l
ự
c
trong
5
ph
ú
t
.
<
/Text
>
<
Text
style
=
{
styles
.
txtNote
}
>
M
ã
OTP
c
ó
hi
ệ
u
l
ự
c
trong
5
ph
ú
t
.
<
/Text
>
<
Text
style
=
{
styles
.
txtSend
}
>
G
ử
i
l
ạ
i
<
/Text
>
<
AppText
i18nKey
=
{
'Re_send'
}
style
=
{
styles
.
txtSend
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Authen/Login.js
View file @
cebec552
...
@@ -27,6 +27,7 @@ import {saveUserToRedux} from '../../actions/users';
...
@@ -27,6 +27,7 @@ import {saveUserToRedux} from '../../actions/users';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
messaging
from
'@react-native-firebase/messaging'
;
import
messaging
from
'@react-native-firebase/messaging'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
const
Login
=
(
props
)
=>
{
const
Login
=
(
props
)
=>
{
const
{
navigation
}
=
props
;
const
{
navigation
}
=
props
;
...
@@ -91,7 +92,10 @@ const Login = (props) => {
...
@@ -91,7 +92,10 @@ const Login = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
@@ -105,14 +109,14 @@ const Login = (props) => {
...
@@ -105,14 +109,14 @@ const Login = (props) => {
}}
>
}}
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconUser3
}
icon
=
{
R
.
images
.
iconUser3
}
title
=
{
'
Tên đăng nhập
'
}
title
=
{
'
Email
'
}
placeholder
=
{
'Nhập
tên đăng nhập
'
}
placeholder
=
{
'Nhập
email
'
}
onChangeText
=
{(
val
)
=>
setEmail
(
val
)}
onChangeText
=
{(
val
)
=>
setEmail
(
val
)}
value
=
{
email
}
value
=
{
email
}
/
>
/
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconLock
}
icon
=
{
R
.
images
.
iconLock
}
title
=
{
'
Mật khẩu
'
}
title
=
{
'
Password
'
}
placeholder
=
{
'Nhập mật khẩu'
}
placeholder
=
{
'Nhập mật khẩu'
}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
onChangeText
=
{(
val
)
=>
setPass
(
val
)}
onChangeText
=
{(
val
)
=>
setPass
(
val
)}
...
@@ -121,7 +125,7 @@ const Login = (props) => {
...
@@ -121,7 +125,7 @@ const Login = (props) => {
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
CONFIRMEMAIL
)}
onPress
=
{()
=>
navigate
.
navigate
(
CONFIRMEMAIL
)}
style
=
{
styles
.
forgotView
}
>
style
=
{
styles
.
forgotView
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
Qu
ê
n
m
ậ
t
kh
ẩ
u
?
<
/Text
>
<
AppText
i18nKey
=
{
'ForgotPassword'
}
style
=
{
styles
.
txtTitle
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
<
View
...
@@ -132,17 +136,17 @@ const Login = (props) => {
...
@@ -132,17 +136,17 @@ const Login = (props) => {
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
onSubmitLogin
(
email
,
pass
)}
onPress
=
{()
=>
onSubmitLogin
(
email
,
pass
)}
style
=
{
styles
.
wrapLogin
}
>
style
=
{
styles
.
wrapLogin
}
>
<
Text
style
=
{
styles
.
txtLogin
}
>
Đă
ng
nh
ậ
p
<
/Text
>
<
AppText
i18nKey
=
{
'Login'
}
style
=
{
styles
.
txtLogin
}
/
>
<
Image
source
=
{
R
.
images
.
iconRight1
}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{
R
.
images
.
iconRight1
}
style
=
{
styles
.
imgIcon
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
B
ạ
n
ch
ư
a
c
ó
t
à
i
kho
ả
n
?
<
/Text
>
<
AppText
i18nKey
=
{
'Have_account'
}
style
=
{
styles
.
txtTitle
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
navigation
.
navigate
(
'REGISTOR'
);
navigation
.
navigate
(
'REGISTOR'
);
}}
>
}}
>
<
Text
style
=
{
styles
.
txtRegistor
}
>
Đă
ng
k
ý
<
/Text
>
<
AppText
i18nKey
=
{
'Register'
}
style
=
{
styles
.
txtRegistor
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Authen/Registor.js
View file @
cebec552
...
@@ -15,6 +15,7 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
...
@@ -15,6 +15,7 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
registorApi
}
from
'../../apis/Functions/users'
;
import
{
registorApi
}
from
'../../apis/Functions/users'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
AppText
from
'../../components/AppText'
;
const
Registor
=
(
props
)
=>
{
const
Registor
=
(
props
)
=>
{
const
{
navigation
}
=
props
;
const
{
navigation
}
=
props
;
...
@@ -61,7 +62,10 @@ const Registor = (props) => {
...
@@ -61,7 +62,10 @@ const Registor = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
@@ -75,28 +79,28 @@ const Registor = (props) => {
...
@@ -75,28 +79,28 @@ const Registor = (props) => {
}}
>
}}
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconEmail
}
icon
=
{
R
.
images
.
iconEmail
}
title
=
{
'Email
đăng ký
'
}
title
=
{
'Email'
}
placeholder
=
{
'Nhập email'
}
placeholder
=
{
'Nhập email'
}
onChangeText
=
{(
val
)
=>
setEmail
(
val
)}
onChangeText
=
{(
val
)
=>
setEmail
(
val
)}
/
>
/
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconLock
}
icon
=
{
R
.
images
.
iconLock
}
title
=
{
'
Mật khẩu
'
}
title
=
{
'
Password
'
}
placeholder
=
{
'Nhập mật khẩu'
}
placeholder
=
{
'Nhập mật khẩu'
}
onChangeText
=
{(
val
)
=>
setPassword
(
val
)}
onChangeText
=
{(
val
)
=>
setPassword
(
val
)}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
/
>
/
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconLock
}
icon
=
{
R
.
images
.
iconLock
}
title
=
{
'
Nhập lại mật khẩu
'
}
title
=
{
'
Confirm_pass
'
}
placeholder
=
{
'Nhập mật khẩu'
}
placeholder
=
{
'Nhập mật khẩu'
}
onChangeText
=
{(
val
)
=>
setPasswordConfirm
(
val
)}
onChangeText
=
{(
val
)
=>
setPasswordConfirm
(
val
)}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
/
>
/
>
<
InputIcon
<
InputIcon
icon
=
{
R
.
images
.
iconIntroduct
}
icon
=
{
R
.
images
.
iconIntroduct
}
title
=
{
'
Mã giới thiệu
'
}
title
=
{
'
Code_introduce
'
}
placeholder
=
{
'Nhập mã giới thiệu nếu có'
}
placeholder
=
{
'Nhập mã giới thiệu nếu có'
}
onChangeText
=
{(
val
)
=>
setSponsor_id
(
val
)}
onChangeText
=
{(
val
)
=>
setSponsor_id
(
val
)}
isPassWord
=
{
true
}
isPassWord
=
{
true
}
...
@@ -108,17 +112,17 @@ const Registor = (props) => {
...
@@ -108,17 +112,17 @@ const Registor = (props) => {
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
TouchableOpacity
onPress
=
{
registorClick
}
style
=
{
styles
.
wrapLogin
}
>
<
TouchableOpacity
onPress
=
{
registorClick
}
style
=
{
styles
.
wrapLogin
}
>
<
Text
style
=
{
styles
.
txtLogin
}
>
Đă
ng
k
ý
<
/Text
>
<
AppText
i18nKey
=
{
'Register'
}
style
=
{
styles
.
txtLogin
}
/
>
<
Image
source
=
{
R
.
images
.
iconRight1
}
style
=
{
styles
.
imgIcon
}
/
>
<
Image
source
=
{
R
.
images
.
iconRight1
}
style
=
{
styles
.
imgIcon
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
B
ạ
n
đã
c
ó
t
à
i
kho
ả
n
?
<
/Text
>
<
AppText
i18nKey
=
{
'Account_already'
}
style
=
{
styles
.
txtTitle
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
navigation
.
navigate
(
'LOGIN'
);
navigation
.
navigate
(
'LOGIN'
);
}}
>
}}
>
<
Text
style
=
{
styles
.
txtRegistor
}
>
Đă
ng
nh
ậ
p
<
/Text
>
<
AppText
i18nKey
=
{
'Login'
}
style
=
{
styles
.
txtRegistor
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Home/Home.js
View file @
cebec552
...
@@ -11,7 +11,6 @@ import {AccountVerification, PACKETCQG} from '../../routers/ScreenNames';
...
@@ -11,7 +11,6 @@ import {AccountVerification, PACKETCQG} from '../../routers/ScreenNames';
const
Home
=
(
props
)
=>
{
const
Home
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
({
total_deposit
:
0
,
total_withdraw
:
0
});
const
[
data
,
setData
]
=
useState
({
total_deposit
:
0
,
total_withdraw
:
0
});
const
navigate
=
useNavigation
();
useEffect
(()
=>
{
useEffect
(()
=>
{
getData
();
getData
();
},
[]);
},
[]);
...
@@ -20,7 +19,7 @@ const Home = (props) => {
...
@@ -20,7 +19,7 @@ const Home = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Không lấy được thông tin!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
...
...
src/Screens/Home/HomeView.js
View file @
cebec552
...
@@ -25,9 +25,7 @@ const HomeView = (props) => {
...
@@ -25,9 +25,7 @@ const HomeView = (props) => {
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
AppText
i18nKey
=
{
'Deposit'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Deposit'
}
style
=
{
styles
.
txtTitle
}
/
>
N
ạ
p
ti
ề
n
<
/AppText
>
<
Text
style
=
{
styles
.
txtMoney
}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
' '
}
{
total_deposit
==
0
?
0
:
toPriceVnd
(
total_deposit
)}
Đ
{
' '
}
{
total_deposit
==
0
?
0
:
toPriceVnd
(
total_deposit
)}
Đ
{
' '
}
...
@@ -37,9 +35,7 @@ const HomeView = (props) => {
...
@@ -37,9 +35,7 @@ const HomeView = (props) => {
style
=
{{
width
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
style
=
{{
width
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
/
>
/
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
AppText
i18nKey
=
{
'Withdraw'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Withdraw'
}
style
=
{
styles
.
txtTitle
}
/
>
R
ú
t
ti
ề
n
<
/AppText
>
<
Text
style
=
{
styles
.
txtMoney
}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
' '
}
{
' '
}
{
total_withdraw
==
0
?
0
:
toPriceVnd
(
total_withdraw
)}
Đ
{
' '
}
{
total_withdraw
==
0
?
0
:
toPriceVnd
(
total_withdraw
)}
Đ
{
' '
}
...
@@ -50,16 +46,12 @@ const HomeView = (props) => {
...
@@ -50,16 +46,12 @@ const HomeView = (props) => {
<
View
style
=
{{
height
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
/
>
<
View
style
=
{{
height
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
/
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
AppText
i18nKey
=
{
'Rose'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Rose'
}
style
=
{
styles
.
txtTitle
}
/
>
Hoa
h
ồ
ng
<
/AppText
>
<
Text
style
=
{
styles
.
txtMoney1
}
>
0
Đ
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney1
}
>
0
Đ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
width
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
/
>
<
View
style
=
{{
width
:
0.5
,
backgroundColor
:
R
.
colors
.
borderGray
}}
/
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
View
style
=
{
styles
.
itemMenu
}
>
<
AppText
i18nKey
=
{
'Profit'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Profit'
}
style
=
{
styles
.
txtTitle
}
/
>
L
ợ
i
nhu
ậ
n
<
/AppText
>
<
Text
style
=
{
styles
.
txtMoney1
}
>
0
Đ
<
/Text
>
<
Text
style
=
{
styles
.
txtMoney1
}
>
0
Đ
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/Screens/Home/Menu.js
deleted
100644 → 0
View file @
456d9095
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
View
,
Text
,
Image
,
StatusBar
,
StyleSheet
,
SafeAreaView
,
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
I18n
from
'../../helper/i18/i18n'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
WITHDRAW
,
DEPOSIT
,
CHOOSEMETHOD
,
TRANSFER
,
HISTORY
,
PROFILE
,
}
from
'../../routers/ScreenNames'
;
const
HeaderHome
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
[
sponsorID
,
setSponsorID
]
=
useState
(
'sponsorIDlink'
);
const
copyToClipboard
=
()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Đã sao chép!'
);
Clipboard
.
setString
(
sponsorID
);
};
return
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
style
=
{
styles
.
containerTop
}
>
<
View
style
=
{
styles
.
containerInfor
}
>
<
Image
source
=
{
R
.
images
.
avartar
}
style
=
{
styles
.
imgAvatar
}
/
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
PROFILE
)}
>
<
Text
style
=
{
styles
.
txtName
}
>
Vu
Khac
Minh
<
/Text
>
<
/TouchableOpacity
>
<
View
style
=
{
styles
.
row1
}
>
<
Text
style
=
{
styles
.
txtlink
}
>
{
sponsorID
}
<
/Text
>
<
TouchableOpacity
onPress
=
{
copyToClipboard
}
>
<
Image
source
=
{
R
.
images
.
iconCopy
}
style
=
{
styles
.
imgIconCopy
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtMoney
}
>
{
toPriceVnd
(
1000000
)}
<
/Text
>
<
Text
style
=
{
styles
.
txtTitle
}
>
Đ
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
containerMenu
}
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
CHOOSEMETHOD
)}
style
=
{
styles
.
wraper
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconRecharge
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
N
ạ
p
ti
ề
n
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
WITHDRAW
)}
style
=
{
styles
.
wraper
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconWithdrawal
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
R
ú
t
ti
ề
n
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
TRANSFER
)}
style
=
{
styles
.
wraper
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconTransfer
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
Chuy
ể
n
kho
ả
n
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
HISTORY
)}
style
=
{
styles
.
wraper
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconHistory
}
/
>
<
Text
style
=
{
styles
.
txt
}
>
L
ị
ch
s
ử
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
);
};
const
mapStateToProps
=
(
state
)
=>
{
return
{
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
HeaderHome
);
const
styles
=
StyleSheet
.
create
({
img
:
{
height
:
Platform
.
OS
==
'ios'
?
HEIGHTXD
(
728
)
:
HEIGHTXD
(
808
),
width
:
'100%'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
containerTop
:
{
height
:
HEIGHTXD
(
856
),
width
:
'90%'
,
backgroundColor
:
'white'
,
borderRadius
:
10
,
shadowColor
:
'#000'
,
shadowOffset
:
{
width
:
0
,
height
:
1
,
},
shadowOpacity
:
0.25
,
shadowRadius
:
2.84
,
elevation
:
3
,
},
containerMenu
:
{
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
flexDirection
:
'row'
,
padding
:
10
,
},
wraper
:
{
justifyContent
:
'center'
,
alignItems
:
'center'
,
},
imgIcon
:
{
width
:
WIDTHXD
(
134
),
height
:
HEIGHTXD
(
134
),
marginBottom
:
10
,
resizeMode
:
'contain'
,
},
imgIconCopy
:
{
width
:
WIDTHXD
(
134
),
height
:
HEIGHTXD
(
134
),
resizeMode
:
'contain'
,
},
txt
:
{
fontSize
:
getFontXD
(
36
),
color
:
R
.
colors
.
txtMain
,
},
txtName
:
{
fontSize
:
getFontXD
(
52
),
color
:
'#00359C'
,
},
txtlink
:
{
fontSize
:
getFontXD
(
42
),
color
:
'#A2A2A2'
,
},
imgAvatar
:
{
width
:
WIDTHXD
(
240
),
height
:
WIDTHXD
(
240
),
borderRadius
:
WIDTHXD
(
120
),
},
txtMoney
:
{
fontSize
:
getFontXD
(
62
),
color
:
'#FFB721'
,
marginVertical
:
5
,
fontWeight
:
'bold'
,
},
txtTitle
:
{
fontSize
:
getFontXD
(
42
),
color
:
'#A2A2A2'
,
fontWeight
:
'bold'
,
marginTop
:
5
,
marginLeft
:
5
,
},
wrapRight
:
{
flex
:
1
,
paddingHorizontal
:
20
,
},
containerInfor
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
borderBottomWidth
:
1
,
borderBottomColor
:
'#EDEDF1'
,
flexDirection
:
'row'
,
paddingHorizontal
:
20
,
},
row
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
marginTop
:
5
,
},
row1
:
{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
,
},
});
src/Screens/LegalDocument/Business.js
View file @
cebec552
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
AppText
from
'../../components/AppText'
;
const
Business
=
(
props
)
=>
{
const
Business
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
...
@@ -11,14 +12,14 @@ const Business = (props) => {
...
@@ -11,14 +12,14 @@ const Business = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'GeneralBusiness'
}
/
>
<
HeaderBack
title
=
{
'GeneralBusiness'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/LegalDocument/Customer.js
View file @
cebec552
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
AppText
from
'../../components/AppText'
;
const
Customer
=
(
props
)
=>
{
const
Customer
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
...
@@ -11,14 +12,14 @@ const Customer = (props) => {
...
@@ -11,14 +12,14 @@ const Customer = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'Customer'
}
/
>
<
HeaderBack
title
=
{
'Customer'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/LegalDocument/Partner.js
View file @
cebec552
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
...
@@ -4,6 +4,7 @@ import R from '../../assets/R';
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
AppText
from
'../../components/AppText'
;
const
Partner
=
(
props
)
=>
{
const
Partner
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
...
@@ -11,14 +12,14 @@ const Partner = (props) => {
...
@@ -11,14 +12,14 @@ const Partner = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'Partnership'
}
/
>
<
HeaderBack
title
=
{
'Partnership'
}
/
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Menu/BonusTeam/BonusTeam.js
View file @
cebec552
...
@@ -3,6 +3,7 @@ import {View, Text} from 'react-native';
...
@@ -3,6 +3,7 @@ import {View, Text} from 'react-native';
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
PickerSearch
from
'../../../components/Picker/PickerSearch'
;
import
PickerSearch
from
'../../../components/Picker/PickerSearch'
;
import
AppText
from
'../../../components/AppText'
;
const
BonusTeam
=
(
props
)
=>
{
const
BonusTeam
=
(
props
)
=>
{
return
(
return
(
...
@@ -15,15 +16,14 @@ const BonusTeam = (props) => {
...
@@ -15,15 +16,14 @@ const BonusTeam = (props) => {
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
getFontXD
(
52
)
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
{
/* <PickerSearch
{
/* <PickerSearch
findData={() => {
findData={() => {
console.log('Call api');
console.log('Call api');
...
...
src/Screens/Menu/Payments/Payments.js
View file @
cebec552
...
@@ -2,22 +2,7 @@ import React from 'react';
...
@@ -2,22 +2,7 @@ import React from 'react';
import
{
View
,
FlatList
,
Text
}
from
'react-native'
;
import
{
View
,
FlatList
,
Text
}
from
'react-native'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
Item
from
'./Item'
;
import
Item
from
'./Item'
;
import
AppText
from
'../../../components/AppText'
;
const
data
=
[
{
id
:
'1'
,
time
:
'20/02/2021'
,
money
:
5000000
,
content
:
'Mua kim loại ở sàn CBOT'
,
},
{
id
:
'2'
,
time
:
'20/02/2021'
,
money
:
8000000
,
content
:
'Nhà đầu tư vẫn thu được lợi nhuận ngay cả khi thị trường đi xuống do có thể bán trước'
,
},
];
const
Payments
=
(
props
)
=>
{
const
Payments
=
(
props
)
=>
{
return
(
return
(
...
@@ -25,14 +10,14 @@ const Payments = (props) => {
...
@@ -25,14 +10,14 @@ const Payments = (props) => {
<
HeaderBack
isWhite
=
{
false
}
title
=
{
'Payments'
}
/
>
<
HeaderBack
isWhite
=
{
false
}
title
=
{
'Payments'
}
/
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
{
/* <FlatList
{
/* <FlatList
keyExtractor={(item) => item.id}
keyExtractor={(item) => item.id}
...
...
src/Screens/Menu/Profile/Tab/GeneralInfor.js
View file @
cebec552
...
@@ -57,7 +57,10 @@ const GeneralInfor = (props) => {
...
@@ -57,7 +57,10 @@ const GeneralInfor = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
...
src/Screens/Menu/Rose/Rose.js
View file @
cebec552
...
@@ -6,59 +6,6 @@ import TextMoney from '../../../components/Input/InputMoney';
...
@@ -6,59 +6,6 @@ import TextMoney from '../../../components/Input/InputMoney';
import
{
toPriceVnd
,
numberFormat
}
from
'../../../Config/Functions'
;
import
{
toPriceVnd
,
numberFormat
}
from
'../../../Config/Functions'
;
import
{
changeLanguage
}
from
'../../../actions/language'
;
import
{
changeLanguage
}
from
'../../../actions/language'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
const
data
=
[
{
id
:
'1'
,
month
:
2
,
day
:
'20'
,
name
:
'Nạp tiền'
,
money
:
10000000
,
note
:
'Ghi chú nap tiền để đầu tư'
,
status
:
1
,
date
:
'20/02/2021'
,
},
{
id
:
'2'
,
month
:
2
,
day
:
'20'
,
name
:
'Nạp tiền'
,
money
:
2000000
,
note
:
'Ghi chú nap tiền để đầu tư'
,
status
:
1
,
date
:
'20/02/2021'
,
},
{
id
:
'3'
,
month
:
2
,
day
:
'20'
,
name
:
'Nạp tiền'
,
money
:
3000000
,
note
:
'Ghi chú nap tiền để đầu tư'
,
status
:
1
,
date
:
'20/02/2021'
,
},
{
id
:
'4'
,
month
:
2
,
day
:
'20'
,
name
:
'Nạp tiền'
,
money
:
4000000
,
note
:
'Ghi chú nap tiền để đầu tư'
,
status
:
1
,
date
:
'20/02/2021'
,
},
{
id
:
'5'
,
month
:
2
,
day
:
'20'
,
name
:
'Nạp tiền'
,
money
:
9000000
,
note
:
'Ghi chú nap tiền để đầu tư'
,
status
:
1
,
date
:
'20/02/2021'
,
},
];
import
AppText
from
'../../../components/AppText'
;
import
AppText
from
'../../../components/AppText'
;
const
Rose
=
(
props
)
=>
{
const
Rose
=
(
props
)
=>
{
...
@@ -73,14 +20,14 @@ const Rose = (props) => {
...
@@ -73,14 +20,14 @@ const Rose = (props) => {
<
AppText
i18nKey
=
{
'SetLanguage'
}
><
/AppText
>
<
AppText
i18nKey
=
{
'SetLanguage'
}
><
/AppText
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
{
/* <View style={{flex: 1}}>
{
/* <View style={{flex: 1}}>
<FlatList
<FlatList
...
...
src/Screens/MethodPay/AddMethod.js
View file @
cebec552
...
@@ -48,10 +48,7 @@ const AddMethodPay = (props) => {
...
@@ -48,10 +48,7 @@ const AddMethodPay = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
));
I18n
.
t
(
'Notification'
),
'Không lấy được danh sách ngân hàng!'
,
);
}
}
};
};
...
@@ -89,7 +86,10 @@ const AddMethodPay = (props) => {
...
@@ -89,7 +86,10 @@ const AddMethodPay = (props) => {
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
}
}
};
};
...
...
src/Screens/MethodPay/MethodPay.js
View file @
cebec552
...
@@ -3,6 +3,7 @@ import React, {useState, useEffect} from 'react';
...
@@ -3,6 +3,7 @@ import React, {useState, useEffect} from 'react';
import
MethodPayView
from
'./MethodPayView'
;
import
MethodPayView
from
'./MethodPayView'
;
import
{
getListWidthDraw
}
from
'../../apis/Functions/Widthdraw'
;
import
{
getListWidthDraw
}
from
'../../apis/Functions/Widthdraw'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
MethodPay
=
(
props
)
=>
{
const
MethodPay
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
([]);
const
[
data
,
setData
]
=
useState
([]);
...
@@ -25,7 +26,7 @@ const MethodPay = (props) => {
...
@@ -25,7 +26,7 @@ const MethodPay = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
alert
(
'Không lấy được danh sách phương thức thanh toán!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
...
...
src/Screens/MethodPay/MethodPayDetail.js
View file @
cebec552
...
@@ -73,7 +73,10 @@ const MethodPayDetail = (props) => {
...
@@ -73,7 +73,10 @@ const MethodPayDetail = (props) => {
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Không có gì thay đổi'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Không có gì thay đổi'
);
}
}
}
else
}
else
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Please_fill_in'
)
+
titles
[
index
],
);
};
};
const
onRemove
=
async
()
=>
{
const
onRemove
=
async
()
=>
{
...
...
src/Screens/Notification/Item.js
View file @
cebec552
...
@@ -10,12 +10,10 @@ import {
...
@@ -10,12 +10,10 @@ import {
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
HEIGHTXD
,
WIDTHXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
Block
from
'../../components/Block'
;
import
Block
from
'../../components/Block'
;
import
Icon
from
'react-native-vector-icons/MaterialCommunityIcons'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
{
item
}
=
props
;
const
{
item
}
=
props
;
return
(
return
(
<
TouchableOpacity
onPress
=
{()
=>
Alert
.
alert
(
'Hello'
)}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
Block
flex
=
{
1
}
row
>
<
Block
flex
=
{
1
}
row
>
<
View
style
=
{
styles
.
wrapLeft
}
/
>
<
View
style
=
{
styles
.
wrapLeft
}
/
>
...
@@ -25,14 +23,13 @@ const Item = (props) => {
...
@@ -25,14 +23,13 @@ const Item = (props) => {
<
Block
padding
=
{[
5
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
Block
padding
=
{[
5
,
10
]}
space
=
{
'between'
}
flex
=
{
1
}
>
<
View
style
=
{{
justifyContent
:
'center'
,
flex
:
1
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
flex
:
1
}}
>
<
Text
numberOfLines
=
{
2
}
style
=
{
styles
.
txtBlack
}
>
<
Text
numberOfLines
=
{
2
}
style
=
{
styles
.
txtBlack
}
>
N
ạ
p
ti
ề
n
th
à
nh
c
ô
ng
v
ớ
i
s
ố
l
ượ
ng
:
750.000
{
item
.
body
}
<
/Text
>
<
/Text
>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
txt
}
>
10
:
52
09
/
04
/
2021
<
/Text
>
<
Text
style
=
{
styles
.
txt
}
>
{
item
.
pushed_at
}
<
/Text
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/Block
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
);
);
};
};
...
...
src/Screens/Payment/Payment.js
View file @
cebec552
...
@@ -18,40 +18,6 @@ import create_payment_link from './setup';
...
@@ -18,40 +18,6 @@ import create_payment_link from './setup';
const
Payment
=
(
props
)
=>
{
const
Payment
=
(
props
)
=>
{
const
[
text
,
setText
]
=
useState
(
'OpenSDK'
);
const
[
text
,
setText
]
=
useState
(
'OpenSDK'
);
// console.log('Link create payment');
// useEffect(() => {
// // mở sdk
// eventEmitter.addListener('PaymentBack', (e) => {
// console.log('Sdk back!');
// // Đã available trên cả ios, android
// if (e) {
// switch (e.resultCode) {
// case 0:
// console.log('Sdk closed');
// break;
// case -1:
// console.log('Người dùng nhấn back từ sdk để quay lại');
// break;
// case 10: //ios
// console.log(
// 'Người dùng nhấn chọn thanh toán qua app thanh toán (Mobile Banking, Ví...)',
// );
// break;
// case 99:
// console.log(
// 'Người dùng nhấn back từ trang thanh toán thành công khi thanh toán qua thẻ khi gọi đến http://sdk.merchantbackapp',
// );
// }
// }
// });
// return () => {
// // khi tắt sdk
// eventEmitter.removeAllListeners('PaymentBack');
// };
// }, []);
return
(
return
(
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
TouchableOpacity
<
TouchableOpacity
...
...
src/Screens/ServiceCustomer/ServiceCustomerView.js
View file @
cebec552
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
}
from
'react-native'
;
import
{
View
,
Text
}
from
'react-native'
;
import
AppText
from
'../../components/AppText'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
...
@@ -14,14 +15,14 @@ const ServiceCustomerView = (props) => {
...
@@ -14,14 +15,14 @@ const ServiceCustomerView = (props) => {
justifyContent
:
'center'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
}}
>
}}
>
<
Text
<
AppText
i18nKey
=
{
'Features_develop'
}
style
=
{{
style
=
{{
fontSize
:
18
,
fontSize
:
18
,
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
textAlign
:
'center'
,
textAlign
:
'center'
,
}}
>
}}
T
í
nh
n
ă
ng
đ
ang
đượ
c
ph
á
t
tri
ể
n
,
vui
l
ò
ng
quay
l
ạ
i
sau
!
/
>
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Setting/SettingView.js
View file @
cebec552
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
View
,
Text
,
Switch
,
StyleSheet
}
from
'react-native'
;
import
{
View
,
Text
,
Switch
,
StyleSheet
}
from
'react-native'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
Block
from
'../../components/Block'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../components/Picker/PickerItem'
;
import
AppText
from
'../../components/AppText'
;
const
dataTest
=
[
import
{
changeLanguage
}
from
'../../actions/language'
;
import
{
connect
}
from
'react-redux'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
import
KEY
from
'../../assets/AsynStorage'
;
const
dataLanguage
=
[
{
{
value
:
'
1
'
,
value
:
'
vi
'
,
name
:
'Vietnamese'
,
name
:
'Vietnamese'
,
},
},
{
{
value
:
'
2
'
,
value
:
'
en
'
,
name
:
'English'
,
name
:
'English'
,
},
},
];
];
...
@@ -19,12 +22,21 @@ const dataTest = [
...
@@ -19,12 +22,21 @@ const dataTest = [
const
SettingView
=
(
props
)
=>
{
const
SettingView
=
(
props
)
=>
{
const
[
isEnabled
,
setIsEnabled
]
=
useState
(
true
);
const
[
isEnabled
,
setIsEnabled
]
=
useState
(
true
);
const
toggleSwitch
=
()
=>
setIsEnabled
((
previousState
)
=>
!
previousState
);
const
toggleSwitch
=
()
=>
setIsEnabled
((
previousState
)
=>
!
previousState
);
const
[
language
,
setLanguage
]
=
useState
(
dataTest
[
0
].
name
);
const
[
language
,
setLanguage
]
=
useState
();
useEffect
(()
=>
{
convertLanguage
();
},
[]);
const
convertLanguage
=
()
=>
{
const
temp
=
dataLanguage
.
filter
((
e
)
=>
e
.
value
==
props
.
language
.
language
);
setLanguage
(
temp
[
0
].
name
);
};
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
{
'Setting'
}
/
>
<
HeaderBack
title
=
{
'Setting'
}
/
>
<
View
style
=
{{
flex
:
1
,
padding
:
10
}}
>
<
View
style
=
{{
flex
:
1
,
padding
:
10
}}
>
<
View
style
=
{
styles
.
row
}
>
{
/*
<View style={styles.row}>
<Text style={styles.txtTitle}>Bật thông báo</Text>
<Text style={styles.txtTitle}>Bật thông báo</Text>
<Switch
<Switch
trackColor={{false: '#DBDBDB', true: '#1C6AF6'}}
trackColor={{false: '#DBDBDB', true: '#1C6AF6'}}
...
@@ -33,28 +45,27 @@ const SettingView = (props) => {
...
@@ -33,28 +45,27 @@ const SettingView = (props) => {
onValueChange={toggleSwitch}
onValueChange={toggleSwitch}
value={isEnabled}
value={isEnabled}
/>
/>
<
/View
>
</View>
*/
}
<
View
style
=
{
styles
.
row
}
>
<
View
style
=
{
styles
.
row
}
>
<
Text
style
=
{
styles
.
txtTitle
}
>
Ng
ô
n
ng
ữ
<
/Text
>
<
AppText
i18nKey
=
{
'Language'
}
style
=
{
styles
.
txtTitle
}
/
>
<
PickerItem
<
PickerItem
defaultValue
=
{
language
}
width
=
{
200
}
width
=
{
200
}
defaultValue
=
{
language
}
value
=
{
language
}
value
=
{
language
}
data
=
{
data
Test
}
data
=
{
data
Language
}
onValueChange
=
{(
value
,
items
)
=>
{
onValueChange
=
{(
value
,
items
)
=>
{
setLanguage
(
items
.
name
);
setLanguage
(
items
.
name
);
props
.
changeLanguage
(
items
.
value
);
AsyncStorage
.
setItem
(
KEY
.
LANGUAGE
,
items
.
value
);
}}
}}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
Text
>
SettingView
1
screen
<
/Text
>
<
/View
>
<
/View
>
);
);
};
};
export
default
SettingView
;
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
txtTitle
:
{
txtTitle
:
{
fontSize
:
getFontXD
(
46
),
fontSize
:
getFontXD
(
46
),
...
@@ -68,3 +79,11 @@ const styles = StyleSheet.create({
...
@@ -68,3 +79,11 @@ const styles = StyleSheet.create({
marginBottom
:
20
,
marginBottom
:
20
,
},
},
});
});
const
mapStateToProps
=
(
state
)
=>
{
return
{
language
:
state
.
languageReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
changeLanguage
})(
SettingView
);
src/assets/AsynStorage.js
View file @
cebec552
...
@@ -2,6 +2,7 @@ const KEY = {
...
@@ -2,6 +2,7 @@ const KEY = {
TOKEN
:
'@TOKEN'
,
TOKEN
:
'@TOKEN'
,
FIREBASE
:
'@Firebase'
,
FIREBASE
:
'@Firebase'
,
ACCOUNT
:
'@ACCOUNT'
,
ACCOUNT
:
'@ACCOUNT'
,
LANGUAGE
:
'@LANGUAGE'
,
};
};
export
default
KEY
;
export
default
KEY
;
src/components/Input/InputIcon.js
View file @
cebec552
...
@@ -19,7 +19,7 @@ const InputIcon = (props) => {
...
@@ -19,7 +19,7 @@ const InputIcon = (props) => {
<
View
style
=
{
container
}
>
<
View
style
=
{
container
}
>
<
Image
source
=
{
icon
}
style
=
{
iconImg
}
/
>
<
Image
source
=
{
icon
}
style
=
{
iconImg
}
/
>
<
View
style
=
{
wrapRight
}
>
<
View
style
=
{
wrapRight
}
>
<
AppText
i18nKey
=
{
title
}
>
<
/AppText
>
<
AppText
i18nKey
=
{
title
}
/
>
<
TextInput
<
TextInput
maxLength
=
{
maxLength
}
maxLength
=
{
maxLength
}
autoCapitalize
=
"none"
autoCapitalize
=
"none"
...
...
src/components/NoInternet.js
View file @
cebec552
...
@@ -3,13 +3,13 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
...
@@ -3,13 +3,13 @@ import {View, Text, StyleSheet, TouchableOpacity} from 'react-native';
import
NetInfo
from
'@react-native-community/netinfo'
;
import
NetInfo
from
'@react-native-community/netinfo'
;
import
FastImage
from
'react-native-fast-image'
;
import
FastImage
from
'react-native-fast-image'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
import
AppText
from
'../components/AppText'
;
const
NoInternetComponent
=
(
props
)
=>
{
const
NoInternetComponent
=
(
props
)
=>
{
const
[
isConnected
,
setConnect
]
=
useState
(
true
);
const
[
isConnected
,
setConnect
]
=
useState
(
true
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
unsubscribe
=
NetInfo
.
addEventListener
((
state
)
=>
{
const
unsubscribe
=
NetInfo
.
addEventListener
((
state
)
=>
{
console
.
log
(
state
);
setConnect
(
state
.
isConnected
);
setConnect
(
state
.
isConnected
);
});
});
return
unsubscribe
;
return
unsubscribe
;
...
@@ -21,8 +21,8 @@ const NoInternetComponent = (props) => {
...
@@ -21,8 +21,8 @@ const NoInternetComponent = (props) => {
source
=
{
R
.
images
.
bg_cannot_connect
}
source
=
{
R
.
images
.
bg_cannot_connect
}
style
=
{
styles
.
imageStyle
}
style
=
{
styles
.
imageStyle
}
/
>
/
>
<
Text
style
=
{
styles
.
textStyle
}
>
Kh
ô
ng
c
ó
k
ế
t
n
ố
t
Internet
<
/Text
>
<
AppText
i18nKey
=
{
'No_Internet'
}
style
=
{
styles
.
textStyle
}
/
>
<
Text
style
=
{
styles
.
subTextStyle
}
>
Ki
ể
m
tra
l
ạ
i
đườ
ng
truy
ề
n
!<
/Text
>
<
AppText
i18nKey
=
{
'Check_Internet_Connect'
}
style
=
{
styles
.
subTextStyle
}
/
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -31,7 +31,10 @@ const NoInternetComponent = (props) => {
...
@@ -31,7 +31,10 @@ const NoInternetComponent = (props) => {
});
});
},
3000
);
},
3000
);
}}
>
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
color
:
'blue'
}}
>
Th
ử
l
ạ
i
<
/Text
>
<
AppText
i18nKey
=
{
'Retry'
}
style
=
{{
alignSelf
:
'center'
,
fontSize
:
20
,
color
:
'blue'
}}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
)
:
(
)
:
(
...
...
src/components/Picker/PickerImg.js
View file @
cebec552
...
@@ -13,6 +13,7 @@ import Icon from 'react-native-vector-icons/AntDesign';
...
@@ -13,6 +13,7 @@ import Icon from 'react-native-vector-icons/AntDesign';
import
Modal
from
'react-native-modal'
;
import
Modal
from
'react-native-modal'
;
import
Block
from
'../Block'
;
import
Block
from
'../Block'
;
import
ImagePicker
from
'react-native-image-crop-picker'
;
import
ImagePicker
from
'react-native-image-crop-picker'
;
import
AppText
from
'../AppText'
;
const
options
=
{
const
options
=
{
title
:
'Select Avatar'
,
title
:
'Select Avatar'
,
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
...
@@ -73,29 +74,29 @@ const PickerImg = (props) => {
...
@@ -73,29 +74,29 @@ const PickerImg = (props) => {
<
/TouchableWithoutFeedback
>
<
/TouchableWithoutFeedback
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
Text
<
AppText
i18nKey
=
{
'Select_source_image'
}
style
=
{{
style
=
{{
textAlign
:
'center'
,
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
color
:
'#1473E6'
,
color
:
'#1473E6'
,
}}
>
}}
Ch
ọ
n
ngu
ồ
n
l
ấ
y
ả
nh
/
>
<
/Text
>
<
View
style
=
{
styles
.
line
}
/
>
<
View
style
=
{
styles
.
line
}
/
>
<
Block
row
space
=
{
'around'
}
center
>
<
Block
row
space
=
{
'around'
}
center
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
Text
style
=
{
styles
.
txtTitleBtn
}
>
Ch
ụ
p
ả
nh
<
/Text
>
<
AppText
i18nKey
=
{
'Take_photo'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
style
=
{
styles
.
selectionImg
}
onPress
=
{
onchoosGalery
}
>
onPress
=
{
onchoosGalery
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
Text
style
=
{
styles
.
txtTitleBtn
}
>
Th
ư
vi
ệ
n
ả
nh
<
/Text
>
<
AppText
i18nKey
=
{
'Photo_library'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/Block
>
<
/Block
>
<
/View
>
<
/View
>
...
...
src/components/Picker/PickerImgUni.js
View file @
cebec552
...
@@ -20,6 +20,8 @@ import Icon from 'react-native-vector-icons/AntDesign';
...
@@ -20,6 +20,8 @@ import Icon from 'react-native-vector-icons/AntDesign';
import
Modal
from
'react-native-modal'
;
import
Modal
from
'react-native-modal'
;
import
Block
from
'../Block'
;
import
Block
from
'../Block'
;
import
ImagePicker
from
'react-native-image-crop-picker'
;
import
ImagePicker
from
'react-native-image-crop-picker'
;
import
AppText
from
'../AppText'
;
const
options
=
{
const
options
=
{
title
:
'Select Avatar'
,
title
:
'Select Avatar'
,
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
customButtons
:
[{
name
:
'fb'
,
title
:
'Choose Photo from Facebook'
}],
...
@@ -98,29 +100,29 @@ const PickerImgUni = (props) => {
...
@@ -98,29 +100,29 @@ const PickerImgUni = (props) => {
<
/TouchableWithoutFeedback
>
<
/TouchableWithoutFeedback
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
View
style
=
{
styles
.
containerSelect
}
>
<
Text
<
AppText
i18nKey
=
{
'Select_source_image'
}
style
=
{{
style
=
{{
textAlign
:
'center'
,
textAlign
:
'center'
,
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
fontWeight
:
'bold'
,
fontWeight
:
'bold'
,
color
:
'#1473E6'
,
color
:
'#1473E6'
,
}}
>
}}
Ch
ọ
n
ngu
ồ
n
l
ấ
y
ả
nh
/
>
<
/Text
>
<
View
style
=
{
styles
.
line
}
/
>
<
View
style
=
{
styles
.
line
}
/
>
<
Block
row
space
=
{
'around'
}
center
>
<
Block
row
space
=
{
'around'
}
center
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
onPress
=
{
onCapture
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconCamera
}
/
>
<
Text
style
=
{
styles
.
txtTitleBtn
}
>
Ch
ụ
p
ả
nh
<
/Text
>
<
AppText
i18nKey
=
{
'Take_photo'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
selectionImg
}
style
=
{
styles
.
selectionImg
}
onPress
=
{
onchoosGalery
}
>
onPress
=
{
onchoosGalery
}
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
Image
style
=
{
styles
.
imgIcon
}
source
=
{
R
.
images
.
iconImg
}
/
>
<
Text
style
=
{
styles
.
txtTitleBtn
}
>
Th
ư
vi
ệ
n
ả
nh
<
/Text
>
<
AppText
i18nKey
=
{
'Photo_library'
}
style
=
{
styles
.
txtTitleBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/Block
>
<
/Block
>
<
/View
>
<
/View
>
...
...
src/components/SnackBar.js
View file @
cebec552
...
@@ -15,7 +15,7 @@ import Modal from 'react-native-modal';
...
@@ -15,7 +15,7 @@ import Modal from 'react-native-modal';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showNotificaton
,
hideNotification
}
from
'../actions/SnackBarAction'
;
import
{
showNotificaton
,
hideNotification
}
from
'../actions/SnackBarAction'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
AppText
from
'../components/AppText'
;
const
SnackBar
=
(
props
)
=>
{
const
SnackBar
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
const
{
isOpen
,
title
,
content
,
screen
,
id_record
}
=
props
.
snackReducer
;
const
{
isOpen
,
title
,
content
,
screen
,
id_record
}
=
props
.
snackReducer
;
...
@@ -47,7 +47,7 @@ const SnackBar = (props) => {
...
@@ -47,7 +47,7 @@ const SnackBar = (props) => {
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
props
.
hideNotification
()}
onPress
=
{()
=>
props
.
hideNotification
()}
style
=
{
styles
.
btn
}
>
style
=
{
styles
.
btn
}
>
<
Text
style
=
{
styles
.
txtBtn
}
>
Đó
ng
<
/Text
>
<
AppText
i18nKey
=
{
'Close'
}
style
=
{
styles
.
txtBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
{
onPress
=
{()
=>
{
...
@@ -55,7 +55,7 @@ const SnackBar = (props) => {
...
@@ -55,7 +55,7 @@ const SnackBar = (props) => {
navigate
.
navigate
(
screen
,
{
id
:
id_record
});
navigate
.
navigate
(
screen
,
{
id
:
id_record
});
}}
}}
style
=
{[
styles
.
btn
,
{
marginLeft
:
20
}]}
>
style
=
{[
styles
.
btn
,
{
marginLeft
:
20
}]}
>
<
Text
style
=
{
styles
.
txtBtn
}
>
Chi
ti
ế
t
<
/Text
>
<
AppText
i18nKey
=
{
'Detail'
}
style
=
{
styles
.
txtBtn
}
/
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
src/helper/i18/locales/en.js
View file @
cebec552
...
@@ -72,6 +72,41 @@ export default {
...
@@ -72,6 +72,41 @@ export default {
PartnershipAgreement
:
'Partnership agreement'
,
PartnershipAgreement
:
'Partnership agreement'
,
Waiting
:
'Waiting'
,
Waiting
:
'Waiting'
,
Success
:
'Success'
,
Success
:
'Success'
,
O
K
:
'Ok'
,
O
k
:
'Ok'
,
Can_not_get_data
:
"Can't get data"
,
Can_not_get_data
:
"Can't get data"
,
Cancel
:
'Cancel'
,
Close
:
'Close'
,
Detail
:
'Detail'
,
No_Internet
:
'No internet'
,
Check_Internet_Connect
:
'Check internet connect'
,
Retry
:
'Retry'
,
Select_source_image
:
'Select the source of the image'
,
Photo_library
:
'Photo library'
,
Take_photo
:
'Take a photo'
,
EnableCQG
:
'Enable CQG'
,
Request_Open_Account_CQG
:
'Request open account CQG'
,
Waiting_for_Progress
:
'Waiting for progress'
,
PopupVerifyAccount
:
'Your account is not verified. Go to account verification?'
,
PopupOpenCQG
:
'Would you like to open a CQG account to make investments?'
,
Free
:
'Free'
,
Open_account
:
'Open account'
,
Provisional
:
'Provisional'
,
Here
:
'Here'
,
Open_account_demo
:
'You can open a demo account'
,
Features_develop
:
'Features are under development, please come back later!'
,
Language
:
'Language'
,
Email
:
'Email'
,
Password
:
'Password'
,
Login
:
'Login'
,
Register
:
'Register'
,
Confirm_pass
:
'Confirm password'
,
Code_introduce
:
'Code introduce'
,
Account_already
:
'Do you already have an account?'
,
Have_account
:
'Do not have an account?'
,
Verify_code
:
'Verification codes:'
,
Continue
:
'Continue'
,
Re_send
:
'Re send'
,
Copied
:
'Copied!'
,
Please_fill_in
:
'Please fill in '
,
};
};
src/helper/i18/locales/vn.js
View file @
cebec552
...
@@ -4,6 +4,7 @@ export default {
...
@@ -4,6 +4,7 @@ export default {
contact
:
'Liên hệ'
,
contact
:
'Liên hệ'
,
setting
:
'Cài đặt'
,
setting
:
'Cài đặt'
,
SetLanguage
:
'Chọn ngôn ngữ'
,
SetLanguage
:
'Chọn ngôn ngữ'
,
Language
:
'Ngôn ngữ'
,
MyProfile
:
'Thông tin cá nhân'
,
MyProfile
:
'Thông tin cá nhân'
,
VerifyAccount
:
'Xác thực tài khoản'
,
VerifyAccount
:
'Xác thực tài khoản'
,
Payments
:
'Các khoản thanh toán'
,
Payments
:
'Các khoản thanh toán'
,
...
@@ -72,7 +73,41 @@ export default {
...
@@ -72,7 +73,41 @@ export default {
PartnershipAgreement
:
'Thoả thuận quan hệ đối tác'
,
PartnershipAgreement
:
'Thoả thuận quan hệ đối tác'
,
Waiting
:
'Đang chờ'
,
Waiting
:
'Đang chờ'
,
Success
:
'Thành công'
,
Success
:
'Thành công'
,
Can_not_get_data
:
'Không lấy được dữ liệu!'
,
Can_not_get_data
:
'Không lấy được dữ liệu!'
,
Cancel
:
'Huỷ'
,
Cancel
:
'Huỷ'
,
Close
:
'Đóng'
,
Detail
:
'Chit tiết'
,
No_Internet
:
'Không có kết nốt Internet'
,
Check_Internet_Connect
:
'Kiểm tra lại đường truyền'
,
Retry
:
'Thử lại'
,
Select_source_image
:
'Chọn nguồn lấy ảnh'
,
Ok
:
'Đồng ý'
,
Photo_library
:
'Thư viện ảnh'
,
Take_photo
:
'Chụp ảnh'
,
EnableCQG
:
'Có tài khoản CQG'
,
Request_Open_Account_CQG
:
'Yêu cầu mở TK CQG'
,
Waiting_for_Progress
:
'Chờ xử lý'
,
Free
:
'Miễn phí'
,
PopupVerifyAccount
:
'Tài khoản của bạn chưa được xác minh.Tiến hành xác minh tài khoản?'
,
PopupOpenCQG
:
'Bạn có muốn đăng mở tài khoản CQG để tiến hành đầu tư?'
,
Open_account
:
'Mở tài khoản'
,
Provisional
:
'Tạm tính'
,
Here
:
'Tại đây'
,
Open_account_demo
:
'Bạn có thể mở tài khoản thử'
,
Features_develop
:
'Tính năng đang được phát triển, vui lòng quay lại sau!'
,
Email
:
'Email'
,
Password
:
'Mật khẩu'
,
Login
:
'Đăng nhập'
,
Register
:
'Đăng ký'
,
Confirm_pass
:
'Nhập lại mật khẩu'
,
Code_introduce
:
'Mã giới thiệu'
,
Account_already
:
'Bạn đã có tài khoản?'
,
Have_account
:
'Bạn chưa có tài khoản?'
,
Verify_code
:
'Mã xác thực:'
,
Continue
:
'Tiếp tục'
,
Re_send
:
'Gửi lại'
,
Copied
:
'Đã sao chép!'
,
Please_fill_in
:
'Vui lòng điền '
,
};
};
src/routers/TabNavigation.js
View file @
cebec552
...
@@ -17,6 +17,10 @@ import Test from '../Screens/NewFeed/Test';
...
@@ -17,6 +17,10 @@ import Test from '../Screens/NewFeed/Test';
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
AccountVerification
,
PACKETCQG
}
from
'../routers/ScreenNames'
;
import
{
AccountVerification
,
PACKETCQG
}
from
'../routers/ScreenNames'
;
import
I18n
from
'../helper/i18/i18n'
;
import
I18n
from
'../helper/i18/i18n'
;
import
{
changeLanguage
}
from
'../actions/language'
;
import
KEY
from
'../assets/AsynStorage'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
const
Tab
=
createBottomTabNavigator
();
const
Tab
=
createBottomTabNavigator
();
const
PayScreenComponent
=
()
=>
{
const
PayScreenComponent
=
()
=>
{
...
@@ -26,6 +30,7 @@ const PayScreenComponent = () => {
...
@@ -26,6 +30,7 @@ const PayScreenComponent = () => {
const
TabNavigator
=
(
props
)
=>
{
const
TabNavigator
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
useEffect
(()
=>
{
useEffect
(()
=>
{
setInitLanguage
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
showPopUp
();
showPopUp
();
},
3000
);
},
3000
);
...
@@ -38,26 +43,24 @@ const TabNavigator = (props) => {
...
@@ -38,26 +43,24 @@ const TabNavigator = (props) => {
const
checkScreenInit
=
()
=>
{
const
checkScreenInit
=
()
=>
{
if
(
props
.
screenInit
.
screen
)
{
if
(
props
.
screenInit
.
screen
)
{
const
{
screen
,
id
}
=
props
.
screenInit
;
const
{
screen
,
id
}
=
props
.
screenInit
;
console
.
log
(
screen
,
id
);
navigate
.
navigate
(
screen
,
{
id
:
id
});
navigate
.
navigate
(
screen
,
{
id
:
id
});
}
}
};
};
const
setInitLanguage
=
async
()
=>
{
const
laguage
=
await
AsyncStorage
.
getItem
(
KEY
.
LANGUAGE
);
if
(
laguage
)
props
.
changeLanguage
(
laguage
);
};
const
showPopUp
=
()
=>
{
const
showPopUp
=
()
=>
{
if
(
props
.
user
.
status
==
1
)
{
if
(
props
.
user
.
status
==
1
)
{
return
confirmAlert
(
return
confirmAlert
(
I18n
.
t
(
'PopupVerifyAccount'
),
()
=>
{
'Tài khoản của bạn chưa được xác minh.Tiến hành xác minh tài khoản?'
,
()
=>
{
navigate
.
navigate
(
AccountVerification
);
navigate
.
navigate
(
AccountVerification
);
},
});
);
}
else
if
(
props
.
user
.
status
==
3
&&
!
props
.
user
.
contract_code
)
{
}
else
if
(
props
.
user
.
status
==
3
&&
!
props
.
user
.
contract_code
)
{
return
confirmAlert
(
return
confirmAlert
(
I18n
.
t
(
'PopupOpenCQG'
),
()
=>
{
'Bạn có muốn đăng mở tài khoản CQG để tiến hành đầu tư?'
,
()
=>
{
navigate
.
navigate
(
PACKETCQG
);
navigate
.
navigate
(
PACKETCQG
);
},
});
);
}
}
};
};
return
(
return
(
...
@@ -132,4 +135,4 @@ const mapStateToProps = (state) => {
...
@@ -132,4 +135,4 @@ const mapStateToProps = (state) => {
};
};
};
};
export
default
connect
(
mapStateToProps
,
{})(
TabNavigator
);
export
default
connect
(
mapStateToProps
,
{
changeLanguage
})(
TabNavigator
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment