Support null date_status_change for rider api #424
This commit is contained in:
parent
5e75608402
commit
59e6e9eb5c
1 changed files with 16 additions and 2 deletions
|
|
@ -653,6 +653,11 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
if (empty($trade_in_type))
|
if (empty($trade_in_type))
|
||||||
$trade_in_type = 'none';
|
$trade_in_type = 'none';
|
||||||
|
|
||||||
|
if ($jo->getDateStatusChange() == null)
|
||||||
|
$date_status_change = null;
|
||||||
|
else
|
||||||
|
$date_status_change = $jo->getDateStatusChange()->format('Ymd H:i:s');
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'id' => $jo->getID(),
|
'id' => $jo->getID(),
|
||||||
'service_type' => $jo->getServiceType(),
|
'service_type' => $jo->getServiceType(),
|
||||||
|
|
@ -660,6 +665,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
'longitude' => $coord->getLongitude(),
|
'longitude' => $coord->getLongitude(),
|
||||||
'latitude' => $coord->getLatitude(),
|
'latitude' => $coord->getLatitude(),
|
||||||
'status' => $jo->getStatus(),
|
'status' => $jo->getStatus(),
|
||||||
|
'date_status_change' => $date_status_change,
|
||||||
'customer' => [
|
'customer' => [
|
||||||
'title' => $cust->getTitle(),
|
'title' => $cust->getTitle(),
|
||||||
'first_name' => $cust->getFirstName(),
|
'first_name' => $cust->getFirstName(),
|
||||||
|
|
@ -1814,6 +1820,15 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$jo_data = $this->formatJobOrderData($jo);
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'job_order' => $jo_data
|
||||||
|
];
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
/*
|
||||||
$coord = $jo->getCoordinates();
|
$coord = $jo->getCoordinates();
|
||||||
$cust = $jo->getCustomer();
|
$cust = $jo->getCustomer();
|
||||||
$cv = $jo->getCustomerVehicle();
|
$cv = $jo->getCustomerVehicle();
|
||||||
|
|
@ -1904,8 +1919,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
||||||
'has_motolite' => $cv->hasMotoliteBattery(),
|
'has_motolite' => $cv->hasMotoliteBattery(),
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
*/
|
||||||
return $data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPaymentMethods(Request $req)
|
public function getPaymentMethods(Request $req)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue