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
37bed8b2
Commit
37bed8b2
authored
Jun 05, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
# Conflicts: # view/Home.js
parents
31d8beef
3f11d92e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
46 deletions
+66
-46
Home.js
view/Home.js
+4
-4
OrderDetail.js
view/OrderDetail.js
+2
-2
RedeemCode.js
view/RedeemCode.js
+11
-1
UseBalance.js
view/UseBalance.js
+49
-39
No files found.
view/Home.js
View file @
37bed8b2
...
...
@@ -396,7 +396,7 @@ class Home extends React.Component {
// style={styles.submitUpgradePemium}
activeOpacity
=
{.
5
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'TopUpInfo'
)}
>
<
View
style
=
{
styles
.
topUseBalance
}
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
15
}}
>
TOP
BALANCE
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
15
}}
>
TOP
UP
BALANCE
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
TouchableOpacity
...
...
@@ -489,14 +489,14 @@ const styles = StyleSheet.create({
topUseBalance
:
{
flex
:
0.5
,
height
:
40
,
backgroundColor
:
'green'
,
top
:
20
,
margin
:
5
,
padding
:
10
,
paddingHorizontal
:
15
,
paddingBottom
:
10
,
paddingHorizontal
:
16
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
paddingBottom
:
-
5
//
paddingBottom: -5
},
line
:
{
...
...
view/OrderDetail.js
View file @
37bed8b2
...
...
@@ -245,7 +245,7 @@ class OrderDetail extends React.Component {
<
/View
>
<
View
style
=
{{
flex
:
0.4
,
alignItems
:
'baseline'
,
justifyContent
:
'center'
,
alignItems
:
'flex-start'
,
paddingLeft
:
10
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
}}
>
{
item
.
item_name
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
top
:
10
}}
>
{
item
.
item_note
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
top
:
10
}}
>
Keterangan
:
{
item
.
item_note
}
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.3
,
alignItems
:
'flex-end'
,
justifyContent
:
'center'
,
paddingRight
:
10
}}
>
{
/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.item_quantity * item.item_price} </Text> */
}
...
...
@@ -375,7 +375,7 @@ class OrderDetail extends React.Component {
this
.
state
.
is_reviewed
?
(
<
View
style
=
{{
height
:
70
,
borderWidth
:
1
,
borderRadius
:
10
,
justifyContent
:
'center'
,
margin
:
30
,
borderColor
:
'#CFB368'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
You
Rated
({
this
.
state
.
review_rating
})
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
,
fontSize
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
You
Rated
<
/Text
>
<
Rating
imageSize
=
{
20
}
style
=
{{
top
:
5
}}
readonly
startingValue
=
{
this
.
state
.
review_rating
}
ratingBackgroundColor
=
'#CFB368'
/>
<
/View
>
...
...
view/RedeemCode.js
View file @
37bed8b2
...
...
@@ -57,6 +57,16 @@ class RedeemCode extends React.Component {
}
else
{
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
''
,
response
.
msg
);
let
redeemProps
=
{
in_payment
:
false
,
redeem_code
:
''
,
balance_redeem
:
''
,
point_redeem
:
''
}
this
.
props
.
setRedeem
(
redeemProps
)
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
screen
:
'HOME'
});
}
})
...
...
@@ -64,7 +74,7 @@ class RedeemCode extends React.Component {
}
render
()
{
console
.
log
(
this
.
props
)
//
console.log(this.props)
return
(
<
View
style
=
{
styles
.
container
}
>
{
/* <View style={styles.header}>
...
...
view/UseBalance.js
View file @
37bed8b2
...
...
@@ -59,7 +59,15 @@ class UseBalance extends React.Component {
kasproPoint
:
dataCard
.
kaspro_point
.
replace
(
/,/g
,
''
)
})
console
.
log
(
"INI SESSION "
+
this
.
props
.
session_id
)
// // Buat Debug
// this.setState({
// current_balance: '5,000',
// kaspro_point: '10,000',
// kasproBalance: '5,000'.replace(/,/g, ''),
// kasproPoint: '10,000'.replace(/,/g, '')
// })
// console.log("INI SESSION " + this.props.session_id)
// console.log(this.state.kasproPoint)
}).
catch
(
error
=>
{
// console.log('ini error ' + error)
...
...
@@ -120,10 +128,10 @@ class UseBalance extends React.Component {
let
params
=
{
session_id
:
this
.
props
.
session_id
,
pin
:
this
.
state
.
pin
,
balance
:
this
.
state
.
input_redeem
,
balance
:
parseInt
(
this
.
state
.
input_redeem
)
,
point
:
0
}
//
console.log(params)
console
.
log
(
params
)
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/point/redeem'
,
params
).
then
(
res
=>
{
// console.log(res.data)
...
...
@@ -160,7 +168,7 @@ class UseBalance extends React.Component {
session_id
:
this
.
props
.
session_id
,
pin
:
this
.
state
.
pin
,
balance
:
0
,
point
:
this
.
state
.
input_redeem
point
:
parseInt
(
this
.
state
.
input_redeem
)
}
console
.
log
(
params
)
...
...
@@ -201,7 +209,7 @@ class UseBalance extends React.Component {
session_id
:
this
.
props
.
session_id
,
pin
:
this
.
state
.
pin
,
balance
:
parseInt
(
this
.
state
.
input_redeem
)
-
parseInt
(
this
.
state
.
kasproPoint
),
point
:
this
.
state
.
kasproPoint
point
:
parseInt
(
this
.
state
.
kasproPoint
)
}
console
.
log
(
params
)
...
...
@@ -236,7 +244,7 @@ class UseBalance extends React.Component {
session_id
:
this
.
props
.
session_id
,
pin
:
this
.
state
.
pin
,
balance
:
0
,
point
:
this
.
state
.
input_redeem
point
:
parseInt
(
this
.
state
.
input_redeem
)
}
console
.
log
(
params
)
...
...
@@ -273,7 +281,9 @@ class UseBalance extends React.Component {
}
render
()
{
console
.
log
(
parseInt
(
this
.
state
.
kasproPoint
)
-
parseInt
(
this
.
state
.
input_redeem
))
// console.log(parseInt(this.state.kasproPoint) - parseInt(this.state.input_redeem))
// console.log(this.state.kasproBalance)
// console.log(this.state.kasproPoint)
return
(
<
ScrollView
style
=
{
styles
.
container
}
>
<
Modal
animationType
=
"slide"
...
...
@@ -341,7 +351,7 @@ class UseBalance extends React.Component {
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
this
.
state
.
input_redeem
==
0
?
(
this
.
state
.
input_redeem
==
0
||
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproBalance
)
?
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
...
...
@@ -379,7 +389,7 @@ class UseBalance extends React.Component {
<
/View
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
this
.
state
.
input_redeem
==
0
?
(
this
.
state
.
input_redeem
==
0
||
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproPoint
)
?
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
...
...
@@ -418,40 +428,40 @@ class UseBalance extends React.Component {
<
/View
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
this
.
state
.
input_redeem
!=
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
/View
>
<
View
>
<
CheckBox
onClick
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
isChecked
=
{
this
.
state
.
checkedBalancePoint
}
checkedImage
=
{
<
FontAwesome
name
=
'check-circle'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
unCheckedImage
=
{
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
/>
<
/View
>
this
.
state
.
input_redeem
==
0
||
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproPoint
)
+
parseInt
(
this
.
state
.
kasproBalance
)
?
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
/View
>
<
/Card
>
<
/TouchableOpacity
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
/View
>
<
/View
>
<
/Card
>
)
:
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
/View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
/View
>
<
View
>
<
CheckBox
onClick
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
isChecked
=
{
this
.
state
.
checkedBalancePoint
}
checkedImage
=
{
<
FontAwesome
name
=
'check-circle'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
unCheckedImage
=
{
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
/>
<
/View
>
<
/View
>
<
/
View
>
<
/
Card
>
<
/
Card
>
<
/
TouchableOpacity
>
)
}
...
...
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