mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
fix MS Teams Notifications
This commit is contained in:
@@ -112,21 +112,21 @@ class CheckinAssetNotification extends Notification
|
||||
return MicrosoftTeamsMessage::create()
|
||||
->to($this->settings->webhook_endpoint)
|
||||
->type('success')
|
||||
->title(trans('mail.Asset_Checkin_Notification', ['tag' => $item->asset_tag]))
|
||||
->title(trans('mail.Asset_Checkin_Notification', ['tag' => '']))
|
||||
->addStartGroupToSection('activityText')
|
||||
->fact(htmlspecialchars_decode($item->display_name), '', 'activityText')
|
||||
->fact(trans('mail.checked_into'), ($item->location) ? $item->location->name : '')
|
||||
->fact(trans('mail.Asset_Checkin_Notification') . " by ", $admin->display_name)
|
||||
->fact(trans('general.administrator'), $admin->display_name)
|
||||
->fact(trans('admin/hardware/form.status'), $item->assetstatus?->name)
|
||||
->fact(trans('mail.notes'), $note ?: '');
|
||||
}
|
||||
|
||||
|
||||
$message = trans('mail.Asset_Checkin_Notification', ['tag' => $item->asset_tag]);
|
||||
$message = trans('mail.Asset_Checkin_Notification', ['tag' => '']);
|
||||
$details = [
|
||||
trans('mail.asset') => htmlspecialchars_decode($item->display_name),
|
||||
trans('mail.checked_into') => ($item->location) ? $item->location->name : '',
|
||||
trans('mail.Asset_Checkin_Notification')." by " => $admin->display_name,
|
||||
trans('general.administrator') => $admin->display_name,
|
||||
trans('admin/hardware/form.status') => $item->assetstatus?->name,
|
||||
trans('mail.notes') => $note ?: '',
|
||||
];
|
||||
|
||||
@@ -131,19 +131,19 @@ class CheckoutAssetNotification extends Notification
|
||||
return MicrosoftTeamsMessage::create()
|
||||
->to($this->settings->webhook_endpoint)
|
||||
->type('success')
|
||||
->title(trans('mail.Asset_Checkout_Notification', ['tag' => $item->asset_tag]))
|
||||
->title(trans('mail.Asset_Checkout_Notification', ['tag' => '']))
|
||||
->addStartGroupToSection('activityText')
|
||||
->fact(trans('mail.assigned_to'), $target->display_name)
|
||||
->fact(htmlspecialchars_decode($item->display_name), '', 'activityText')
|
||||
->fact(trans('mail.Asset_Checkout_Notification', ['tag' => $item->asset_tag]) . " by ", $admin->display_name)
|
||||
->fact(trans('general.administrator'), $admin->display_name)
|
||||
->fact(trans('mail.notes'), $note ?: '');
|
||||
}
|
||||
|
||||
$message = trans('mail.Asset_Checkout_Notification', ['tag' => $item->asset_tag]);
|
||||
$message = trans('mail.Asset_Checkout_Notification', ['tag' => '']);
|
||||
$details = [
|
||||
trans('mail.assigned_to') => $target->present()->name,
|
||||
trans('mail.asset') => htmlspecialchars_decode($item->display_name),
|
||||
trans('mail.Asset_Checkout_Notification', ['tag' => $item->asset_tag]). ' by' => $admin->display_name,
|
||||
trans('general.administrator') => $admin->display_name,
|
||||
trans('mail.notes') => $note ?: '',
|
||||
];
|
||||
return array($message, $details);
|
||||
|
||||
@@ -4,8 +4,8 @@ return [
|
||||
|
||||
'Accessory_Checkin_Notification' => 'Accessory checked in',
|
||||
'Accessory_Checkout_Notification' => 'Accessory checked out',
|
||||
'Asset_Checkin_Notification' => 'Asset checked in: [:tag]',
|
||||
'Asset_Checkout_Notification' => 'Asset checked out: [:tag]',
|
||||
'Asset_Checkin_Notification' => 'Asset checked in: :tag',
|
||||
'Asset_Checkout_Notification' => 'Asset checked out: :tag',
|
||||
'Confirm_Accessory_Checkin' => 'Accessory checkin confirmation',
|
||||
'Confirm_Asset_Checkin' => 'Asset checkin confirmation',
|
||||
'Confirm_component_checkin' => 'Component checkin confirmation',
|
||||
|
||||
Reference in New Issue
Block a user