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
c5f58433
Commit
c5f58433
authored
May 13, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6ffbb141
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
15 deletions
+40
-15
ShoppingCart.js
view/ShoppingCart.js
+40
-15
No files found.
view/ShoppingCart.js
View file @
c5f58433
...
...
@@ -227,6 +227,15 @@ class ShoppingCart extends React.Component {
// console.log(val)
if
(
val
==
'balance'
)
{
if
(
this
.
props
.
type_pickup
==
true
)
{
if
(
this
.
props
.
value_voucher
==
''
)
{
this
.
setState
({
checkedBalance
:
true
,
checkedPoint
:
false
,
checkedBalancePoint
:
false
,
balanceused
:
this
.
props
.
order_total
,
pointsused
:
0
})
}
else
{
this
.
setState
({
checkedBalance
:
true
,
checkedPoint
:
false
,
...
...
@@ -234,6 +243,16 @@ class ShoppingCart extends React.Component {
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
-
this
.
props
.
voucher
.
reward
.
value
),
pointsused
:
0
})
}
}
else
{
if
(
this
.
props
.
value_voucher
==
''
)
{
this
.
setState
({
checkedBalance
:
true
,
checkedPoint
:
false
,
checkedBalancePoint
:
false
,
balanceused
:
Math
.
max
(
0
,
this
.
props
.
order_total
+
this
.
props
.
grabamount
),
pointsused
:
0
})
}
else
{
this
.
setState
({
checkedBalance
:
true
,
...
...
@@ -243,6 +262,7 @@ class ShoppingCart extends React.Component {
pointsused
:
0
})
}
}
}
else
if
(
val
==
'point'
)
{
if
(
this
.
props
.
type_pickup
==
true
)
{
this
.
setState
({
...
...
@@ -665,10 +685,15 @@ class ShoppingCart extends React.Component {
<
/View
>
)
:
(
<
View
style
=
{{
marginTop
:
15
,
paddingRight
:
30
,
paddingTop
:
10
,
alignItems
:
'flex-end'
}}
>
{
this
.
props
.
order_item
.
length
?
(
{
/* {
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' }}>{this.props.order_total + this.state.diskon}</Text>
)} */
}
{
this
.
props
.
value_voucher
==
''
?
(
<
Text
style
=
{{
fontSize
:
35
,
color
:
'#ccb46c'
}}
>
{
this
.
props
.
order_total
+
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
>
)}
<
/View
>
...
...
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