Skip to content

A free open source IT asset/license management system

this adds check out message for consumables

Godfrey M6f0c1b12b189
diff --git a/app/Notifications/CheckoutConsumableNotification.php b/app/Notifications/CheckoutConsumableNotification.php
index c974134fe6..d66509b46a 100644
--- a/app/Notifications/CheckoutConsumableNotification.php
+++ b/app/Notifications/CheckoutConsumableNotification.php
@@ -127,17 +127,16 @@ class CheckoutConsumableNotification extends Notification
$item = $this->item;
$note = $this->note;
- return MicrosoftTeamsMessage::create()
- ->to($this->settings->webhook_endpoint)
- ->type('success')
- ->addStartGroupToSection('activityTitle')
- ->title(trans('mail.Consumable_checkout_notification'))
- ->addStartGroupToSection('activityText')
- ->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle')
- ->fact(trans('mail.Consumable_checkout_notification')." by ", $admin->present()->fullName())
- ->fact(trans('mail.assigned_to'), $target->present()->fullName())
- ->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
- ->fact(trans('mail.notes'), $note ?: '');
+ $message = trans('mail.Consumable_checkout_notification');
+ $details = [
+ trans('mail.assigned_to') => $target->present()->fullName(),
+ trans('mail.item') => htmlspecialchars_decode($item->present()->name),
+ trans('mail.Consumable_checkout_notification').' by' => $admin->present()->fullName(),
+ trans('admin/consumables/general.remaining') => $item->numRemaining(),
+ trans('mail.notes') => $note ?: '',
+ ];
+
+ return array($message, $details);
}
public function toGoogleChat()
{