@@ -226,7 +231,6 @@ class DeliveryAddrees extends React.Component {
...
@@ -226,7 +231,6 @@ class DeliveryAddrees extends React.Component {
// { cancelable: false }
// { cancelable: false }
// )
// )
}
}
deleteAddress(id){
deleteAddress(id){
...
@@ -242,6 +246,64 @@ class DeliveryAddrees extends React.Component {
...
@@ -242,6 +246,64 @@ class DeliveryAddrees extends React.Component {
})
})
}
}
handleVoucherSelect(){
//SPINNER ON
this.setState({
spinner:true,
})
//CEK TYPE TRANSAKSINYA DELIVERY OR PICKUP, DICEK UNTUK DI MASUKAN DI PARAMATER PEMANGGILAN API
lettype_trans=""
if(this.props.type_pickup==true){
type_trans='Pickup'
}else{
type_trans='Delivery'
}
letparams={
session_id:this.props.session_id,
trans_type:type_trans,
order_item:this.props.order_item,
reward_id:this.props.voucher.id,
delivery_charge:this.props.grabamount,
}
// MULAI DISINI PEMANGGILAN API DI MULAI, KALAU BERHASIL SET VALUE VOUCHER NYA DAN SPINER DIMATIKAN, KALAU GAGAL CABUT SESSION VOUCHER DAN SPINNER DI MATIKAN
@@ -39,6 +39,64 @@ class PickupName extends React.Component {
...
@@ -39,6 +39,64 @@ class PickupName extends React.Component {
}
}
handleVoucherSelect(){
//SPINNER ON
this.setState({
spinner:true,
})
//CEK TYPE TRANSAKSINYA DELIVERY OR PICKUP, DICEK UNTUK DI MASUKAN DI PARAMATER PEMANGGILAN API
lettype_trans=""
if(this.props.type_pickup==true){
type_trans='Pickup'
}else{
type_trans='Delivery'
}
letparams={
session_id:this.props.session_id,
trans_type:type_trans,
order_item:this.props.order_item,
reward_id:this.props.voucher.id,
delivery_charge:this.props.grabamount,
}
// MULAI DISINI PEMANGGILAN API DI MULAI, KALAU BERHASIL SET VALUE VOUCHER NYA DAN SPINER DIMATIKAN, KALAU GAGAL CABUT SESSION VOUCHER DAN SPINNER DI MATIKAN
@@ -66,14 +68,62 @@ class RewardDetail extends React.Component {
...
@@ -66,14 +68,62 @@ class RewardDetail extends React.Component {
}
}
useVoucher(){
handleVoucherSelect(){
letvoucherProps={
//SPINNER ON
value_voucher:this.state.value,
this.setState({
voucher:this.state.value
spinner:true,
})
//CEK TYPE TRANSAKSINYA DELIVERY OR PICKUP, DICEK UNTUK DI MASUKAN DI PARAMATER PEMANGGILAN API
lettype_trans=""
if(this.props.type_pickup==true){
type_trans='Pickup'
}else{
type_trans='Delivery'
}
letparams={
session_id:this.props.session_id,
trans_type:type_trans,
order_item:this.props.order_item,
reward_id:this.props.route.params.rewardId,
delivery_charge:this.props.grabamount,
}
}
// MULAI DISINI PEMANGGILAN API DI MULAI, KALAU BERHASIL SET VALUE VOUCHER NYA DAN SPINER DIMATIKAN, KALAU GAGAL CABUT SESSION VOUCHER DAN SPINNER DI MATIKAN