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
53e6cbaf
Commit
53e6cbaf
authored
Sep 24, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merubah url select voucher dari get_detail ke get_value
parent
f67b262a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
5 deletions
+41
-5
RewardSelect.js
view/RewardSelect.js
+41
-5
No files found.
view/RewardSelect.js
View file @
53e6cbaf
...
...
@@ -42,11 +42,22 @@ class RewardSelect extends React.Component {
// }
handleSelect
(
item
)
{
let
params
=
Object
.
assign
(
requestParams
,{
let
type_trans
=
""
if
(
this
.
props
.
type_pickup
==
true
)
{
type_trans
=
'Pickup'
}
else
{
type_trans
=
'Delivery'
}
let
params
=
{
session_id
:
this
.
props
.
session_id
,
reward_id
:
item
.
id
})
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/reward/get_detail'
,
params
).
then
(
res
=>
{
trans_type
:
type_trans
,
order_item
:
this
.
props
.
order_item
,
reward_id
:
item
.
id
,
delivery_charge
:
this
.
props
.
grabamount
,
}
console
.
log
(
params
)
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/reward/get_value'
,
params
).
then
(
res
=>
{
// console.log(res.data.reward)
let
detail
=
res
.
data
.
reward
let
voucherProps
=
{
...
...
@@ -60,6 +71,9 @@ class RewardSelect extends React.Component {
// console.log(this.props.voucher)
// console.log(this.props.value_voucher)
this
.
props
.
navigation
.
goBack
()
}).
catch
(
error
=>
{
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
response
.
status
,
response
.
msg
);
})
}
getRewardsList
()
{
...
...
@@ -160,7 +174,29 @@ const mapStateToProps = (state) => {
session_id
:
state
.
session_id
,
value_voucher
:
state
.
value_voucher
,
voucher
:
state
.
voucher
,
BASE_URL
:
state
.
BASE_URL
BASE_URL
:
state
.
BASE_URL
,
home_address
:
state
.
home_address
,
type_pickup
:
state
.
type_pickup
,
value_voucher
:
state
.
value_voucher
,
voucher
:
state
.
voucher
,
session_id
:
state
.
session_id
,
outlet_id
:
state
.
outlet_id
,
name_outlet
:
state
.
name_outlet
,
value_voucher
:
state
.
value_voucher
,
voucher
:
state
.
voucher
,
order_quantity
:
state
.
order_quantity
,
order_total
:
state
.
order_total
,
order_item
:
state
.
order_item
,
quantity
:
state
.
quantity
,
address
:
state
.
address
,
addressId
:
state
.
addressId
,
grabtype
:
state
.
grabtype
,
grabamount
:
state
.
grabamount
,
grabpickup
:
state
.
grabpickup
,
grabdropoff
:
state
.
grabdropoff
,
grabdestination
:
state
.
grabdestination
,
BASE_URL
:
state
.
BASE_URL
,
}
}
...
...
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