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
ddef6b0a
Commit
ddef6b0a
authored
3 years ago
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update feature partner
parent
e19d8011
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
44 deletions
+94
-44
DetailPartner.js
src/Screens/Menu/MyGroup/DetailPartner.js
+17
-6
Item.js
src/Screens/Menu/MyGroup/Item.js
+12
-5
SearchModal.js
src/Screens/Menu/MyGroup/SearchModal.js
+2
-1
SearchPartner.js
src/Screens/Menu/MyGroup/SearchPartner.js
+28
-17
Level1.js
src/Screens/Menu/MyGroup/Tabs/Level1.js
+34
-14
vn.js
src/helper/i18/locales/vn.js
+1
-1
No files found.
src/Screens/Menu/MyGroup/DetailPartner.js
View file @
ddef6b0a
...
...
@@ -12,10 +12,14 @@ const DetailPartner = (props) => {
status_name
,
created
,
email
,
level
,
sponsor_name
,
commission
,
partner_count
,
}
=
props
.
route
.
params
.
data
;
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
,
borderColor
:
'white'
}}
>
<
HeaderBack
title
=
{
'Detail'
}
/
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{
styles
.
containerTop
}
>
...
...
@@ -27,7 +31,14 @@ const DetailPartner = (props) => {
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Fullname'
}
/
>
<
/View
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
fullname
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
46
),
textTransform
:
'uppercase'
,
fontWeight
:
'600'
,
}}
>
{
fullname
}
<
/Text
>
<
/View
>
<
/View
>
...
...
@@ -36,7 +47,7 @@ const DetailPartner = (props) => {
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'level'
}
/
>
<
/View
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
fullname
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
level
}
<
/Text
>
<
/View
>
<
/View
>
...
...
@@ -45,7 +56,7 @@ const DetailPartner = (props) => {
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Sponsor'
}
/
>
<
/View
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
full
name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
sponsor_
name
}
<
/Text
>
<
/View
>
<
/View
>
...
...
@@ -90,7 +101,7 @@ const DetailPartner = (props) => {
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'CountSponsors'
}
/
>
<
/View
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
fullname
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
partner_count
}
<
/Text
>
<
/View
>
<
/View
>
...
...
@@ -99,7 +110,7 @@ const DetailPartner = (props) => {
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'TotalCommission'
}
/
>
<
/View
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
fullname
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
commission
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Menu/MyGroup/Item.js
View file @
ddef6b0a
...
...
@@ -13,6 +13,7 @@ const Item = (props) => {
cqg_status_name
,
status_name
,
created
,
sponsor_name
,
}
=
props
.
item
;
const
navigation
=
useNavigation
();
...
...
@@ -24,20 +25,26 @@ const Item = (props) => {
<
Image
source
=
{{
uri
:
picture_url
}}
style
=
{
styles
.
img
}
/
>
<
View
style
=
{
styles
.
wrapRight
}
>
<
Text
style
=
{
styles
.
txtName
}
>
{
fullname
}
<
/Text
>
<
View
style
=
{
{
flexDirection
:
'row'
,
alignItems
:
'center'
}
}
>
<
View
style
=
{
styles
.
row
}
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Status'
}
/
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
status_name
}
<
/Text
>
<
/View
>
<
View
style
=
{
{
flexDirection
:
'row'
,
alignItems
:
'center'
}
}
>
<
View
style
=
{
styles
.
row
}
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'DateJoin'
}
/
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
created
}
<
/Text
>
<
/View
>
<
View
style
=
{
{
flexDirection
:
'row'
,
alignItems
:
'center'
}
}
>
<
View
style
=
{
styles
.
row
}
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'OpenAccountExchange'
}
/
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
cqg_status_name
}
<
/Text
>
<
/View
>
{
props
.
level
==
1
?
null
:
(
<
View
style
=
{
styles
.
row
}
>
<
AppText
style
=
{
styles
.
txtTitle
}
i18nKey
=
{
'Sponsor'
}
/
>
<
Text
style
=
{{
fontSize
:
getFontXD
(
42
)}}
>
{
sponsor_name
}
<
/Text
>
<
/View
>
)}
<
/View
>
<
/TouchableOpacity
>
);
...
...
@@ -73,8 +80,6 @@ const styles = StyleSheet.create({
wrapRight
:
{
marginLeft
:
5
,
flex
:
1
,
height
:
80
,
justifyContent
:
'space-between'
,
},
txtTitle
:
{
fontSize
:
getFontXD
(
42
),
...
...
@@ -84,5 +89,7 @@ const styles = StyleSheet.create({
txtName
:
{
fontSize
:
getFontXD
(
46
),
color
:
R
.
colors
.
black
,
textTransform
:
'uppercase'
,
},
row
:
{
flexDirection
:
'row'
,
alignItems
:
'center'
,
marginTop
:
2
},
});
This diff is collapsed.
Click to expand it.
src/Screens/Menu/MyGroup/SearchModal.js
View file @
ddef6b0a
...
...
@@ -11,6 +11,7 @@ import {
Dimensions
,
}
from
'react-native'
;
import
R
from
'../../../assets/R'
;
import
{
HEIGHTXD
,
WIDTHXD
,
...
...
@@ -148,7 +149,7 @@ const SearchProductCodeModal = (props) => {
<
TouchableOpacity
onPress
=
{()
=>
{
props
.
toggleModal
();
console
.
log
(
open
);
setTextSearch
(
''
);
navigate
.
navigate
(
SEARCHPARTNER
,
{
keyword
:
textSearch
,
level
:
level
.
value
,
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Menu/MyGroup/SearchPartner.js
View file @
ddef6b0a
...
...
@@ -4,13 +4,13 @@ import Item from './Item';
import
{
getListPartner
}
from
'../../../apis/Functions/users'
;
import
HeaderBack
from
'../../../components/Header/HeaderBack'
;
import
{
showAlert
,
TYPE
}
from
'../../../components/DropdownAlert'
;
import
AppText
from
'../../../components/AppText'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
Level1
=
(
props
)
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
data
,
setData
]
=
useState
([]);
const
[
tottalPage
,
setTotalPage
]
=
useState
(
1
);
const
[
isRefresh
,
setisRefresh
]
=
useState
(
false
);
console
.
log
(
props
.
route
.
params
);
const
{
trader_account_status
,
level
,
keyword
}
=
props
.
route
.
params
;
...
...
@@ -30,7 +30,7 @@ const Level1 = (props) => {
page_index
:
1
,
});
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
))
{
setData
(
res
.
data
.
data
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
}
else
{
...
...
@@ -58,7 +58,7 @@ const Level1 = (props) => {
});
setPage
(
page
+
1
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
setData
(
data
.
concat
(
res
.
data
.
data
));
}
setisRefresh
(
false
);
...
...
@@ -68,20 +68,31 @@ const Level1 = (props) => {
<
View
style
=
{{
flex
:
1
}}
>
<
HeaderBack
title
=
"SearchPartner"
/>
<
FlatList
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
refreshing
=
{
isRefresh
}
onRefresh
=
{()
=>
onRefresh
()}
onEndReachedThreshold
=
{
0.01
}
onEndReached
=
{(
info
)
=>
{
onLoadMore
();
}}
renderItem
=
{({
item
,
index
})
=>
(
<
Item
isEnd
=
{
data
.
length
-
1
==
index
?
true
:
false
}
item
=
{
item
}
/
>
)}
/
>
{
data
.
length
>
0
?
(
<
FlatList
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
refreshing
=
{
isRefresh
}
onRefresh
=
{()
=>
onRefresh
()}
onEndReachedThreshold
=
{
0.01
}
onEndReached
=
{(
info
)
=>
{
onLoadMore
();
}}
renderItem
=
{({
item
,
index
})
=>
(
<
Item
isEnd
=
{
data
.
length
-
1
==
index
?
true
:
false
}
item
=
{
item
}
/
>
)}
/
>
)
:
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
AppText
i18nKey
=
{
'NoData'
}
style
=
{{
fontSize
:
18
,
fontWeight
:
'bold'
,
}}
><
/AppText
>
<
/View
>
)}
<
/View
>
);
};
...
...
This diff is collapsed.
Click to expand it.
src/Screens/Menu/MyGroup/Tabs/Level1.js
View file @
ddef6b0a
...
...
@@ -23,6 +23,7 @@ const Level1 = (props) => {
platform
:
Platform
.
OS
,
page_size
:
10
,
page_index
:
1
,
trader_account_status
:
-
1
,
});
if
((
res
.
data
.
code
=
200
&&
res
.
data
.
data
))
{
...
...
@@ -44,15 +45,18 @@ const Level1 = (props) => {
const
getDataLoadMore
=
async
()
=>
{
setisRefresh
(
true
);
console
.
log
(
'Chay vao day'
);
const
res
=
await
getListPartner
({
keyword
:
''
,
level
:
props
.
type
,
platform
:
Platform
.
OS
,
page_size
:
10
,
page_index
:
page
+
1
,
trader_account_status
:
-
1
,
});
setPage
(
page
+
1
);
console
.
log
(
'rress'
,
res
);
if
(
res
.
data
.
code
==
200
)
{
setData
(
data
.
concat
(
res
.
data
.
data
));
}
...
...
@@ -61,20 +65,36 @@ const Level1 = (props) => {
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
FlatList
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
refreshing
=
{
isRefresh
}
onRefresh
=
{()
=>
onRefresh
()}
onEndReachedThreshold
=
{
0.01
}
onEndReached
=
{(
info
)
=>
{
onLoadMore
();
}}
renderItem
=
{({
item
,
index
})
=>
(
<
Item
isEnd
=
{
data
.
length
-
1
==
index
?
true
:
false
}
item
=
{
item
}
/
>
)}
/
>
{
data
.
length
>
0
?
(
<
FlatList
data
=
{
data
}
showsVerticalScrollIndicator
=
{
false
}
keyExtractor
=
{(
item
)
=>
item
.
id
}
refreshing
=
{
isRefresh
}
onRefresh
=
{()
=>
onRefresh
()}
onEndReachedThreshold
=
{
0.01
}
onEndReached
=
{(
info
)
=>
{
console
.
log
(
'Cham'
);
onLoadMore
();
}}
renderItem
=
{({
item
,
index
})
=>
(
<
Item
level
=
{
props
.
type
}
isEnd
=
{
data
.
length
-
1
==
index
?
true
:
false
}
item
=
{
item
}
/
>
)}
/
>
)
:
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
AppText
i18nKey
=
{
'NoData'
}
style
=
{{
fontSize
:
18
,
fontWeight
:
'bold'
,
}}
><
/AppText
>
<
/View
>
)}
<
/View
>
);
};
...
...
This diff is collapsed.
Click to expand it.
src/helper/i18/locales/vn.js
View file @
ddef6b0a
...
...
@@ -345,7 +345,7 @@ export default {
NamePartner
:
'Tên đối tác'
,
Opened
:
'Đã mở'
,
Unopen
:
'Chưa mở'
,
OpenAccountExchange
:
'Mở
tài khoản giao dịch
:'
,
OpenAccountExchange
:
'Mở
TKGD
:'
,
DateJoin
:
'Ngày tham gia:'
,
Sponsor
:
'Người giới thiệu'
,
CountSponsors
:
'Số người giới thiệu'
,
...
...
This diff is collapsed.
Click to expand it.
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