Set date cancel for all jo cancel operations #137

This commit is contained in:
Kendrick Chan 2018-06-12 06:01:11 +08:00
parent f5b220f55b
commit 778436844c
2 changed files with 5 additions and 1 deletions

View file

@ -2053,6 +2053,7 @@ class JobOrderController extends BaseController
// cancel job order
$obj->setStatus(JOStatus::CANCELLED)
->setDateCancel(new DateTime())
->setCancelReason($cancel_reason);
// set rider available

View file

@ -476,7 +476,10 @@ class RAPIController extends Controller
// TODO: refactor this into a jo handler class, so we don't have to repeat for control center
// set jo status to cancelled
$jo->setStatus(JOStatus::CANCELLED);
// TODO: set reason
$jo->setStatus(JOStatus::CANCELLED)
->setDateCancel(new DateTime());
$em->flush();
// send mqtt event