Mark JO as rider rated when post rider rating api call is used #162
This commit is contained in:
parent
f47e280b37
commit
fa659226bc
1 changed files with 3 additions and 2 deletions
|
|
@ -1101,8 +1101,6 @@ class APIController extends Controller
|
||||||
// return $res->getReturnResponse();
|
// return $res->getReturnResponse();
|
||||||
if (count($ongoing_jos) <= 0)
|
if (count($ongoing_jos) <= 0)
|
||||||
{
|
{
|
||||||
error_log('No pending jo');
|
|
||||||
|
|
||||||
// check if the latest fulfilled jo they have needs rider rating
|
// check if the latest fulfilled jo they have needs rider rating
|
||||||
$query = $em->createQuery('select jo from App\Entity\JobOrder jo where jo.customer = :cust and jo.status = :status order by jo.date_fulfill desc');
|
$query = $em->createQuery('select jo from App\Entity\JobOrder jo where jo.customer = :cust and jo.status = :status order by jo.date_fulfill desc');
|
||||||
$fulfill_jo = $query->setParameters([
|
$fulfill_jo = $query->setParameters([
|
||||||
|
|
@ -1346,6 +1344,9 @@ class APIController extends Controller
|
||||||
if (!empty($comment))
|
if (!empty($comment))
|
||||||
$rating->setComment($comment);
|
$rating->setComment($comment);
|
||||||
|
|
||||||
|
// mark jo as rider rated already
|
||||||
|
$jo->setHasRiderRating();
|
||||||
|
|
||||||
$em->persist($rating);
|
$em->persist($rating);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue