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
c5ecd381
Commit
c5ecd381
authored
May 13, 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
parents
689da5c8
6ffbb141
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
ShoppingCart.js
view/ShoppingCart.js
+23
-8
No files found.
view/ShoppingCart.js
View file @
c5ecd381
...
...
@@ -43,7 +43,7 @@ class ShoppingCart extends React.Component {
componentDidMount
()
{
console
.
log
(
this
.
props
.
voucher
.
reward
.
value
)
console
.
log
(
this
.
props
.
voucher
)
console
.
log
(
'INI VALUE : '
+
this
.
props
.
value_voucher
)
if
(
!
this
.
props
.
type_pickup
)
{
this
.
getRate
()
...
...
@@ -231,7 +231,7 @@ class ShoppingCart extends React.Component {
checkedBalance
:
true
,
checkedPoint
:
false
,
checkedBalancePoint
:
false
,
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
),
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
),
pointsused
:
0
})
}
else
{
...
...
@@ -239,7 +239,7 @@ class ShoppingCart extends React.Component {
checkedBalance
:
true
,
checkedPoint
:
false
,
checkedBalancePoint
:
false
,
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
),
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
),
pointsused
:
0
})
}
...
...
@@ -636,9 +636,18 @@ class ShoppingCart extends React.Component {
<
View
>
<
Text
style
=
{{
paddingLeft
:
20
,
paddingTop
:
10
,
color
:
'gray'
}}
>
Diskon
<
/Text
>
<
/View
>
{
this
.
props
.
value_voucher
==
''
?
(
<
View
style
=
{{
paddingRight
:
30
,
paddingTop
:
10
,
alignItems
:
'flex-end'
}}
>
<
Text
style
=
{{
color
:
'gray'
}}
>
{
this
.
state
.
diskon
}
<
/Text
>
<
/View
>
)
:
(
<
View
style
=
{{
paddingRight
:
30
,
paddingTop
:
10
,
alignItems
:
'flex-end'
}}
>
<
Text
style
=
{{
color
:
'gray'
}}
>
{
this
.
props
.
voucher
.
reward
.
value
}
<
/Text
>
<
/View
>
)
}
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
marginTop
:
10
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
marginTop
:
15
,
paddingLeft
:
20
,
paddingTop
:
10
}}
>
...
...
@@ -646,12 +655,18 @@ class ShoppingCart extends React.Component {
<
/View
>
{
this
.
props
.
type_pickup
==
true
?
(
<
View
style
=
{{
marginTop
:
15
,
paddingRight
:
30
,
paddingTop
:
10
,
alignItems
:
'flex-end'
}}
>
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
)}
<
/Text
>
{
this
.
props
.
value_voucher
==
''
?
(
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
this
.
props
.
order_total
}
<
/Text
>
)
:
(
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
)}
<
/Text
>
)
}
<
/View
>
)
:
(
<
View
style
=
{{
marginTop
:
15
,
paddingRight
:
30
,
paddingTop
:
10
,
alignItems
:
'flex-end'
}}
>
{
this
.
props
.
order_item
.
length
?
(
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
+
this
.
props
.
grabamount
)}
<
/Text
>
)
:
(
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
this
.
props
.
order_total
+
this
.
state
.
diskon
}
<
/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