Fix rider available ajax call to rely on active job order #424
This commit is contained in:
parent
3f2cc2b82a
commit
e79ae22f32
1 changed files with 4 additions and 4 deletions
|
|
@ -602,11 +602,11 @@ class RiderController extends Controller
|
|||
*/
|
||||
public function ajaxAvailable(EntityManagerInterface $em, Rider $rider)
|
||||
{
|
||||
$jos = $rider->getOpenJobOrders();
|
||||
if (count($jos) > 0)
|
||||
$avail = 'available';
|
||||
$jo = $rider->getRiderActiveJobOrder();
|
||||
if ($jo == null)
|
||||
$avail = 'available';
|
||||
else
|
||||
$avail = 'unavaiable';
|
||||
$avail = 'unavailable';
|
||||
|
||||
$response = new Response(
|
||||
$avail,
|
||||
|
|
|
|||
Loading…
Reference in a new issue