From 198406a5ec475a30a617fd5135c53f5d0cc0e7d7 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sun, 23 Aug 2020 01:33:26 +0800 Subject: [PATCH] Add notification sending for JOs cancelled by rider #472 --- src/Service/RiderAPIHandler/CMBRiderAPIHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index 94c213f8..6441bf41 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -1076,6 +1076,10 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $this->em->flush(); + // notification + $notif_url = $this->router->generate('jo_onestep_edit_form', ['id' => $jo->getID()]); + $this->nm->sendNotification(0, 'Job order has been cancelled by rider.', $notif_url); + return $data; }