@@ -83,6 +83,8 @@ class DeliveryAddrees extends React.Component {
})
}
getRate(address_id){
// console.log('ADdress id : ' + address_id)
...
...
@@ -160,7 +162,9 @@ class DeliveryAddrees extends React.Component {
onSave(address,id,name){
if(this.props.value_voucher!==""){
this.handleVoucherSelect()
}else{
letsetDataAddress={
address:address,
addressId:id,
...
...
@@ -207,6 +211,7 @@ class DeliveryAddrees extends React.Component {
console.log('ini error '+response.msg)
Alert.alert('',response.msg)
})
}
// let recalculateProps = {
...
...
@@ -226,7 +231,6 @@ class DeliveryAddrees extends React.Component {
// { cancelable: false }
// )
}
deleteAddress(id){
...
...
@@ -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 {
}
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,15 +68,63 @@ class RewardDetail extends React.Component {
}
useVoucher(){
letvoucherProps={
value_voucher:this.state.value,
voucher:this.state.value
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.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