Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_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
new_excelso
Commits
63f561bc
Commit
63f561bc
authored
Apr 27, 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/MenuConfirmation.js
parents
6102760c
eed0973c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
MenuConfirmation.js
view/MenuConfirmation.js
+30
-3
No files found.
view/MenuConfirmation.js
View file @
63f561bc
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
ScrollView
}
from
'react-native'
;
import
{
View
,
Text
,
Alert
,
TextInput
,
StyleSheet
,
Button
,
ScrollView
}
from
'react-native'
;
import
Axios
from
'axios'
import
Axios
from
'axios'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
class
MenuConfirmation
extends
React
.
Component
{
class
MenuConfirmation
extends
React
.
Component
{
...
@@ -24,10 +24,36 @@ class MenuConfirmation extends React.Component {
...
@@ -24,10 +24,36 @@ class MenuConfirmation extends React.Component {
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
)
this
.
setOrder
()
}
setOrder
()
{
let
params
=
{
session_id
:
this
.
props
.
session_id
,
outlet_id
:
this
.
props
.
outlet_id
,
address_id
:
this
.
props
.
addressId
,
trans_type
:
"Delivery"
,
order_item
:
this
.
props
.
order_item
,
delivery_charge
:
this
.
state
.
ongkir
,
voucher
:
[],
payment
:
{
balance
:
this
.
props
.
route
.
params
.
balanceUsed
,
point
:
this
.
props
.
route
.
params
.
pointused
}
}
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/booking'
,
params
).
then
(
res
=>
{
console
.
log
(
res
)
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
response
.
msg
);
})
}
}
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
}
>
...
@@ -106,7 +132,7 @@ class MenuConfirmation extends React.Component {
...
@@ -106,7 +132,7 @@ class MenuConfirmation extends React.Component {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
margin
:
10
}}
>
<
View
style
=
{{
margin
:
10
}}
>
<
Button
title
=
'order'
/>
<
Button
title
=
'order'
onPress
=
{
this
.
setOrder
()}
/
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
)
)
...
@@ -154,6 +180,7 @@ const mapStateToProps = (state) => {
...
@@ -154,6 +180,7 @@ const mapStateToProps = (state) => {
grabdestination
:
state
.
grabdestination
,
grabdestination
:
state
.
grabdestination
,
balanceUsed
:
state
.
balanceUsed
,
balanceUsed
:
state
.
balanceUsed
,
pointused
:
state
.
pointsused
,
pointused
:
state
.
pointsused
,
addressId
:
state
.
addressId
}
}
}
}
...
...
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