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
be5fa969
Commit
be5fa969
authored
May 04, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hilangin console.log
parent
fbb969aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
globalReducer.js
redux/globalReducer.js
+4
-4
MenuConfirmation.js
view/MenuConfirmation.js
+13
-14
No files found.
redux/globalReducer.js
View file @
be5fa969
...
@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => {
...
@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => {
update
.
quantity
=
1
update
.
quantity
=
1
}
}
update
.
quantity
+=
1
update
.
quantity
+=
1
//
console.log('Update : ' + JSON.stringify(update))
console
.
log
(
'Update : '
+
JSON
.
stringify
(
update
))
data
=
{
...
old_data
,
...
update
}
data
=
{
...
old_data
,
...
update
}
}
}
...
@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => {
...
@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => {
}
else
{
}
else
{
// add
// add
addedItem
.
quantity
=
1
addedItem
.
quantity
=
1
//
console.log('Baru : ' + JSON.stringify(addedItem))
console
.
log
(
'Baru : '
+
JSON
.
stringify
(
addedItem
))
order_item
=
[...
state
.
order_item
,
addedItem
]
order_item
=
[...
state
.
order_item
,
addedItem
]
}
}
...
@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => {
...
@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => {
data
=
null
data
=
null
}
else
{
}
else
{
update
.
quantity
-=
1
update
.
quantity
-=
1
//
console.log('Update : ' + JSON.stringify(update))
console
.
log
(
'Update : '
+
JSON
.
stringify
(
update
))
data
=
{
...
old_data
,
...
update
}
data
=
{
...
old_data
,
...
update
}
}
}
}
}
...
@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => {
...
@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => {
let
quantity
=
state
.
order_quantity
let
quantity
=
state
.
order_quantity
let
total
=
parseInt
(
state
.
order_total
)
-
parseInt
(
addedItem
.
price
)
let
total
=
parseInt
(
state
.
order_total
)
-
parseInt
(
addedItem
.
price
)
//
console.log("UPDATE " + order_item)
console
.
log
(
"UPDATE "
+
order_item
)
}
}
return
{
return
{
...
...
view/MenuConfirmation.js
View file @
be5fa969
...
@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component {
...
@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component {
}
}
componentDidMount
(){
componentDidMount
(){
//
console.log(" DESTINASI : "+ this.props.grabdestination)
console
.
log
(
" DESTINASI : "
+
this
.
props
.
grabdestination
)
//
console.log("ONGKIR"+ this.props.grabamount)
console
.
log
(
"ONGKIR"
+
this
.
props
.
grabamount
)
//
console.log("drop off"+this.props.grabdropoff)
console
.
log
(
"drop off"
+
this
.
props
.
grabdropoff
)
//
console.log("pickup"+this.props.grabpickup)
console
.
log
(
"pickup"
+
this
.
props
.
grabpickup
)
//
console.log("type" +this.props.grabtype)
console
.
log
(
"type"
+
this
.
props
.
grabtype
)
//
console.log("BALANCED" +this.props.balanceUsed)
console
.
log
(
"BALANCED"
+
this
.
props
.
balanceUsed
)
//
console.log("POINT" +this.props.pointsused)
console
.
log
(
"POINT"
+
this
.
props
.
pointsused
)
}
}
...
@@ -71,7 +71,7 @@ class MenuConfirmation extends React.Component {
...
@@ -71,7 +71,7 @@ class MenuConfirmation extends React.Component {
);
);
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
let
response
=
error
.
response
.
data
;
//
console.log('error')
console
.
log
(
'error'
)
Alert
.
alert
(
response
.
msg
);
Alert
.
alert
(
response
.
msg
);
this
.
setState
({
this
.
setState
({
spinner
:
false
,
spinner
:
false
,
...
@@ -81,15 +81,14 @@ class MenuConfirmation extends React.Component {
...
@@ -81,15 +81,14 @@ class MenuConfirmation extends React.Component {
orderSuccess
=
()
=>
{
orderSuccess
=
()
=>
{
this
.
props
.
setOrderFinish
()
this
.
props
.
setOrderFinish
()
this
.
props
.
navigation
.
navigate
(
'Home'
,
{
this
.
props
.
navigation
.
reset
({
screen
:
'ORDER'
,
routes
:
[{
name
:
'Home'
}]
params
:
{
user
:
'jax'
},
})
});
}
}
render
()
{
render
()
{
//
console.log(this.props)
console
.
log
(
this
.
props
)
let
total
=
0
let
total
=
0
return
(
return
(
<
ScrollView
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
container
}
>
...
@@ -230,7 +229,7 @@ const mapDispatchToProps = (dispacth) => {
...
@@ -230,7 +229,7 @@ const mapDispatchToProps = (dispacth) => {
}
}
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
//
console.log(state)
console
.
log
(
state
)
return
{
return
{
session_id
:
state
.
session_id
,
session_id
:
state
.
session_id
,
type_pickup
:
state
.
type_pickup
,
type_pickup
:
state
.
type_pickup
,
...
...
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