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
cba8fd80
Commit
cba8fd80
authored
May 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/ShoppingCart.js
parents
89ea7675
4e013512
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
24 deletions
+39
-24
ShoppingCart.js
view/ShoppingCart.js
+39
-24
No files found.
view/ShoppingCart.js
View file @
cba8fd80
...
@@ -123,36 +123,51 @@ class ShoppingCart extends React.Component {
...
@@ -123,36 +123,51 @@ class ShoppingCart extends React.Component {
price
:
item
.
price
,
price
:
item
.
price
,
}
}
this
.
props
.
reduceQuantityItem
(
order_item
)
let
quantity
=
0
if
(
is_xist
.
quantity
==
1
)
{
for
(
let
i
=
0
;
i
<
list_order_item
.
length
;
i
++
)
{
Alert
.
alert
(
const
row
=
list_order_item
[
i
];
"Delete item"
,
if
(
row
.
id
==
item
.
id
)
{
"Are you sure want to delete item?"
,
quantity
=
row
.
quantity
[
}
{
text
:
'Cancel'
,
}
onPress
:
()
=>
console
.
log
(
'Cancel Delete Item'
),
style
:
'cancel'
,
if
(
quantity
==
0
)
{
},
Alert
.
alert
(
"Apakah anda ingin menghapus pesanan?"
);
{
const
order_item
=
{
text
:
'Delete Item'
,
onPress
:
()
=>
{
id
:
item
.
id
,
this
.
props
.
reduceQuantityItem
(
order_item
)
name
:
item
.
name
,
price
:
item
.
price
,
if
(
is_xist
.
quantity
==
0
)
{
note
:
item
.
note
,
const
order_item
=
{
image
:
item
.
image
,
id
:
item
.
id
,
description
:
item
.
description
,
name
:
item
.
name
,
quantity
:
item
.
quantity
price
:
item
.
price
,
note
:
item
.
note
,
}
image
:
item
.
image
,
description
:
item
.
description
,
this
.
props
.
removeFromChart
(
order_item
)
quantity
:
item
.
quantity
}
this
.
props
.
removeFromChart
(
order_item
)
}
}
},
],
{
cancelable
:
false
},
)
}
else
{
this
.
props
.
reduceQuantityItem
(
order_item
)
}
}
}
}
}
}
}
}
deleteItem
()
{
}
handleAdd
(
item
,
index
)
{
handleAdd
(
item
,
index
)
{
const
order_item
=
{
const
order_item
=
{
...
...
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