A free open source IT asset/license management system
add nullsafe operator to item location in google chat message
Godfrey M46c11d8599b5
diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.phpindex 49ae88015a..ce3df70a30 100644--- a/app/Notifications/CheckinAssetNotification.php+++ b/app/Notifications/CheckinAssetNotification.php@@ -139,23 +139,22 @@ class CheckinAssetNotification extends Notification$target = $this->target;$item = $this->item;$note = $this->note;-+//return GoogleChatMessage::create()->to($this->settings->webhook_endpoint)->card(Card::create()->header(- '<strong>'.trans('mail.Asset_Checkin_Notification', ['tag' => '']).'</strong>' ?: '',+ '<strong>' . trans('mail.Asset_Checkin_Notification', ['tag' => '']) . '</strong>' ?: '',htmlspecialchars_decode($item->display_name) ?: '',)->section(Section::create(KeyValue::create(trans('mail.checked_into') ?: '',- ($item->location) ? $item->location->name : '',- trans('admin/hardware/form.status').': '.$item->status?->name,- )- ->onClick(route('hardware.show', $item->id))+ ($item->location) ? $item->location?->name : '',+ trans('admin/hardware/form.status') . ': ' . $item->status?->name+ )->onClick(route('hardware.show', $item->id)))));