From 92a7380b4fadc07d1e40ca951e59f6d5011d789e Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 7 Sep 2020 03:27:38 +0000 Subject: [PATCH] Fix display issue of cancel reason. #472 --- src/Service/RiderAPIHandler/CMBRiderAPIHandler.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index 05f9fbd7..9a7c0b28 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -1086,9 +1086,8 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface // notification $notif_url = $this->router->generate('jo_onestep_edit_form', ['id' => $jo->getID()]); - $this->nm->sendNotification(0, 'Job order #' . $jo->getID() . - ' has been cancelled by rider. Reason: ' . $jo->getCancelReason()->getName() . - '.', $notif_url); + $cancel_reason = CMBCancelReason::getName($jo->getCancelReason()); + $this->nm->sendNotification(0, 'Job order #' . $jo->getID() . ' has been cancelled by rider. Reason: ' . $cancel_reason . '.', $notif_url); return $data; }