this adds check out message for consumables

This commit is contained in:
Godfrey M 2024-10-24 15:04:54 -07:00
parent 278bc5e52a
commit 6f0c1b12b1

View file

@ -127,17 +127,16 @@ class CheckoutConsumableNotification extends Notification
$item = $this->item; $item = $this->item;
$note = $this->note; $note = $this->note;
return MicrosoftTeamsMessage::create() $message = trans('mail.Consumable_checkout_notification');
->to($this->settings->webhook_endpoint) $details = [
->type('success') trans('mail.assigned_to') => $target->present()->fullName(),
->addStartGroupToSection('activityTitle') trans('mail.item') => htmlspecialchars_decode($item->present()->name),
->title(trans('mail.Consumable_checkout_notification')) trans('mail.Consumable_checkout_notification').' by' => $admin->present()->fullName(),
->addStartGroupToSection('activityText') trans('admin/consumables/general.remaining') => $item->numRemaining(),
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityTitle') trans('mail.notes') => $note ?: '',
->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()) return array($message, $details);
->fact(trans('mail.notes'), $note ?: '');
} }
public function toGoogleChat() public function toGoogleChat()
{ {