From ae4f278df15b1edf366f48dde11c6436e4777bd2 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Thu, 1 Aug 2024 11:13:20 -0700 Subject: [PATCH] edited terenaries on notifs --- app/Notifications/CheckinAssetNotification.php | 2 +- app/Notifications/CheckoutAssetNotification.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index 50745b1b27..77cd6d9b5a 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -162,7 +162,7 @@ class CheckinAssetNotification extends Notification $message = (new MailMessage)->markdown('notifications.markdown.checkin-asset', [ 'item' => $this->item, - 'status' => $this->item->assetstatus->name ?: '', + 'status' => $this->item->assetstatus?->name, 'admin' => $this->admin, 'note' => $this->note, 'target' => $this->target, diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 352b088dba..5ebde7e4f7 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -209,7 +209,7 @@ public function toGoogleChat() [ 'item' => $this->item, 'admin' => $this->admin, - 'status' => $this->item->assetstatus->name ?: '', + 'status' => $this->item->assetstatus?->name, 'note' => $this->note, 'target' => $this->target, 'fields' => $fields,