Merge branch '593-mobile-api-changes-for-resq-1-5' into 'master-fix'
Add setting of customer and vehicle when warranty is created via mobile API,... See merge request jankstudio/resq!711
This commit is contained in:
commit
2aece1fb10
1 changed files with 18 additions and 1 deletions
|
|
@ -1501,6 +1501,22 @@ class APIController extends Controller implements LoggedController
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function generateAPIRiderStatus($status)
|
||||||
|
{
|
||||||
|
switch ($status)
|
||||||
|
{
|
||||||
|
case JOStatus::PENDING:
|
||||||
|
return APIRiderStatus::OUTLET_ASSIGN;
|
||||||
|
case JOStatus::RIDER_ASSIGN:
|
||||||
|
return APIRiderStatus::RIDER_ASSIGN;
|
||||||
|
case JOStatus::ASSIGNED:
|
||||||
|
case JOStatus::IN_TRANSIT:
|
||||||
|
case JOStatus::IN_PROGRESS:
|
||||||
|
return APIRiderStatus::RIDER_PICK_UP;
|
||||||
|
}
|
||||||
|
return 'unknown';
|
||||||
|
}
|
||||||
|
|
||||||
protected function getOngoingJobOrders($cust)
|
protected function getOngoingJobOrders($cust)
|
||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
@ -1889,7 +1905,8 @@ class APIController extends Controller implements LoggedController
|
||||||
],
|
],
|
||||||
'delivery_address' => $jo->getDeliveryAddress(),
|
'delivery_address' => $jo->getDeliveryAddress(),
|
||||||
'delivery_instructions' => $jo->getDeliveryInstructions(),
|
'delivery_instructions' => $jo->getDeliveryInstructions(),
|
||||||
'status' => $status,
|
'jo_status' => $status,
|
||||||
|
'status' => $this->generateAPIRiderStatus($status),
|
||||||
];
|
];
|
||||||
|
|
||||||
// customer vehicle and warranty
|
// customer vehicle and warranty
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue