Compare commits

...

1 commit

2 changed files with 24 additions and 0 deletions

View file

@ -1838,6 +1838,19 @@ class APIController extends Controller implements LoggedController
$jo->cancel($cancel_reason);
$jo->setDeliveryStatus(DeliveryStatus::CANCELLED);
// check if jo has a rider assigned
$rider = $jo->getRider();
if ($rider != null)
{
// need to reset rider's current job order
// TODO: do we now mark rider as available?
// still waiting for feedback on what happens to the timestamp cycle if JO is cancelled
// while rider is working on the jo
$rider->setCurrentJobOrder();
}
// add event log
$event = new JOEvent();
$event->setDateHappen(new DateTime())

View file

@ -1154,6 +1154,17 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
$obj->cancel($cancel_reason);
// check if jo has a rider assigned
$rider = $obj->getRider();
if ($rider != null)
{
// need to reset rider's current job order
// TODO: do we now mark rider as available?
// still waiting for feedback on what happens to the timestamp cycle if JO is cancelled
// while rider is working on the jo
$rider->setCurrentJobOrder();
}
// the event
$event = new JOEvent();
$event->setDateHappen(new DateTime())