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
460c8ee6
Commit
460c8ee6
authored
Jun 07, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug update user
parent
bddc0f56
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
103 additions
and
15 deletions
+103
-15
ChooseMethod.js
src/Screens/Action/Deposit/ChooseMethod.js
+26
-1
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+1
-0
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+1
-0
Home.js
src/Screens/Home/Home.js
+28
-1
HomeView.js
src/Screens/Home/HomeView.js
+9
-1
Calendar.js
src/Screens/NewFeed/Calendar/Calendar.js
+22
-9
InputComponent.js
src/components/Input/InputComponent.js
+2
-1
TextField.js
src/components/Input/TextField.js
+10
-1
TextMulti.js
src/components/Input/TextMulti.js
+2
-1
en.js
src/helper/i18/locales/en.js
+1
-0
vn.js
src/helper/i18/locales/vn.js
+1
-0
No files found.
src/Screens/Action/Deposit/ChooseMethod.js
View file @
460c8ee6
...
...
@@ -7,13 +7,38 @@ import {getListMethod} from '../../../apis/Functions/Deposit';
import
{
connect
}
from
'react-redux'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
import
{
getDetailUser
}
from
'../../../apis/Functions/users'
;
const
MethodPayView
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
([]);
const
navigation
=
useNavigation
();
useEffect
(()
=>
{
getData
();
},
[]);
React
.
useEffect
(()
=>
{
const
unsubscribe
=
navigation
.
addListener
(
'focus'
,
()
=>
{
callApi
();
});
// Return the function to unsubscribe from the event so it gets removed on unmount
return
unsubscribe
;
},
[
navigation
]);
const
callApi
=
async
()
=>
{
const
res
=
await
getDetailUser
({
id
:
props
.
user
.
uid
,
platform
:
Platform
.
OS
,
});
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
}
};
const
getData
=
async
()
=>
{
const
res
=
await
getListMethod
({
platform
:
Platform
.
OS
,
...
...
@@ -50,4 +75,4 @@ const mapStateToProps = (state) => {
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{})(
MethodPayView
);
export
default
connect
(
mapStateToProps
,
{
saveUserToRedux
})(
MethodPayView
);
src/Screens/Action/Wallet/WalletDeposit.js
View file @
460c8ee6
...
...
@@ -112,6 +112,7 @@ const WalletDeposit = (props) => {
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
placeholder
=
{
I18n
.
t
(
'noteWithdrawMoney'
)}
/
>
<
/View
>
<
/View
>
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
460c8ee6
...
...
@@ -209,6 +209,7 @@ const WalletWithdraw = (props) => {
<
TextMulti
onChangeText
=
{(
val
)
=>
setNotes
(
val
)}
title
=
{
I18n
.
t
(
'Note'
)}
placeholder
=
{
I18n
.
t
(
'noteWithdrawMoney'
)}
/
>
<
/View
>
<
/View
>
...
...
src/Screens/Home/Home.js
View file @
460c8ee6
...
...
@@ -12,6 +12,8 @@ import {hideLoading, showLoading} from '../../actions/loadingAction';
import
_
from
'lodash'
;
import
{
showAlert
,
TYPE
}
from
'../../components/DropdownAlert/index'
;
import
VersionChecker
from
'../VersionChecker'
;
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
getDetailUser
}
from
'../../apis/Functions/users'
;
const
Home
=
(
props
)
=>
{
const
[
data
,
setData
]
=
useState
({
total_deposit
:
0
,
total_withdraw
:
0
});
...
...
@@ -24,6 +26,25 @@ const Home = (props) => {
const
[
isSortPercent
,
setIsSortPercent
]
=
useState
(
null
);
const
[
isSortPriceOpenClose
,
setIsSortPriceOpenClose
]
=
useState
(
null
);
const
[
isSortPriceHighLow
,
setIsSortPriceHighLow
]
=
useState
(
null
);
const
[
isRefresh
,
setRefresh
]
=
useState
(
false
);
const
onRefresh
=
async
()
=>
{
setRefresh
(
true
);
const
res
=
await
getDetailUser
({
id
:
props
.
user
.
uid
,
platform
:
Platform
.
OS
,
});
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
}
setRefresh
(
false
);
};
const
SORT_TYPE
=
{
DESC
:
'DESC'
,
ASC
:
'ASC'
,
...
...
@@ -192,6 +213,8 @@ const Home = (props) => {
onSortByPercent
=
{
onSortByPercent
}
onSortByPriceOpenClose
=
{
onSortByPriceOpenClose
}
onSortByPriceHighLow
=
{
onSortByPriceHighLow
}
isRefresh
=
{
isRefresh
}
onRefresh
=
{
onRefresh
}
/
>
);
};
...
...
@@ -201,4 +224,8 @@ const mapStateToProps = (state) => {
user
:
state
.
userReducer
,
};
};
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
})(
Home
);
export
default
connect
(
mapStateToProps
,
{
showLoading
,
hideLoading
,
saveUserToRedux
,
})(
Home
);
src/Screens/Home/HomeView.js
View file @
460c8ee6
...
...
@@ -6,6 +6,7 @@ import {
ScrollView
,
TouchableOpacity
,
Text
,
RefreshControl
,
}
from
'react-native'
;
import
HeaderHome
from
'../../components/Header/HeaderHome'
;
import
{
getFontXD
}
from
'../../Config/Functions'
;
...
...
@@ -19,7 +20,14 @@ const HomeView = (props) => {
source
=
{
R
.
images
.
bgHome
}
resizeMode
=
{
'stretch'
}
style
=
{{
width
:
'100%'
,
height
:
'100%'
}}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
ScrollView
refreshControl
=
{
<
RefreshControl
refreshing
=
{
props
.
isRefresh
}
onRefresh
=
{
props
.
onRefresh
}
/
>
}
showsVerticalScrollIndicator
=
{
false
}
>
<
HeaderHome
/>
{
props
.
listImage
.
length
>
0
?
(
<
SwiperComponent
listImage
=
{
props
.
listImage
}
/
>
...
...
src/Screens/NewFeed/Calendar/Calendar.js
View file @
460c8ee6
...
...
@@ -4,6 +4,7 @@ import {getListCalendar} from '../../../apis/Functions/NewFeed';
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
{
convertTimeApi
}
from
'../../../Config/Functions'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
AppText
from
'../../../components/AppText'
;
import
Item
from
'./item'
;
const
NewFeed
=
(
props
)
=>
{
...
...
@@ -29,6 +30,7 @@ const NewFeed = (props) => {
end_date
:
convertTimeApi
(
lastDay
),
keyword
:
''
,
});
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
}
else
{
...
...
@@ -60,7 +62,7 @@ const NewFeed = (props) => {
const
getItemLayout
=
(
data
,
index
)
=>
({
length
:
100
,
offset
:
4
0
*
index
,
offset
:
5
0
*
index
,
index
,
});
...
...
@@ -71,14 +73,25 @@ const NewFeed = (props) => {
backgroundColor
:
'white'
,
paddingTop
:
10
,
}}
>
<
FlatList
ref
=
{
ListDayRef
}
getItemLayout
=
{
getItemLayout
}
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
renderItem
=
{({
item
,
index
})
=>
<
Item
item
=
{
item
}
index
=
{
index
}
/>
}
/>
{
data
.
length
==
0
?
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
AppText
i18nKey
=
{
'NoData'
}
style
=
{{
fontSize
:
18
,
fontWeight
:
'bold'
,
}}
><
/AppText
>
<
/View
>
)
:
(
<
FlatList
ref
=
{
ListDayRef
}
getItemLayout
=
{
getItemLayout
}
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
renderItem
=
{({
item
,
index
})
=>
<
Item
item
=
{
item
}
index
=
{
index
}
/>
}
/>
)}
<
/View
>
);
};
...
...
src/components/Input/InputComponent.js
View file @
460c8ee6
...
...
@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../../Config/Functions';
import
R
from
'../../../assets/R'
;
const
InputComponent
=
(
props
)
=>
{
const
{
title
,
onChangeText
,
maxLength
}
=
props
;
const
{
title
,
onChangeText
,
maxLength
,
placeholder
}
=
props
;
return
(
<
View
style
=
{{
marginVertical
:
5
}}
>
...
...
@@ -19,6 +19,7 @@ const InputComponent = (props) => {
<
TextInput
placeholderTextColor
=
{
R
.
colors
.
placeHolder
}
maxLength
=
{
maxLength
}
placeholder
=
{
placeholder
}
autoCapitalize
=
"none"
onChangeText
=
{(
val
)
=>
onChangeText
(
val
)}
style
=
{{
...
...
src/components/Input/TextField.js
View file @
460c8ee6
...
...
@@ -4,7 +4,15 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import
R
from
'../../assets/R'
;
const
TextField
=
(
props
)
=>
{
const
{
title
,
onChangeText
,
maxLength
,
isNumber
,
value
,
editable
}
=
props
;
const
{
title
,
onChangeText
,
maxLength
,
isNumber
,
value
,
editable
,
placeholder
,
}
=
props
;
return
(
<
View
style
=
{{
marginVertical
:
5
}}
>
...
...
@@ -18,6 +26,7 @@ const TextField = (props) => {
<
/Text
>
<
TextInput
maxLength
=
{
maxLength
?
maxLength
:
256
}
placeholder
=
{
placeholder
}
placeholderTextColor
=
{
R
.
colors
.
placeHolder
}
editable
=
{
editable
!=
null
?
false
:
true
}
autoCapitalize
=
"none"
...
...
src/components/Input/TextMulti.js
View file @
460c8ee6
...
...
@@ -4,7 +4,7 @@ import {HEIGHTXD, WIDTHXD, getFontXD} from '../../Config/Functions';
import
R
from
'../../assets/R'
;
const
TextField
=
(
props
)
=>
{
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
}
=
props
;
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
,
placeholder
}
=
props
;
return
(
<
View
style
=
{{
marginVertical
:
5
}}
>
...
...
@@ -19,6 +19,7 @@ const TextField = (props) => {
<
TextInput
maxLength
=
{
maxLength
}
textAlign
=
{
'left'
}
placeholder
=
{
placeholder
}
editable
=
{
editable
!=
null
?
editable
:
true
}
value
=
{
value
}
onChangeText
=
{(
val
)
=>
onChangeText
(
val
)}
...
...
src/helper/i18/locales/en.js
View file @
460c8ee6
...
...
@@ -290,4 +290,5 @@ export default {
'The withdrawal amount must be more than 1 million dong'
,
Overtime
:
'Overtime OTP'
,
LoginSessionEnd
:
'Login session end, please login again'
,
noteWithdrawMoney
:
'Infor CQG account'
,
};
src/helper/i18/locales/vn.js
View file @
460c8ee6
...
...
@@ -290,4 +290,5 @@ export default {
WarnMinReqestWithdraw
:
'Số tiền rút phải lớn hơn 1 triệu đồng'
,
Overtime
:
'Mã OTP hết hạn sử dụng'
,
LoginSessionEnd
:
'Hết phiên đăng nhập, vui lòng đăng nhập lại'
,
noteWithdrawMoney
:
'Thông tin tài khoản CQG'
,
};
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