add translations, brush up code
This commit is contained in:
@@ -126,27 +126,22 @@ class CheckoutAssetNotification extends Notification
|
||||
}
|
||||
public function toMicrosoftTeams()
|
||||
{
|
||||
$target = $this->target;
|
||||
$admin = $this->admin;
|
||||
$item = $this->item;
|
||||
$note = $this->note;
|
||||
|
||||
try {
|
||||
return MicrosoftTeamsMessage::create()
|
||||
->to($this->settings->webhook_endpoint)
|
||||
->type('success')
|
||||
->title(trans('mail.Asset_Checkout_Notification'))
|
||||
->addStartGroupToSection('activityText')
|
||||
->fact(trans('mail.assigned_to'), $target->present()->name)
|
||||
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
|
||||
->fact(trans('mail.Asset_Checkout_Notification') . " by ", $admin->present()->fullName())
|
||||
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
|
||||
|
||||
return MicrosoftTeamsMessage::create()
|
||||
->to($this->settings->webhook_endpoint)
|
||||
->type('success')
|
||||
->title("Asset Checked Out")
|
||||
->addStartGroupToSection('activityText')
|
||||
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
|
||||
->fact('Checked out from ', $item->location ? $item->location->name : $item->assetLoc()->name)
|
||||
->fact(trans('mail.Asset_Checkout_Notification') . " by ", $admin->present()->fullName())
|
||||
->fact('Asset Status', $item->assetstatus->name)
|
||||
->fact('Notes', $note ?: 'No notes');
|
||||
}
|
||||
catch(Exception $e) {
|
||||
dd($e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user