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
987b2cca
Commit
987b2cca
authored
Apr 24, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3d11b3d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
ShoppingCart.js
view/ShoppingCart.js
+22
-11
No files found.
view/ShoppingCart.js
View file @
987b2cca
...
...
@@ -20,6 +20,8 @@ class ShoppingCart extends React.Component {
checkedBalancePoint
:
false
,
balanceused
:
0
,
pointsused
:
0
,
// dummyBalance : 155000,
// dummyPoint : 20000
}
}
...
...
@@ -75,10 +77,20 @@ class ShoppingCart extends React.Component {
checkedBalance
:
false
,
checkedPoint
:
false
,
checkedBalancePoint
:
true
,
pointsused
:
this
.
state
.
kasproPoint
,
balanceused
:
this
.
props
.
order_total
-
this
.
state
.
kasproPoint
// balanceused : this.props.order_total - this.state.dummyPoint,
// pointsused : this.props.order_total,
})
if
(
this
.
state
.
kasproPoint
-
this
.
props
.
order_total
>=
-
1
)
{
this
.
setState
({
pointsused
:
this
.
props
.
order_total
})
}
else
{
this
.
setState
({
balanceused
:
this
.
props
.
order_total
-
this
.
state
.
kasproPoint
,
pointsused
:
this
.
state
.
kasproPoint
})
}
...
...
@@ -168,6 +180,11 @@ class ShoppingCart extends React.Component {
})}
<
/View
>
<
View
style
=
{
styles
.
voucher
}
>
<
TouchableOpacity
>
<
Text
style
=
{{
color
:
'#ccb46c'
}}
>+
ADD
VOUCHER
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
payment
}
>
<
Text
>
PAYMENT
METHODS
<
/Text
>
...
...
@@ -251,7 +268,7 @@ class ShoppingCart extends React.Component {
<
/View
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
this
.
state
.
kasproPoint
+
this
.
state
.
kasproBalance
>=
this
.
props
.
order_total
&&
this
.
state
.
kasproBalance
!=
0
?
(
this
.
state
.
kasproPoint
+
this
.
state
.
kasproBalance
>=
this
.
props
.
order_total
&&
this
.
state
.
kasproBalance
!=
0
&&
this
.
state
.
kasproPoint
!=
0
?
(
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
>
...
...
@@ -313,17 +330,11 @@ class ShoppingCart extends React.Component {
<
/Card
>
<
/View
>
<
View
style
=
{
styles
.
voucher
}
>
<
TouchableOpacity
>
<
Text
style
=
{{
color
:
'#ccb46c'
}}
>+
ADD
VOUCHER
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{
styles
.
paymentDetails
}
>
<
Text
>
PAYMENT
DETAILS
<
/Text
>
<
/View
>
<
View
style
=
{{
margin
:
10
}}
>
<
Text
style
=
{{
paddingLeft
:
20
,
paddingTop
:
15
,
color
:
'gray'
}}
>
Detail
Pembayaran
<
/Text
>
{
/* <Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Detail Pembayaran</Text> */
}
<
View
style
=
{{
flexDirection
:
'row'
,
marginTop
:
10
,
justifyContent
:
'space-between'
}}
>
<
View
>
<
Text
style
=
{{
paddingLeft
:
20
,
paddingTop
:
15
,
color
:
'gray'
}}
>
Harga
<
/Text
>
...
...
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