Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Prasetya Saputra
clone_excelso
Commits
b310545b
Commit
b310545b
authored
Aug 21, 2020
by
William Goszal
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix transaction history kurang conditional buat claim balance
parent
55e1f394
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
10 deletions
+36
-10
TransactionHistory.js
view/TransactionHistory.js
+36
-10
No files found.
view/TransactionHistory.js
View file @
b310545b
...
@@ -39,7 +39,7 @@ class TransactionHistory extends React.Component {
...
@@ -39,7 +39,7 @@ class TransactionHistory extends React.Component {
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
session_id
:
this
.
props
.
session_id
}
}
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/transaction/history'
,
params
).
then
(
res
=>
{
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/transaction/history'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
transactions
let
data
=
res
.
data
.
transactions
console
.
log
(
data
)
console
.
log
(
data
)
data
.
map
((
item
)
=>
{
data
.
map
((
item
)
=>
{
...
@@ -93,6 +93,7 @@ class TransactionHistory extends React.Component {
...
@@ -93,6 +93,7 @@ class TransactionHistory extends React.Component {
item
.
transactions
.
map
((
i
,
k
)
=>
(
item
.
transactions
.
map
((
i
,
k
)
=>
(
/** TYPE_CARD_ACTIVATION */
i
.
type
==
1
?
(
i
.
type
==
1
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
...
@@ -109,6 +110,7 @@ class TransactionHistory extends React.Component {
...
@@ -109,6 +110,7 @@ class TransactionHistory extends React.Component {
<
/View
>
<
/View
>
)
:
)
:
/** TYPE_TRANSACTION */
i
.
type
==
2
?
(
i
.
type
==
2
?
(
<
TouchableOpacity
key
=
{
k
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
i
.
id
})}
>
<
TouchableOpacity
key
=
{
k
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
i
.
id
})}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
...
@@ -133,6 +135,7 @@ class TransactionHistory extends React.Component {
...
@@ -133,6 +135,7 @@ class TransactionHistory extends React.Component {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)
:
)
:
/** TYPE_TOPUP_CASHBACK */
i
.
type
==
3
?
(
i
.
type
==
3
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
...
@@ -149,6 +152,7 @@ class TransactionHistory extends React.Component {
...
@@ -149,6 +152,7 @@ class TransactionHistory extends React.Component {
<
/View
>
<
/View
>
)
:
)
:
/** TYPE_TRANS_CASHBACK */
i
.
type
==
4
?
(
i
.
type
==
4
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
...
@@ -165,6 +169,7 @@ class TransactionHistory extends React.Component {
...
@@ -165,6 +169,7 @@ class TransactionHistory extends React.Component {
<
/View
>
<
/View
>
)
:
)
:
/** TYPE_TRANSFER_BALANCE */
i
.
type
==
5
?
(
i
.
type
==
5
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
...
@@ -181,6 +186,7 @@ class TransactionHistory extends React.Component {
...
@@ -181,6 +186,7 @@ class TransactionHistory extends React.Component {
<
/View
>
<
/View
>
)
:
)
:
/** TYPE_TRANSFER_RECEIVE */
i
.
type
==
6
?
(
i
.
type
==
6
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
...
@@ -195,7 +201,27 @@ class TransactionHistory extends React.Component {
...
@@ -195,7 +201,27 @@ class TransactionHistory extends React.Component {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
(
)
:
/** TYPE_CLAIM_BALANCE */
i
.
type
==
8
?
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1.1
,
justifyContent
:
'center'
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
i
.
type_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
moment
(
i
.
trans_time
).
format
(
"DD MMMM YYYY, hh:mm A"
)}
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.9
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
margin
:
10
,
marginLeft
:
15
,
borderLeftWidth
:
1
,
borderColor
:
'#838383'
}}
>
<
View
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
i
.
point_add
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
}}
>
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
/** TYPE_RENEWAL */
(
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
borderColor
:
'#838383'
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1.1
,
justifyContent
:
'center'
,
margin
:
10
}}
>
<
View
style
=
{{
flex
:
1.1
,
justifyContent
:
'center'
,
margin
:
10
}}
>
...
...
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