From 171fa14e409afe6a693558cd60d89327b8913de3 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Fri, 4 Sep 2020 08:41:20 +0000 Subject: [PATCH] Add job order number to notifications. Add cancel reason to notifications if JO is cancelled. #484 --- src/Service/RiderAPIHandler/CMBRiderAPIHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index 80a8301b..ff333bb6 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -1086,7 +1086,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface // 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); + $this->nm->sendNotification(0, 'Job order #' . $jo->getID() . ' has been cancelled by rider. Reason: ' . $jo->getCancelReason() . '.', $notif_url); return $data; } @@ -1174,7 +1174,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $this->mclient->publish($channel, $rider_status); $notif_url = $this->router->generate('jo_onestep_edit_form', ['id' => $jo->getID()]); - $this->nm->sendNotification(0, 'Job order has been rejected by rider.', $notif_url); + $this->nm->sendNotification(0, 'Job order #' . $jo->getID() . ' has been rejected by rider.', $notif_url); return $data; }