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))
|
||||
$trade_in_type = 'none';
|
||||
|
||||
if ($jo->getDateStatusChange() == null)
|
||||
$date_status_change = null;
|
||||
else
|
||||
$date_status_change = $jo->getDateStatusChange()->format('Ymd H:i:s');
|
||||
|
||||
$data = [
|
||||
'id' => $jo->getID(),
|
||||
'service_type' => $jo->getServiceType(),
|
||||
|
|
@ -660,6 +665,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
|||
'longitude' => $coord->getLongitude(),
|
||||
'latitude' => $coord->getLatitude(),
|
||||
'status' => $jo->getStatus(),
|
||||
'date_status_change' => $date_status_change,
|
||||
'customer' => [
|
||||
'title' => $cust->getTitle(),
|
||||
'first_name' => $cust->getFirstName(),
|
||||
|
|
@ -1814,6 +1820,15 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
|||
return $data;
|
||||
}
|
||||
|
||||
$jo_data = $this->formatJobOrderData($jo);
|
||||
|
||||
$data = [
|
||||
'job_order' => $jo_data
|
||||
];
|
||||
|
||||
return $data;
|
||||
|
||||
/*
|
||||
$coord = $jo->getCoordinates();
|
||||
$cust = $jo->getCustomer();
|
||||
$cv = $jo->getCustomerVehicle();
|
||||
|
|
@ -1904,8 +1919,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface
|
|||
'has_motolite' => $cv->hasMotoliteBattery(),
|
||||
]
|
||||
];
|
||||
|
||||
return $data;
|
||||
*/
|
||||
}
|
||||
|
||||
public function getPaymentMethods(Request $req)
|
||||
|
|
|
|||
Loading…
Reference in a new issue