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();
|
||||
if (count($ongoing_jos) <= 0)
|
||||
{
|
||||
error_log('No pending jo');
|
||||
|
||||
// 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');
|
||||
$fulfill_jo = $query->setParameters([
|
||||
|
|
@ -1346,6 +1344,9 @@ class APIController extends Controller
|
|||
if (!empty($comment))
|
||||
$rating->setComment($comment);
|
||||
|
||||
// mark jo as rider rated already
|
||||
$jo->setHasRiderRating();
|
||||
|
||||
$em->persist($rating);
|
||||
$em->flush();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue